R-beta: postscript in S

Thomas Lumley thomas at biostat.washington.edu
Mon Apr 27 18:26:16 CEST 1998


On Sun, 26 Apr 1998, Helgi Tomasson wrote:

> > On Sat, 25 Apr 1998, Helgi Tomasson wrote: 
> > > I am creating postscript-graphics in R.  When I import them into
> > >  a LATEX document it is impossible to get the caption close 
> > >  to the figure.  I run the same program in Splus, and no problem
> > > of getting the caption just below the figure.

There is something strange about the bounding boxes in R vs S-PLUS.  When
the graph is saved with horizontal=F there is no problem getting the
caption near the figure.  This explains why I hadn't noticed the problem,
as I usually have horizontal=F. 

With horizontal=T the R and S-PLUS bounding boxes are quite different:
%%DocumentMedia: letter 612 792 0 ()
%%Title: R Graphics Output
%%Creator: R Software
%%Pages: (atend)
%%Orientation: Landscape
%%BoundingBox: 18 18 774 594

%%Title: (S-PLUS Graphics)
%%Creator: S-PLUS
%%For: (Thomas Lumley)
%%CreationDate: Mon Apr 27 08:57:52 1998
%%BoundingBox: 20 11 592 781

So S-PLUS doesn't specify the 'Landscape' orientation, it just draws
sideways. R specifies Landscape and then draws the right way up on paper
that is wider than it is long. 

My guess is that dvips doesn't know about 
	%%Orientation: Landscape 
and takes the Bounding Box as if it were Portrait.  A fix is to add the
right (or possibly wrong) bounding box to eg \epsfig For example, the
following works (with just the last plot in cusum1.ps)

\documentclass{article}
\usepackage[dvips]{epsfig}
\begin{document}
A line of stuff\\
\epsfig{file=cusum1.ps,height=3in,bbllx=18,bblly=18,
	bburx=594,bbury=774,angle=270}\\
Another line of stuff
\end{document}


Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list