[R] Shrink file size of pdf graphics

Philipp Pagel p.pagel at wzw.tum.de
Fri May 20 09:49:51 CEST 2011


On Thu, May 19, 2011 at 01:35:51PM -0700, Layman123 wrote:

> I tried both, the plot devices in R and pdftk. First I tried the png-device,
> but as I wanted to increase the number of pixels with 'width' and 'height',
> the labels are getting smaller

When I really need a png, I usually produce a pdf or eps first and
then convert to png of the desired resolution with the convert command
of imagemagick (but of course any other software, like e.g.
Photoshop, should work fine, too). That way I don't have to figure out
the correct paramters to make the png the way I want it and I have the
additional benetfit of a vector grpahics "master file" that I can
esily use to produce addictional verison in differnent resolutions
etc.

> Is there a way to do this with the gs-command so that it would be even more
> compressed?

Possibly, but of course there is a limit to how much you can compress
a file without resorting to lossy compression. You may have hit that
limit.

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
Maximus-von-Imhof-Forum 3
85354 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/



More information about the R-help mailing list