Re: R-beta: save.plot()

Roger Bivand (rsb@reclus.nhh.no)
Fri, 23 Jan 1998 11:37:48 +0100 (MET)


From: Roger Bivand <rsb@reclus.nhh.no>
Message-Id: <199801231037.LAA02316@reclus.nhh.no>
Subject: Re: R-beta: save.plot()
To: plambert@ulg.ac.be (Philippe Lambert), r-help@stat.math.ethz.ch
Date: Fri, 23 Jan 1998 11:37:48 +0100 (MET)
In-Reply-To: <34C866EA.3764987@ulg.ac.be> 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:

\epsfig{file=<file>.eps,width=6cm}

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
e-mail: Roger.Bivand@geog.uib.no, Roger.Bivand@nhh.no
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._