[R] Placing A Legend in Titlle of a Plot
Mulholland, Tom
Tom.Mulholland at dpi.wa.gov.au
Wed May 25 09:55:23 CEST 2005
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 at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Josue Samayoa
> Sent: Wednesday, 25 May 2005 3:20 PM
> To: r-help at 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 at 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
>
More information about the R-help
mailing list