Re: R-beta: save.plot()

Roger Bivand (
Fri, 23 Jan 1998 11:37:48 +0100 (MET)

From: Roger Bivand <>
Message-Id: <>
Subject: Re: R-beta: save.plot()
To: (Philippe Lambert),
Date: Fri, 23 Jan 1998 11:37:48 +0100 (MET)
In-Reply-To: <> from "Philippe Lambert" at Jan 23, 98 10:46:18 am

Philippe Lambert writes:
> I currently use R0.61 to produce graphs for use in a tex document.
> I first type
>   x11(orientation='portrait',width=4,height=3.5)
> to fix the size of my graph, produce some plot type commands,
> and then save the whole as an .eps file using save.plot().
> The graph is included in the tex file using
>  \epsffile{file.eps}
> in a figure environment.
> The problem is that the graph occupies a whole page in the
> produced document, whatever the width and height mentioned
> in x11().
Also under R0.61, I've had a similar problem. I include the graphic
saved using save.plot() as:


which adjusts the width correctly. Viewing the .dvi file under Xdvi
also works, as does viewing the .ps file generated by dvips.
Ghostscript. However, pages including graphics saved using save.plot()
cause the print job to terminate before the first such page is printed.
The problem is an %%EOF at the end of the save.plot(). Files without
the %%EOF still print as they stand, so stripping it out may not
be a problem for all printers (but may be for some?). The bounding
box is also conservative, including more white space than strictly
necessary. Maybe this isn't worth fixing given the changes in
graphics coming in 0.62, so for the time being I just edit the
%%EOF out of the save.plot() file.

Roger Bivand
Joint Department of Geography, University of Bergen and
Norwegian School of Economics and Business Administration,
Breiviken 2, N-5035 Bergen-Sandviken, Norway.
voice: +47 55 95 93 55; fax +47 55 95 93 93
r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: