R User R User
2009-Mar-31 10:09 UTC
[R] 3d cloud plot with point size reflecting variable value
Hello all, I'm using the cloud function to plot the iris data as per the document: http://www.stat.ucl.ac.be/ISpersonnel/lecoutre/stats/fichiers/_gallery.pdf I'd like to change the point size to reflect a fourth variable, as done here http://www.cis.hut.fi/projects/somtoolbox/download/pics2/shotvs2_origdata.png Does anybody know how to do this? There doesn't seem to be an option in cloud() Thanks, Richie [[alternative HTML version deleted]]
Dieter Menne
2009-Mar-31 15:57 UTC
[R] 3d cloud plot with point size reflecting variable value
R User R User <ruser2008 <at> googlemail.com> writes:> I'm using the cloud function to plot the iris data as per the document: > http://www.stat.ucl.ac.be/ISpersonnel/lecoutre/stats/fichiers/_gallery.pdf > > I'd like to change the point size to reflect a fourth variable, as done here > http://www.cis.hut.fi/projects/somtoolbox/download/pics2/shotvs2_origdata.png > > Does anybody know how to do this? There doesn't seem to be an option in > cloud() >My first idea was to add cex = iris$PetalLength, which failed, taking the first value of cex only. In panel.3dscatter I found the line cex <- rep(cex, length.out = n) Which looks like cex is not vectored. So my approach would be to make a copy of panel.3dscatter and do the correct cex replacement there. I might be wrong, however, Deepayan has the last say. Dieter