[R] 3d scatterplots of more than 1 data set

John Fox jfox at mcmaster.ca
Mon Feb 28 14:35:04 CET 2005


Dear Saurav,

The scatter3d() function in the Rcmdr package will plot by groups, using
different colours for the groups. The function can be used directly or
called via the Rcmdr menus. scatter3d() appears to do what you want, but in
any event is a straightforward function, and you should be able to alter it,
or simply add to the plot using, e.g., rgl.spheres() from the rgl package.

I hope this helps,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
-------------------------------- 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Saurav Pathak
> Sent: Sunday, February 27, 2005 11:33 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] 3d scatterplots of more than 1 data set
> 
> hi,
> 
> i am need to plot two or more sets of data in a 3d 
> scatterplot, each set with different color.
> 
> i tried Rcmdr, and the 3d scatterplot facility, based on rgl. 
>  that is what i need.  but i cannot seem to code different 
> sets of data differently.  any help will be very helpful.
> 
> i tried scatterplot3d, but it is difficult to get the right 
> angle in it.  i need to be able to rotate the axes, and 
> export an eps file from the right angle.
> 
> thanks in advance.
> --
> saurav
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html




More information about the R-help mailing list