Suppose for a moment, I have a 13.5 million-point data file that I want to plot as a scatter-plot.
The resulting
Annoyingly, runes of the form
Surely there must be an easy way to simplify
gnuplot will happily produce a plot for me, although it takes a little while, and I need a fair bit of RAM.The resulting
.ps file is 212M, however, and makes evince thrash for absolutely ages before displaying it. Converting it to PDF just makes matters worse (up to 275M). I want to be able to include this figure in a pdfLaTeX document.Annoyingly, runes of the form
time gs -r600 -sDEVICE=pdfwrite -sOutputFile=foo-600.pdf -dNOPAUSE -dSAFER -dBATCH foo.ps actually make matters worse - the resulting PDF is even bigger!Surely there must be an easy way to simplify
ps or PDF files? presumably I could force gs to rasterize by outputting to PNG and then converting back to PDF (how?), but that seems a deeply ugly hack...
(no subject)
(no subject)
(no subject)
Dunno how many points that saves you, though :)
(no subject)
I use the shell script below and fiddle the resolution to trade off between appearance and file size... (needs ImageMagick... and the ppmtopgm makes it b/w which you may not want)
#!/bin/bash
res=${3:-150}
gs -q -sDEVICE=ppmraw -sOutputFile=- -r${res}x${res} - < $1 | pnmcrop | ppmtopgm | pnmtops -noturn -rle > $2
(no subject)
(no subject)
(no subject)
There seem to be two problems you might want to solve here:
a) a pdf file that can be arbitrarily zoomed in on demand, in which all 13.5 million points are represented. This is unavoidably going to be large and unwieldy.
b) a summary graph at a resolution that you think is suitable. In this case, surely it's desirable to find a third dimension (grey level, or colour) that conveys the density of points in a particular pixel location.
You may want to do both; paper copies need the latter; electronic copies might want the former (but maybe not - it depends whether detailed information is useful or whether it's _only_ the summary information that's worth presenting).
Then again, perhaps you can get a halfway house; in which you use grey levels or colour coding to represent density of points per pixel, but with a pixel resolution that is only moderately greater than the default that you render it at (so you can zoom in a bit, but not hugely ...)
(no subject)
(no subject)
(no subject)
(no subject)