RE: [R] Placing A Legend in Titlle of a Plot

From: Mulholland, Tom <Tom.Mulholland_at_dpi.wa.gov.au>
Date: Wed 25 May 2005 - 17:55:23 EST


Without a small example to see what you are doing it is hard to respond. There are plenty of examples in the help for legend showing placement all over the place. So I am guessing that this might help (The only thing added from the help was the par(xpd = TRUE)

     x <- 0:64/64
     y <- sin(3*pi*x)
     plot(x, y, type="l", col="blue", main = "")
     points(x, y, pch=21, bg="white")
     par(xpd = TRUE)
     legend(.4,1.25, "sin(c x)", pch=21, pt.bg="white", lty=1, col = "blue")
     par(xpd = FALSE)

Tom

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch]On Behalf Of Josue Samayoa
> Sent: Wednesday, 25 May 2005 3:20 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] Placing A Legend in Titlle of a Plot
>
>
> Hello,
> I am trying to place a legend in the title area of a plot. I can not
> seem to find a way to get legend() to do this. Nor can I use the
> title() function. Does anyone know a way to do this? I
> would greatly
> appreciate any advice.
>
> Thanks
>
>
> Josue Samayoa
> Center for Biomolecular Science & Engineering
> School of Engineering
> Division of Physical & Biological Sciences
> University of California Santa Cruz
> (831) 459-1019
> [[alternative text/enriched version deleted]]
>
> ______________________________________________
> R-help@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
>



R-help@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 Received on Wed May 25 18:06:15 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:03 EST