Pfaff, Bernhard
2003-Feb-05 15:56 UTC
[R] Package: cluster -- plot.partition() change title: main=""
Dear R-list members, I am using the cluster package and by the generation of plot.partition I ran into the problem that an alternative title overlaps the default title.> plot.partition(clara.14,which.plot=2,stand=TRUE, main="Silhouette plot of14 clusters") The manual states that all optional arguments for clusplot.default may also be supplied to plot.partition(). Altering the title in clusplot() works. Question: What am I doing wrong and what would be the correct way to insert the graphic title "Silhouette plot of 14 clusters" alone? I am using R 1.61 on Windows NT and the latest available cluster package from CRAN. Many thks in advance. Rgds, Bernhard ---------------------------------------------------------------------- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. ----------------------------------------------------------------------
Martin Maechler
2003-Feb-06 10:36 UTC
[R] Package: cluster -- plot.partition() change title: main=""
>>>>> "BernPf" == Pfaff, Bernhard <Bernhard.Pfaff at drkw.com> >>>>> on Wed, 5 Feb 2003 15:55:42 +0100 writes:BernPf> I am using the cluster package and by the generation BernPf> of plot.partition I ran into the problem that an BernPf> alternative title overlaps the default title. >> plot.partition(clara.14,which.plot=2,stand=TRUE, >> main="Silhouette plot of 14 clusters") { using an explicit method call which is ``discouraged''. Simply using plot(.......) gives the same result. } BernPf> The manual states that all optional arguments for BernPf> clusplot.default may also be supplied to BernPf> plot.partition(). Altering the title in clusplot() BernPf> works. Question: What am I doing wrong and what BernPf> would be the correct way to insert the graphic title BernPf> "Silhouette plot of 14 clusters" alone? For the moment, you must change the code, for an *installed* package, this is the file <RHOME>/library/cluster/R/cluster Change the two lines {1433 and 1448 in the above file} with text plot(silhouette(x), nmax.lab, max.strlen) into plot(silhouette(x), nmax.lab, max.strlen, ...) This will work perfectly in your case, but can give extraneous warnings in other situations. The next version of cluster will have a better solution, an explicit `main' argument. BernPf> I am using R 1.61 on Windows NT and the latest BernPf> available cluster package from CRAN. Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <><