From: Steve Chaplin <stevech1097@ya...> - 2006-03-04 03:22:23
On Fri, 2006-03-03 at 09:30 -0800,
> What is the status of the cairo pdf backend? I installed it,
> but got a python error at line 257 of backend_cairo.py.
> _.get_rgb() doesn't make sense to me, so I changed it to
> gc.get_rgb(). Now everything runs without error, but the
> generated pdf file is 42Mb even for a simple plot. And there
> is a font problem.
_.get_rgb() is a mistake, I've changed it to gc.get_rgb().
Using the latest cairo (git), pycairo (cvs) and matplotlib (svn) and
running examples/simple_plot.py I get a 22K PDF file. But when I try to
view it with evince and xpdf I get "unable to open document" type
The matplotlib cairo PDF backend relies on the cairo PDF backend.
The cairo PDF backend is relatively new, and is still being developed,
and I believe it currently only supports a limited set of fonts.
Send instant messages to your online friends http://au.messenger.yahoo.com
From: Christopher Barker <Chris.B<arker@no...> - 2006-03-06 17:28:27
Steve Chaplin wrote:
> Using the latest cairo (git), pycairo (cvs) and matplotlib (svn) and
> running examples/simple_plot.py I get a 22K PDF file. But when I try to
> view it with evince and xpdf I get "unable to open document" type
This is just a shot in the dark, but I've been playing with pycairo a
bit, and found that you need to make sure to call:
When you're done with the rendering. I had similar symptoms before I did
What are your plans regarding Cairo and the future of rendering for MPL?
I'm in the need of alpha blended rendering for wxPython stuff, so I've
been looking at Cairo and Agg. Agg is a great solution for really nice
rendering, but Cairo has the promise of supporting everything else I
need, like PDF for instance.
Now that Mozilla seems to be adopting Cairo, it might even live up to
the promise of a fully cross-platform solution. If so, it would be great
to develop a really general purpose, robust, numpy-aware, pythonic
interface for it.
Christopher Barker, Ph.D.
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception