[R] big ps-files
ripley@stats.ox.ac.uk
ripley at stats.ox.ac.uk
Thu Feb 6 12:38:03 CET 2003
On Thu, 6 Feb 2003, Jonathan Baron wrote:
> 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.
PDF *may* be compressed. Distilling R ps output makes much smaller
figures.
> You might try producing pdf directly from R instead of ps.
R's pdf is not compressed, BTW.
> Or use ps2pdf on the output of R, then use pdflatex.
Much better to use Distiller if you have it.
> 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
> smaller.
>
> Or make the graphs smaller using par(). Then, when you include
> them in your LaTeX document, blow them up again using (e.g.)
> includegraphicx[width=4in]{...}.
That should make almost no difference.
More than 2-3x difference is unusual, but then a 1Mb+ plot from R is
unusual. I do suggest you try to make a better graph as the first step.
We know R's .ps and .pdf output could be optimized and compressed. But
that's not something the R developers are interested in, so any
volunteers?
As a final point, if S-PLUS does what you want, why not use it? I
normally do for my publication-quality graphs ....
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list