I got plotrix running after updating R. My problem is now solved. Thank you.
Maura

-----Messaggio originale-----
Da: Jim Lemon [mailto:jim@bitwrit.com.au]
Inviato: lun 19/07/2010 10.58
A: mauede@alice.it
Cc: r-help@stat.math.ethz.ch
Oggetto: Re: package "plotrix"
 
On 07/19/2010 01:59 AM, mauede@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".
>  > 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"
>
> 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.

Hi Maura,
The legendg function is fairly new, so you probably have an older 
version of plotrix. From your example, I suspect that the second last 
line (split into two lines below) should read:

  col = c("red4","green","magenta1","cyan","black"),
  text.col = "black",lty=c(-1,-1,-1,1,1),

and thus I don't think you really need legendg.

Jim




tutti i telefonini TIM!


	[[alternative HTML version deleted]]

