[R] scatterplot of 100000 points and pdf file format
MSchwartz at MedAnalytics.com
Wed Nov 24 18:46:56 CET 2004
On Wed, 2004-11-24 at 17:43 +0100, Witold Eryk Wolski wrote:
> I tried the ps idea. But I am using pdflatex.
> You get a even larger size reduction if you convert the ps into a pdf
> using ps2pdf.
> But unfortunately there is a quality loss.
> I have found almost a working solution:
> a) Save the scatterplot without axes and with par(mar=c(0,0,0,0)) as png .
> b) convert it using any program to pnm
> c) read the pnm file using pixmap
> d) Add axes labels and lines afterwards with par(new=TRUE)
> And this looks like I would like that it looks like. But unfortunately
> acroread and gv on window is crashing when I try to print the file.
> x <- read.pnm("pepslop.pnm" )
I tried this approach and was able to print without problem here under
FC3, using acroread.
Also, I think that you left out:
test <- lm(Y2 ~ X2)
in the code above, lest abline() will fail. Also I changed the x,y
coordinates of the legend, since (1000, 4) is outside the plot range for
the points that I generated here.
Interesting approach, it reduced the pdf file size to about 7 Mb.
BTW, any chance that there is a huge black hole in the center of
More information about the R-help