-----Messaggio originale-----
Da: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de]
Inviato: dom 18/07/2010 18.58
A: mau...@alice.it
Cc: j...@bitwrit.com.au; r-h...@stat.math.ethz.ch
Oggetto: Re: [R] package "plotrix"
 


On 18.07.2010 17:59, mau...@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 ?
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.

Thank you .
Maura 

Uwe Ligges



e tutti i telefonini TIM!
Vai su 
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to