> 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,

As far as I remember, te problem has to do with different font handling
in different devices. I'm sure someone more familiar wiht the internals
will comment on this.

The fix is easy: don't use dev2bitmap but open the desired target device
before plotting. In your case: 

pdf(file='test.pdf', width=6, height=6)
plot(...)
legend(...)
dev.off()

cu
        Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
 
 and
 
Institut für Bioinformatik und Systembiologie / MIPS
Helmholtz Zentrum München -
Deutsches Forschungszentrum für Gesundheit und Umwelt
Ingolstädter Landstrasse 1
85764 Neuherberg, Germany
http://mips.gsf.de/staff/pagel

______________________________________________
R-help@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.

Reply via email to