[R] big ps-files

Jonathan Baron baron at cattell.psych.upenn.edu
Thu Feb 6 12:29:03 CET 2003

On 02/06/03 09:39, Helgi Tomasson wrote:

>The reason for my question is that a pdf-publication site is asking for a
>total size of document
>less than 2MB.   My R-graphs are simple plots of many points. I migth try to
>tell the same story by
>using fewer points.  An old (10 years +) Splus gave a particular graph 68k
>wheras the corresponding
>R was something like 1MB+.  My latex documents therefore become huge.  The
>explanation I got was
>that Splus used some kind of compression optimization which was absent in R.
>Perhaps it is better to try to generate other form of the graph than ps or
>to generate the
>graph using a subsample of the points.

You say a "pdf-publication."  Pdf itself is compressed.  So when
you convert to pdf, the figure should get smaller.  Apparently
this is not happening.

You might try producing pdf directly from R instead of ps.

Or use ps2pdf on the output of R, then use pdflatex.

Or use R's xfig output and then use xfig to produce the eps (and
then convert to ps), but I'm not sure that xfig will be any

Or make the graphs smaller using par().  Then, when you include
them in your LaTeX document, blow them up again using (e.g.) 

Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page:            http://www.sas.upenn.edu/~baron
R page:               http://finzi.psych.upenn.edu/

More information about the R-help mailing list