[R] Legend problem when exporting a plot to PDF

From: Julien Roux <Julien.Roux_at_unil.ch>
Date: Tue, 29 Apr 2008 11:14:51 +0200


Hi list,

When exporting to PDF a graph with a legend, in the final PDF, the text is going beyond the legend box.
> dev2bitmap("test.pdf", type="pdfwrite", h=6, w=6)
The legend looks OK on the screen.
I noticed that the size of the legend box depends on the size of the screen window, which is not the case for other graphical parts (text of the legend, title, axis text...)
Any tip on how to deal with this?

Another problem I encounter, which may be linked to this is: When I want to export PDFs to a given size with dev2bitmap (let's say h=3 and w=3), the size of the text of x-labels, y-labels and the x-axis annotations is not adjusted. The margins also keep the same size. Then if the size is too small, all the text fields overlap and the result is not nice.
How to change this? I guess it's possible since the on the screen (x11) the margins are adjusted relative to the size of the plot.

If you know one good tutorial to help creating ready-to-publish graphics, I would appreciate the reference. Thanks for your help
Julien

PS:
R version 2.6.2 (2008-02-08)
i386-apple-darwin8.10.1

-- 
Julien Roux, PhD student
http://www.unil.ch/dee/page22707.html
Department of Ecology and Evolution
Biophore, University of Lausanne, 1015 Lausanne, Switzerland
tel: +41 21 692 4221    fax: +41 21 692 4165

______________________________________________
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.
Received on Tue 29 Apr 2008 - 11:27:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Apr 2008 - 13:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive