New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cairo Backend: print_surface #1245
Comments
Hey @chdemars . Thanks for this, I'm not sure who our resident cairo expert is, but I expect somebody will be able to pick this up and create a PR from it (if that somebody were you, that would be even better). Out of interest, will you be writing up the process of integrating the mpl and Mapnik somewhere? I would live to read it! |
I initiated a pull request on the topic. I also have created an example --Christopher On Fri, Sep 14, 2012 at 2:07 AM, Phil Elson notifications@github.comwrote:
|
PR: #1245 |
In order to get matplotlib and mapnik to play nicely together, I had to alter backend_cairo.py by adding the following to the FigureCanvasCairo class:
Now I am a happy cartographer: I have maps and graphs on the same page all driven by a postgis database. Others might find this addition just as useful.
To use, just call:
mycanvas.print_surface(my_cairo_surface)
To move the location that the chart is printedl:
my_cairo_surface.set_device_offset(x,y)
mycanvas.print_surface(my_cairo_surface)
Cheers,
--Christopher
The text was updated successfully, but these errors were encountered: