[R] change pch in 3dplot, export graph
    David Winsemius 
    dwinsemius at comcast.net
       
    Fri Jul 29 22:27:16 CEST 2011
    
    
  
On Jul 29, 2011, at 4:02 PM, jack hietpas wrote:
> Hello I was wondering if anyone has been able to change the pch  
> value for
> points in 3dplot()?  I am able to change point colors just not  
> symbol types.
> I have included a portion of my code below.  I realize this won't work
> outside of my script, but thought, maybe there is something obvious  
> that I
> am doing wrong.   Also is it possible to utilize the interactive  
> feature of
> 3dplot in a powerpoint, perhaps there is some sort of file format  
> that the
> graph could be exported to?  Any suggestions would be very much  
> appreciated.
> Thanks in advance,
>
My understanding is pretty hazy in the rgl domain but I seem to  
remember one of its authors stating that points in rgl do nor have pch- 
capacity (other than being small spheres). Ah,  there it is:
http://finzi.psych.upenn.edu/Rhelp10/2010-April/234284.html
In addition to the text option mentioned, there are shapes and  
presumably one could make them small:
http://finzi.psych.upenn.edu/R/library/rgl/html/mesh3d.html
>
> library(rgl, pos=4)
> plot3d(subset(Dataset$PC1, source=="ashe_amphib"), subset(Dataset$PC2,
> source=="ashe_amphib"), subset(Dataset$PC3, source=="ashe_amphib"),
> xlim=c(-5,7), ylim=c(-5,3), zlim=c(-4,7), xlab="PC1", ylab="PC2",
> zlab="PC3", col=1, pch=1)
> points3d(subset(Dataset$PC1, source=="ashe_ZAS"), subset(Dataset$PC2,
> source=="ashe_ZAS"), subset(Dataset$PC3, source=="ashe_ZAS"), col=2,  
> pch=2)
> points3d(subset(Dataset$PC1, source=="earlies_gap"), subset(Dataset 
> $PC2,
> source=="earlies_gap"), subset(Dataset$PC3, source=="earlies_gap"),  
> col=3,
> pch=3)
>
> -jh
>
> 	[[alternative HTML version deleted]]
-- 
David Winsemius, MD
West Hartford, CT
    
    
More information about the R-help
mailing list