[R] Create a plot legend in a new window

Petr Pikal petr.pikal at precheza.cz
Fri Dec 10 09:00:34 CET 2004


Hi Michael

I cannot find other option than 

1.	to go through legend code and modify it according to your 
wish (especially drawing parts)

2.	to use rect and text for making your own legend 

3. 	experiment with legend settins to produce what you want

Cheers
Petr


On 9 Dec 2004 at 13:57, michael watson (IAH-C) wrote:

> Following on from this, what I want is to create a new window and fill
> up the entire window with my legend.
> 
> I have tried:
> 
> plot.new()
> par(mar=c(0,0,0,0))
> legend()
> 
> But that still puts legend wherever I specify x and y.  So after I
> have set mar to c(0,0,0,0), how do I tell R to make the legend fill
> the entire window, starting at the top-left?
> 
> Thanks
> Mick
> 
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of michael watson
> (IAH-C) Sent: 09 December 2004 11:52 To: R-help at stat.math.ethz.ch
> Subject: [R] Create a plot legend in a new window
> 
> 
> 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
> 
> ______________________________________________
> 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