Being more specific regarding the plots... according to the docs the plot command is smart enough to know which kind of plot is required based on the object passed as parameter. So I want to make several plots,from different objects, save each one in a JPEG or PNG but each I try that the 1st plot stops the command line window asking what type of plot do I want to see. How can I disable that interactiveness ? I am using a R file as source I was hoping to end up with several PNG or JPG in directory... Thanks in advance Mark Marques
I am using the library(cluster), and (mva)
Clustering function clara()
sometihng like this:
cdata <- clara(vdata,6)
plot(cdata)
savePlot(filename="c:\\clara1",type=c("png"),2)
But for my surprise the after the plot I get :
"Hit <Return> to see next plot:"
if i do something like :
plot(cdata,3)
I get:
Make a plot selection (or 0 to exit):
1:plot All
2:plot Clusplot
3:plot Silhouette Plot
Selection:
As far I know calling plot is using clusPlot() by reading the
"clara" object.
How can I avoid that interaction ?
Thanks in advance
Please proceed in this way:
jpeg(filename = "Rplot%03d..jpg", width = 480, height = 480, pointsize
= 12,
quality = 75, bg = "white")
plot(cdata)
dev.off()
You will get two files (Rplot001.jpg and Rplot002.jpg) in the home directory
where you have your R installed, without any additional interaction.
Regards,
Carlos.
-----Mensaje original-----
De: r-help-admin@stat.math.ethz.ch
[mailto:r-help-admin@stat.math.ethz.ch]En nombre de Mark Marques
Enviado el: jueves, 20 de febrero de 2003 17:36
Para: R-help Mailing list.
Asunto: [R] ClustPlots part3
I am using the library(cluster), and (mva)
Clustering function clara()
sometihng like this:
cdata <- clara(vdata,6)
plot(cdata)
savePlot(filename="c:\\clara1",type=c("png"),2)
But for my surprise the after the plot I get :
"Hit <Return> to see next plot:"
if i do something like :
plot(cdata,3)
I get:
Make a plot selection (or 0 to exit):
1:plot All
2:plot Clusplot
3:plot Silhouette Plot
Selection:
As far I know calling plot is using clusPlot() by reading the
"clara" object.
How can I avoid that interaction ?
Thanks in advance
______________________________________________
R-help@stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help
### This email has been checked for all known viruses by the
### Firstnet anti-virus system - http://www.firstnet.net.uk
### Please email fav@firstnet.net.uk for details.
_____
The information in this email is confidential and it may not be\ ... [[dropped]]
Hi Mark
Does this help?
plot(clara.obj, which.plots = 1)
This was buried a bit in the documentation for cluster. plot.partition() is
the function used to do the plotting. See its help page
You need to tell it to do plot 1 or 2 or NULL. 1 gets you a clusplot, 2
gets a silhouette plot, NULL gets both. In the above command, the
which.plots gets passed though to plot.partition and only produces the one
diagram.
All the best,
Gavin
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson [T] +44 (0)20 7679 5522
ENSIS Research Fellow [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC [E] gavin.simpson at ucl.ac.uk
UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/
London. WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
-----Original Message-----
From: r-help-admin at stat.math.ethz.ch [mailto:r-help-admin at
stat.math.ethz.ch]
On Behalf Of Mark Marques
Sent: 20 February 2003 16:36
To: R-help Mailing list.
Subject: [R] ClustPlots part3
I am using the library(cluster), and (mva)
Clustering function clara()
sometihng like this:
cdata <- clara(vdata,6)
plot(cdata)
savePlot(filename="c:\\clara1",type=c("png"),2)
But for my surprise the after the plot I get :
"Hit <Return> to see next plot:"
if i do something like :
plot(cdata,3)
I get:
Make a plot selection (or 0 to exit):
1:plot All
2:plot Clusplot
3:plot Silhouette Plot
Selection:
As far I know calling plot is using clusPlot() by reading the
"clara" object.
How can I avoid that interaction ?
Thanks in advance
______________________________________________
R-help at stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help