pdf backend

_.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
errors.

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.

Steve

Send instant messages to your online friends http://au.messenger.yahoo.com

···

On Fri, 2006-03-03 at 09:30 -0800, matplotlib-users-request@lists.sourceforge.net wrote:

        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.
        
        Keith

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
errors.

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:

cairo.Context.show_page()

When you're done with the rendering. I had similar symptoms before I did that.

John,

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.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
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

Chris.Barker@...259...