[R] problem with legend on other graphics devices

Gavin Simpson gavin.simpson at ucl.ac.uk
Sat Jun 17 22:59:49 CEST 2006


On Fri, 2006-06-16 at 19:42 +0100, Gavin Simpson wrote:
> Hi,
> 
> I have a bit of a problem with a legend in png, eps and pdf plots
> produced from a custom plotting function. I was writing a little
> function to produce some stock plots for a routine analysis conducted in
> our lab. I have a wrapper function figures() (see below) that produces
> eps, png and pdf versions of the lab output. When I draw the plot on the
> X11() device the correct amount of space is made available for the
> legend, but when I draw the plot directly on the png, postscript or pdf
> devices, the legend is placed too close to the edge of the plot and is
> clipped.

Hi,

To follow up, the posted code does work and the legend is not clipped on
my home machine but that was a slightly less-up-to-date version of R
2.3.1 patched than the machine at work. So I compiled the latest R2.3.1
patched (svn revision 38350) and it works fine there also. So must have
been something peculiar to my set-up at work or R session at the time.

For the record:
> version
               _
platform       i686-pc-linux-gnu
arch           i686
os             linux-gnu
system         i686, linux-gnu
status         Patched
major          2
minor          3.1
year           2006
month          06
day            16
svn rev        38350
language       R
version.string Version 2.3.1 Patched (2006-06-16 r38350)

G
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 *Note new Address and Fax and Telephone numbers from 10th April 2006*
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [t] +44 (0)20 7679 0522
ECRC                              [f] +44 (0)20 7679 0565
UCL Department of Geography
Pearson Building                  [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street
London, UK                        [w] http://www.ucl.ac.uk/~ucfagls/cv/
WC1E 6BT                          [w] http://www.ucl.ac.uk/~ucfagls/
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list