Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot twice

2014-10-15 Thread Mark Janikas
Thanks for the reiteration/clarification... Do you see any reason why a fail-safe check similar to what I proposed would be ill advised? MJ -Original Message- From: Matthew Brett [mailto:matthew.br...@gmail.com] Sent: Wednesday, October 15, 2014 3:44 PM To: Mark Janikas Cc: Thomas Casw

Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot twice

2014-10-15 Thread Matthew Brett
Hi, On Wed, Oct 15, 2014 at 2:56 PM, Mark Janikas wrote: > > When I replaced the file I got the 1st error below. As you had pointed out > earlier… this is strange. It only occurs when you run it more than once… > strange indeed… it is like a manager is being created and deleted but perhaps

[Matplotlib-users] TkAgg problem: blank plot on MacOS

2014-10-15 Thread Russell Owen
I have a polar graph that works fine on linux but is blank on MacOS 10.9. Here is a minimal working example (using the API because it is part of a larger Tkinter application): #!/usr/bin/env python2 import Tkinter import matplotlib from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg

Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot twice

2014-10-15 Thread Mark Janikas
When I replaced the file I got the 1st error below. As you had pointed out earlier… this is strange. It only occurs when you run it more than once… strange indeed… it is like a manager is being created and deleted but perhaps the reference hasn’t… so you get a no-op on the subsequent import..

Re: [Matplotlib-users] Get contourf image as array

2014-10-15 Thread David Hoese
For the first question, if I save the figure (as a PNG I'm guessing, unless you can save into a more array-like format), I'd have to make sure that there were no labels or ticks and that the axes fit the whole figure. I'd also have to get the dpi and size information correct, but I suppose it w

Re: [Matplotlib-users] Get contourf image as array

2014-10-15 Thread Joy merwin monteiro
pardon the query if it seems dumb, but why don't you do a savefig() after plotting the data and then convert it to any format you like? alternatively, contour() and contourf() both create paths that can be accessed: cf = contourf(.) output = cf.collections.pop() paths = output.get_paths()[i]

[Matplotlib-users] Get contourf image as array

2014-10-15 Thread David Hoese
I've been searching and reading through source code and google searches to see if this is possible, but no luck so far. I'm basically trying to map some data using Basemap, use contourf to map it to an image, and then put that image in a geotiff (or other format) for use in other GIS programs.

[Matplotlib-users] Docs mention "two classes", but actually has three

2014-10-15 Thread mrvelle
On this documentation page: http://matplotlib.org/api/figure_api.html. It says: The following classes are definedSubplotParams control the default spacing of the subplots Figure top level container for all plot elements But actually there are three. The third one is: Ax