[R] R: package "plotrix"

David Winsemius dwinsemius at comcast.net
Sun Jul 18 19:57:14 CEST 2010


On Jul 18, 2010, at 1:32 PM, <mauede at alice.it> wrote:

>
> -----Messaggio originale-----
> Da: Uwe Ligges [mailto:ligges at statistik.tu-dortmund.de]
> Inviato: dom 18/07/2010 18.58
> A: mauede at alice.it
> Cc: jim at bitwrit.com.au; r-help at stat.math.ethz.ch
> Oggetto: Re: [R] package "plotrix"
>
>
>
> On 18.07.2010 17:59, mauede at alice.it wrote:
>> I installed package plotrix because reading its vignette it looks  
>> like it can help me solve a "legend" problem.
>> The package instaleed correctly on my Mac OS/X 10.5.8
>> But I cannot reproduce the examples centered on function "lgendg".
>
>
> You mean "legendg".
>
> Yes. Sorry for my typo.
>
>>> library(plotrix)
>>> plot(0.5,0.5,xlim=c(0,1),ylim=c(0,1),type="n",
>> + main="Test of grouped legend function")
>>> legendg(0.5,0.8,c("one","two","three"),pch=list(1,2:3,4:6),
>> + col=list(2,3:4,5:7))
>> Error: could not find function "legendg"
>
>
> That works for me. Try to upgrade bopth R and plotrix if you have not
> already.
> I am running R 2.9.2 on my Mac OS/X 10.5.8
> I always feel uncomfortable with upgrades.
> Shall I uninstall R 2.9.2 in advance of instaling the ew bversion  
> for Mac ?

No need to do so. The appropriate 2.11.1 folders will be created in  
the R.framework folder and the links in the Current folder will be  
updated.


> I ave no reason for keeping two versions.
>
>
>> My problem with the regular R "legend" function is that I cannot  
>> indicate in the legend the line plotted by the command "abline"
>> Here is the code. Attached is the plot. Any suggestion is welcome.  
>> Thank you.
>> Maura
>>
>>
>> x11(width=10,heigh=8)
>> plot(NN,LB,xlim=c(1,300),ylim=c(0,3),
>>      main="Intrinsic Dimensionality of 1D  
>> Helix",font.main=2,cex.main=2,col.main="red",
>>      xlab="Number of Nearest-Neighbors",ylab="Estimated   
>> Dimension",col.lab="red",cex.lab=1,font.lab=2,
>> 	 xaxt="n",yaxt="n",pch=19,col="red4")
>> axis 
>> (1 
>> ,at 
>> = 
>> NN 
>> [1 
>> : 
>> 40 
>> ],labels 
>> = 
>> NN 
>> [1 
>> :40],cex.lab=1,cex.axis=0.8,col.axis="blue",lwd.ticks=0.5,col.ticks  
>> ="gray3")
>> axis 
>> (2 
>> ,at 
>> = 
>> c 
>> (0,0.5,1,1.5,2,2.5,3,3.5,4 
>> ),labels=c(0,0.5,1,1.5,2,2.5,3,3.5,4),cex.lab=1,cex.axis=0.8,
>> 	 col.axis="blue",lwd.ticks=0.5,col.ticks ="gray3")
>> lines(NN,McG,pch=18,col="green")
>> lines(NN,PBJD,pch=20,col="magenta1")
>> points(NN,GRPR,pch=18,col="cyan")
>> abline(h=1,pch= 1,lty=1,col="black")
>> legend("topright",legend = c("Levina-Bickel","MacKay- 
>> Ghahramani","Pettis-Bailey-Jain-Dubes","Grassberger- 
>> Procaccia","Helix Dimension"),
>>        text.width = strwidth("Pettis-Bailey-Jain-Dubes"),pch =  
>> c(19,18,20,18,1),
>> 	   col = c("red4","green","magenta1","cyan","black"),text.col =  
>> "black",lty=c(-1,-1,-1,1),
>> 	   bg ="snow")
>>
>>
>
>
>
> We do not have the data nor do we see the figure, hence this is not
> reproducible for us.
>
> Actually I attached the TIFF plot that I am attaching again.

Re-read the Posting Guide. It specifies what can be attached and TIFF  
files are NOT in the list of acceptable types. Uwe might have gotten a  
copy but the rest of us did not.

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list