Reduce the size of graphics in EPS format

I have a histogram with several hundred elements for which I am making a QQ chart. This causes EPS to be 2.5 megabytes. This is too much for a figure that will be included only in the publication and will not be displayed at a magnification of 100x.

Is there any option in R to somehow output a smaller EPS? I searched for documents to no avail. Or is my best option, say, to rasterize it after 300 dpi? If this is the case, any recommendations for a tool for this job?

The R code for the graph does not represent anything:

postscript(filename)
qqnorm(n, main=title))
qqline(n)
dev.off()

EDIT: Doh! My question mentions EPS output, and then converting it to some raster format. When, of course, I could generate PNG primarily from R.

+5
source share
6 answers

I just tried a few things that didn't work out - I turn them on here to save others by wasting time. For reference, I installed n <- rnorm(1e5)in your code above.

Things that don't work:

  • Customization colormodel <- "gray".

  • Using a different pch value. (Some other values ​​increase the file size, but I have not found a single one that will reduce it.)

  • Customization useKerning = FALSE.

  • Change the width and height settings.

  • Using pdf instead of postscript.

  • Using CarioPS from the Cairo package.

In light of this, I think that you are unlikely to be able to reduce the file size using the vector format. This means that you have to use a raster format (most likely PNG).

+3

.

  • , png
  • QQplot . QQplot.

    ( ) Samp < - (n, = 200) qqnorm (Samp, main = title)) qqline (Samp) dev.off()

+3

R- pdftk. n= 1e5 PDF 6 600 . !

+2

GS, pdf, PS EPS, 5-7 .

+2

, EPS , , . , PDF-, , , .

, EPS R , ( , Postscript, one- char .., ). , . , , , R - , .

+1

OP , PNG . EPS, PNG . EPS , LaTeX.

GIMP 10- eps , R-. , 300- eps . - . LaTeX .

, Ghost Script epsviewer. GIMP Ghost Script front-end, , .

+1

All Articles