[R] Question regarding legend look
David Winsemius
dwinsemius at comcast.net
Wed Dec 1 17:51:02 CET 2010
On Dec 1, 2010, at 10:13 AM, Filoche wrote:
>
> Hi everyone.
>
> I have a quick question regarding the look of my legend in my plot.
> As you
> can see in the next figure, I have 3 series.
>
> http://r.789695.n4.nabble.com/file/n3067466/legend.png
>
>
> However, I find rather difficult to differentiate the series 1 and 3
> according to their line type (lty). I would like to know if it was
> possible
> to make the line type in the legend to appear more clearly. For
> example, to
> give more horizontal space each side of the symbols "square" to have a
> better idea of the line type.
The specifics will depend on what plotting function produced the graph
from which you have given us a bitmap snapshot BUT NOT SHOWN US CODE
OR SAMPLE DATA. In xyplot you would be working with the key/lines/size
elements (after showing us which of the several legend options were
specified):
?xyplot
In base graphics I do not see a "handle" on the line length but
(perhaps) you could emphasize the line compenent by increasing cex
which affects all components and at the same time decrease the point
size. E.g.:
legend( ..., cex=1.5, pt.cex=0.8, cex=1.5, pt.cex=0.8, ...)
As always____>
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
__ ___________________________________
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list