Skip to content

Help with postscript (huge file size)

7 messages · Ben Bolker, Talita Perciano, Hadley Wickham

#
Talita Perciano wrote:
Not in any extremely easy way.  The fundamental problem is
that if you have a whole lot of points in your graph, it's hard
to make them take less file space even if they're overplotted
(and hence not visible in the actual image).
  This has been discussed in various forms on the R list in the past,
but I can't locate those posts easily.  It's a little hard without knowing
what kind of plot you're generating, but I'm assuming that you have
many, many points or lines in the graphic (or a very high-resolution
image plot), and that the details don't all show up in the figure anyway.
A few general strategies:

  * thin the points down to a random subset
  * use a 2D density plot or hexagonal binning
  * create a  bitmap (PNG) plot, then use image
manipulation tools (ImageMagick etc.) to convert that back to
a PostScript file
  * there was some discussion earlier about whether one
could embed a bitmap of just the internals of the plot, leaving
the axes, labels etc. in vector format, but I don't think that
came to anything
  
  good luck
   Ben Bolker
#
Do you mean you're importing jpegs or other bitmaps into
R and writing them out (possibly with annotation etc.) as
PostScript?
  Can you give a small example of some sort?  It would
help for giving advice.
Talita Perciano wrote:

  
    
#
Just use a high-resolution png or tiff.  At 300 dpi you won't be able
to tell the difference when it's printed.

Hadley