Re: [Matplotlib-users] Error when plotting negative values on log scale

2011-03-11 Thread Søren Nielsen
Thanks for info Goyo and Ben! 2011/3/11 Benjamin Root > > > 2011/3/10 Søren Nielsen > >> Hi, >> >> >> When I do an errorbar plot (a.errorbar(), a = axis) with negative values >> and then try to change the yscale to log (a.set_yscale('log')) matplotlib >> crashes with: >> >> Traceback (most re

[Matplotlib-users] You do not own this lock

2011-03-11 Thread John Haiducek
I have a pygtk application which uses matplotlib for graphics. The application maintains one or more matplotlib.FigureCanvasGTKAgg objects and correspondig matplotlib.figure.Figure objects, and switches between them as needed. My problem is that after switching from one canvas/figure pair to anothe

Re: [Matplotlib-users] Memory usage with 1M of Polygons

2011-03-11 Thread Eric Firing
On 03/11/2011 02:54 PM, onet wrote: > Hi, > > Using matplotlib I try to plot satellite observations, which consists of > roughly one million patches that are not gridded regularly. > I first collect the vertices (corner points of the observations) and > colors and then use PolyCollection and ax.add

[Matplotlib-users] Memory usage with 1M of Polygons

2011-03-11 Thread onet
Hi, Using matplotlib I try to plot satellite observations, which consists of roughly one million patches that are not gridded regularly. I first collect the vertices (corner points of the observations) and colors and then use PolyCollection and ax.add_collection to add these patches to the figure

Re: [Matplotlib-users] Dual Y-Axes on Imshow

2011-03-11 Thread Thomas Brezinski
Jason Stone, on 2011-02-18 14:39, wrote: > Good afternoon all, > One last matplotlib question for the group for today. On one of my GUI > plots, I'm calling imshow on an array of data (to display it in the same way > MATLAB's imagesc command does). I'd like to add a second y-axis to the > rig

Re: [Matplotlib-users] Axes formatting

2011-03-11 Thread Goyo
2011/3/11 Luciano Fleischfresser : > [...] > I have to confess that object-oriented programming seems very > counter-intuitive to me. > Hopefully it will come more naturally soon. This has nothing to do with OOP, you just need to know what command/function/method does what you want. It happens tha

Re: [Matplotlib-users] Error when plotting negative values on log scale

2011-03-11 Thread Benjamin Root
2011/3/10 Søren Nielsen > Hi, > > When I do an errorbar plot (a.errorbar(), a = axis) with negative values > and then try to change the yscale to log (a.set_yscale('log')) matplotlib > crashes with: > > Traceback (most recent call last): > File > "/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-

Re: [Matplotlib-users] Error when plotting negative values on log scale

2011-03-11 Thread Goyo
2011/3/10 Søren Nielsen : > Is there a way I can get around this without having to search through my > data and remove points that are negative or NaN or INF when the yscale needs > to be log? That would also show an incorrect curve since a line would be > drawn across the points that were removed

Re: [Matplotlib-users] automatic format of y-axis limits for small changes with large offset

2011-03-11 Thread Daniel Mader
Hi Eric, thank you so much for pointing this out! Didn't know about the function before, it really helps me a lot! However, for the current problem it doesn't help. The scaling of the second axis broken without any margin or padding changes. As a workaround, I could of course plot the data two t

Re: [Matplotlib-users] automatic format of y-axis limits for small changes with large offset

2011-03-11 Thread Eric Firing
On 03/10/2011 01:13 AM, Daniel Mader wrote: > Maybe I should mention that there are actually two reasons why I don't > like this behavior: > > 1) it's sometimes very hard to read what's going on, > 2) there also seems to be a bug when the limits are changed later, see > attached results: the upper

Re: [Matplotlib-users] Issue with imshow and usetex

2011-03-11 Thread Thomas Robitaille
Hi Jae-Joon, I tried inserting: mpl.rc('ps', usedistiller=None) after importing matplotlib, and I get: $ du -sk *.eps 6204test_1.eps 34104 test_2.eps using 'ghostscript' I get: $ du -sk *.eps 34096 test_1.eps 34104 test_2.eps and using 'xpdf' raises an exception: File "/Users/to

[Matplotlib-users] Scientific Software developer wanted in Seattle.

2011-03-11 Thread Christopher Barker
Scientific Software Developer NOAA Emergency Response Division Help us develop our next-generation oil spill transport model. Background: The Emergency Response Division (ERD) of NOAA's Office of Response and Restoration (OR&R) provides scientific expertise to support the response to oil and ch

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-11 Thread Yuri D'Elia
On Sun, 6 Mar 2011 21:47:04 +0900 Jae-Joon Lee wrote: > > Ok, I can understand that, but shouldn't all artists used to construct the > > picture, as suptitle, be considered? > > I think considering all the artists is not very practical (as some of > them could have spline paths), but what we

Re: [Matplotlib-users] Basemap interp nearest neighbor

2011-03-11 Thread Juan A. Saenz
Jeff, thanks for your reply. One situation where one might require masked nearest neighbor interpolation is when, on a given fixed grid, interpolating velocities on cell corners (B-grid) to faces (C-grid). Cells will be defined as either land or ocean cells, masked or un-masked respectively. Th

Re: [Matplotlib-users] Basemap interp nearest neighbor

2011-03-11 Thread Juan A. Saenz
If I think of something, I'll let you know. In the meantime, I'd like to point out the following: Nearest neighbor returns a masked interpolation point if the nearest neighbor is masked (this is just what you've already told me). If there are two equidistant neighbors, it returns the one on the

Re: [Matplotlib-users] [Numpy-discussion] Anybody going to PyCon?

2011-03-11 Thread David Cournapeau
On Mon, Mar 7, 2011 at 5:53 PM, Gökhan Sever wrote: > Hello, > > I am going to the PyCon this week. I am presenting a poster about an > atmospheric sciences related project -- the most active development > from my coding site over at http://code.google.com/p/ccnworks/ > > Is there anybody in the c

Re: [Matplotlib-users] automatic format of y-axis limits for small changes with large offset

2011-03-11 Thread Daniel Mader
Hi again, unfortunately, the proposed solution breaks a second y-axis. Attached is a script which demonstrates the problem in the third figure. The second axis should be half of the first one. import pylab import scipy pylab.close('all') ##--