I thought some of the developers here might be interested in the issue of controlling the number of pixels in PLPlot PostScript results so here is what I have learned this afternoon about this topic.
It turns out for the pscairo device (and I assume for all cairo devices), that the -geometry option (which translates to the appropriate call to plspage) works nicely to control the number of pixels in the PostScript output file. In contrast to pscairo both the ps and psttf devices ignore plspage (that code warns that certain devices ignore it) so the -geometry option is a no-op for those devices. I have just discovered the number of ps and psttf pixels can be changed by changing the #defines for XSIZE and YSIZE in include/ps.h, but that build-time approach is rather inflexible compared to using the -geometry option at run time for -dev pscairo. Here is the background about why this topic is important to me. Apparently arxiv.org (the scientific eprint server for astrophysics and much else) has a limit of about 50Kbytes for the size of compressed figures that you submit to them as part of an eprint. And the way they recommend you achieve this for your big PostScript plots that are larger than 50K compressed is by using the ImageMagick commands convert test.eps gif:- |convert gif:- >compact_test.eps i.e., convert to gif and back again. This creates a compact bitmapped version of your big PostScript plot. The bitmapped results look pretty crummy as you might expect, but they are at least (barely) legible, and the writers of eprints for arxiv.org (that's me!) has the opportunity to provide a URL in the text where the original high-resolution non-bitmapped PostScript plots can be found so that readers can follow that link if they want to look in more detail. The problem for me is that when I applied the above recipe to my first large (3 MB) PostScript plot produced by PLplot, the compact result compressed to 54KB which is still (barely) above the arxiv.org limit of 50KB. An obvious way out is to reduce the number of pixels in the bitmapped result, but trying to achieve that with the -geometry option of the ImageMagick convert command leads to illegible characters (as opposed to barely legible characters) in the bitmapped result because that option attempts to interpolate narrow character strokes with all their high spatial frequencies to the new pixel grid, and that is just an impossible task to do cleanly. Therefore, that is why I have explored methods of reducing the number of pixels in the PostScript results produced by PLplot this afternoon since that ultimately leads to much better bitmapped results. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel