[R] Legend that is big?

John Kane jrkrideau at yahoo.ca
Sat Jan 21 17:14:13 CET 2012


Try something like this:

legend('bottom', leg.txt, horiz = TRUE, cex=.75)

A workable example is requested and would have been helpful.


----- Original Message -----
From: Kevin Burton <rkevinburton at charter.net>
To: r-help at r-project.org
Cc: 
Sent: Saturday, January 21, 2012 8:47:36 AM
Subject: [R] Legend that is big?

I can put a legend on a plot with something like:



legend('bottom', leg.txt, horiz = TRUE, fill = colors)



But what if the arrays leg.txt and colors are too big? I would still like to
provide a legend but to save space I would like to just show small boxes
with the color filled in so it will still fit on the plot. If I could adjust
the size of the boxes (at least in one dimension) that would be desirable.
As a bonus and if there is room I would like to label the top and bottom
(left and right) of the legend with text indicating a minimum and maximum. I
am relatively new to 'R' and especially 'R' graphics so any help would be
greatly appreciated.



Thank you.



Kevin




    [[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list