Re: [Matplotlib-users] Save a plot background

2008-12-01 Thread Hrafnkell Pálsson
Any chance of further help? John? Hrafnkell -- View this message in context: http://www.nabble.com/Save-a-plot-background-tp20519596p20771515.html Sent from the matplotlib - users mailing list archive at Nabble.com. -

Re: [Matplotlib-users] Save a plot background

2008-11-20 Thread Hrafnkell Pálsson
Jeff Whitaker wrote: Hrafnkell: Had some time this morning, so I used John's method to create a working Basemap example: import matplotlib matplotlib.use('Agg') from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # this example shows how to save a map

Re: [Matplotlib-users] Save a plot background

2008-11-19 Thread Hrafnkell Pálsson
This will turn off the rendering of both the background rectangle as well as all the ticks and their associated labels, ticklines and gridlines. Perhaps Jeff can advise you vis-a-vis the basemap api what the equivalent is Ok, I tested your example and see what you mean. But if I

Re: [Matplotlib-users] Save a plot background

2008-11-18 Thread Hrafnkell Pálsson
Ok, I tried your last suggestion and sure enough it worked. But it turns out to solve only half of my problem. I'd like to be able to restore the background (using the Agg backend) and then use it further, i.e. plot on it, without it disappearing. Elaborating on my real use case, what I want to

Re: [Matplotlib-users] Save a plot background

2008-11-17 Thread Hrafnkell Pálsson
Hi I tried you suggestions but it didn't work out for me. In the following code I try to save the axes and the grid from figure1 into buffer and then restore it on figure2 but figure2.png turns out to be of an empty canvas. #!/usr/bin/env /opt/python/bin/python # encoding: utf-8 import

[Matplotlib-users] Save a plot background

2008-11-16 Thread Hrafnkell Pálsson
Hi I haven't managed to save a plot background into buffer to be able to restore it later. I use matplotlib to draw weather maps (see www.belgingur.is), and though the weather constantly changes the outlines of the countries are the same for every picture. Currently I plot the coastlines anew for