[R] Create a plot legend in a new window

Petr Pikal petr.pikal at precheza.cz
Thu Dec 9 15:06:41 CET 2004


Hi Michael

If on windows (what you did not tell us) use

1.	plot your graph

2.	windows() # to create new grapfic template

3.	click on it to make it active

4.	plot(1,1,type="n")

5.	place your legend somewhere on the second plot e.g. by 
legend(locator(1), ........)

BTW

help.search("window") reveals that there is ts function window, 
but also graphic function "windows". Maybe on the "window" help 
page could be mentioned link to this quite similar (by name) 
graphic function, even if it is completely unrelated.

Cheers
Petr


On 9 Dec 2004 at 11:52, michael watson (IAH-C) wrote:

> Hi
> 
> I have a complicated plot which has a potentially large legend.  What
> I want to do is actually create the legend in a new window.  Has
> anyone done this before?  I'd like to be able to create a window with
> just the legend in it, and have it so the window is just the right
> size etc.  I'm sure someone must have done this already?  If not, any
> tips would be welcome.
> 
> Thanks
> Mick
> 
> ______________________________________________
> 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

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list