Plotting in batch with no display
Tim Harig
usernet at ilthio.net
Sat Jun 5 12:10:01 EDT 2010
On 2010-06-05, Hans Georg Schaathun <H.Schaathun at surrey.ac.uk> wrote:
> Raster graphics is not good enough, I will need a backend which
> does vector graphics and pdf output. AFAICS from the FAQ at
> sourceforge, agg only supports raster and png. Cairo supports
> vector graphics and PDF, but I cannot find any information about
> how/if it deals with X11...
1. I am not familiar with matlab; but, I have written python programs that
generate plots using GNUplot (which can create PDFs). There are
python modules available for working with GNUplot or you can open
it yourself under a subprocess and send it commands through a pipe.
GNUplot allows you to save files directly and does not therefore
require X.
2. If you can generate a raster file with Matlab, you can use ImageMagick
(which has python bindings or could be execed directly) or other
conversion software to convert the file to whatever format you
choose.
3. Depending on your requirements, you could generate a plot using
postscript. Postscript is easy to convert directly to PDF as
the two are closely related. As postscript is a powerful
language itself you can actually write the graphing routines in
postscript and use python to simply embed the data into the
postscript.
More information about the Python-list
mailing list