Re: [Matplotlib-users] import pylab produces rounding error

2008-07-14 Thread Angela Rivera Campos
Try import pylab instead of from pylab import * Manuel I've already tried using import pylab and also just importing the functions that I'm using, but the result is always the same. AR

[Matplotlib-users] plotting a contour map from CSV file

2008-07-14 Thread Tim Michelsen
Dear Matplotlib-Users, I am tryring to create a contour plot over a basemap. My main problem is creating the array for the Z values as a basis for the plt.contour command from a CSV file where latitude, longitude and value are stored column-wise: lat;lon;value 50; 10; 6 ... The

Re: [Matplotlib-users] plotting a contour map from CSV file

2008-07-14 Thread Jeff Whitaker
Tim Michelsen wrote: Dear Matplotlib-Users, I am tryring to create a contour plot over a basemap. My main problem is creating the array for the Z values as a basis for the plt.contour command from a CSV file where latitude, longitude and value are stored column-wise: lat; lon;value

Re: [Matplotlib-users] plotting a contour map from CSV file

2008-07-14 Thread Jeff Whitaker
Jeff Whitaker wrote: Tim Michelsen wrote: Dear Matplotlib-Users, I am tryring to create a contour plot over a basemap. My main problem is creating the array for the Z values as a basis for the plt.contour command from a CSV file where latitude, longitude and value are stored

Re: [Matplotlib-users] error with text object properties using matplotlib 0.98.1

2008-07-14 Thread Michael Droettboom
I'm surprised. That works for me. Can you (again) set verbose.level to debug-annoying and send the output? Cheers, Mike David M. Kaplan wrote: Hi, Thanks for the suggestions. I have stopped using the usetex option. To make math and normal text match, I tried the following:

Re: [Matplotlib-users] Axes.stem() doesn't draw stemlines if yscale is logarithmic

2008-07-14 Thread Michael Droettboom
This is a tricky one. It appears this bug also exists in 0.91.x, perhaps earlier as well, so it isn't a regression. I don't like the idea of setting the minimum to 1, especially for when the scale isn't log. Setting it to a really small positive value (like 1e-9) is better, but the

Re: [Matplotlib-users] plotting a contour map from CSV file

2008-07-14 Thread Tim Michelsen
Hello Jeff, - Points stored in the above descripbed format (lat, lon, value)? This one I solved using a m.scatter() function - Interpolate a grid of data points by using different interpolation methods like inverse distance wheighting, natural neighbor interpolation, etc. to get a

Re: [Matplotlib-users] Axes.stem() doesn't draw stemlines if yscale is logarithmic

2008-07-14 Thread Fabrice Silva
Le lundi 14 juillet 2008 à 09:08 -0400, Michael Droettboom a écrit : Do any other developers have better suggestions? We may have to do some magic in at drawing time (or convince the autoscaler to ignore the stem lines) -- but I'd like to find a way that minimizes additional complexity. Is

Re: [Matplotlib-users] plotting a contour map from CSV file

2008-07-14 Thread Jeff Whitaker
Tim Michelsen wrote: Hello Jeff, - Points stored in the above descripbed format (lat, lon, value)? This one I solved using a m.scatter() function - Interpolate a grid of data points by using different interpolation methods like inverse distance wheighting, natural

Re: [Matplotlib-users] import pylab produces rounding error

2008-07-14 Thread John Hunter
On Thu, Jul 10, 2008 at 6:42 AM, Angela Rivera Campos [EMAIL PROTECTED] wrote: Hi, I'm quite a newbie on matplotlib. I'm trying to get some data from a file. I've got a function that reads the data from the file and stores it in a tuple as a set of floats. When I use this without importing

[Matplotlib-users] RectangleSelector Feature Request

2008-07-14 Thread Ben Axelrod
The RectangleSelector has parameters for the min span in the x and y directions of the rectangle. The units of these are the axes units. It would be nice if there was an additional similar min size requirement, but in units of pixels. This way it would be independent of the axes scale.

Re: [Matplotlib-users] plotting a contour map from CSV file

2008-07-14 Thread Tim Michelsen
Hello, thanks. I checked again from contour_demo.py of the basemap distribution. There lats, lons are uniquely monoton increasing from 0-360 and from -90 to 90. In my case data is written row-by-row: * increasing from lowest latitude western most longitude to easternmost longitude and then

Re: [Matplotlib-users] RectangleSelector Feature Request

2008-07-14 Thread John Hunter
On Mon, Jul 14, 2008 at 9:49 AM, Ben Axelrod [EMAIL PROTECTED] wrote: The RectangleSelector has parameters for the min span in the x and y directions of the rectangle. The units of these are the axes units. It would be nice if there was an additional similar min size requirement, but in

Re: [Matplotlib-users] plotting a contour map from CSV file

2008-07-14 Thread Jeff Whitaker
Tim Michelsen wrote: Hello, thanks. I checked again from contour_demo.py of the basemap distribution. There lats, lons are uniquely monoton increasing from 0-360 and from -90 to 90. In my case data is written row-by-row: * increasing from lowest latitude western most longitude to

[Matplotlib-users] displaying a legend from a different subplot

2008-07-14 Thread David Lonie
I have an application that has 2 subplots, and I'd like to use the second to display the legend for the first. For example, for subplots plot1 and plot2: plot1.plot((1,2,3,4), label='up', color = 'g') plot1.plot((4,3,2,1), label='down', color = 'b') plot2.legend(What can I put here to display a

Re: [Matplotlib-users] plotting a contour map from CSV file

2008-07-14 Thread Tim Michelsen
Hello Jeff, Timme: Here's one way to do it many thanks so far. I still have to inspect and improve my script. But at least your code lead me to some contourd surface. I will come back and tell if it worked. Unfortunately I cannot disclose the data nor the results because of copyright issues.

Re: [Matplotlib-users] twinx memory leak

2008-07-14 Thread Manuel Metz
Michael Droettboom wrote: Thanks for the report. So we can diagnose this, what version of matplotlib are you reporting this for? Also, you may be interested in the following FAQ (and the one following it): http://matplotlib.sourceforge.net/faq.html#LEAKS Hi, I tested this with the

Re: [Matplotlib-users] twinx memory leak

2008-07-14 Thread Manuel Metz
Michael Droettboom wrote: Which backend? GTK, GTKAgg, TK, but not with any backend without a window: Agg, Cairo, PS, PDF, SVG ... Cheers, Manuel Cheers, Mike Manuel Metz wrote: Michael Droettboom wrote: Thanks for the report. So we can diagnose this, what version of matplotlib

Re: [Matplotlib-users] twinx memory leak

2008-07-14 Thread Michael Droettboom
I can confirm this. Commenting out del Gcf.figs[num] in Gcf.destroy (in _pylab_helpers.py) also seems to resolve the leak. But I have no idea why, so I won't commit it just yet. I don't have much time to look deeper now. Does anyone (who probably understands figure management better than

Re: [Matplotlib-users] twinx memory leak

2008-07-14 Thread John Hunter
On Mon, Jul 14, 2008 at 3:05 PM, Michael Droettboom [EMAIL PROTECTED] wrote: I can confirm this. Commenting out del Gcf.figs[num] in Gcf.destroy (in _pylab_helpers.py) also seems to resolve the leak. But I have no idea why, so I won't commit it just yet. I don't have much time to look

Re: [Matplotlib-users] displaying a legend from a different subplot

2008-07-14 Thread Jae-Joon Lee
Hi, Try mylines = plot1.get_lines() plot2.legend(mylines, [p.get_label() for p in mylines]) When you call the legend method with two arguments, first argument is a list of lines and second argument is a list of labels. It does not seem to matter whether lines are from same axes. Hope this

Re: [Matplotlib-users] dynamically updated plots

2008-07-14 Thread Stephen George
Hi Lubos, Lubos Vrbka wrote: 1. Would it be possible to do only shallow copy of the arrays that are being plotted so that on redrawing the figure, chanes in the datasets would be picked up automatically? If not, is Line2D.set_data(...) the right approach? isn't this the way how the

Re: [Matplotlib-users] Fwd: Re: Autonomous display of image/plot/figure

2008-07-14 Thread Ryan May
I would think that the gtk mainloop would terminate when the window closes (which termination should propagate back up the stack), but apparently that doesn't happen. I'm not sure I'm following you at the moment. Are you calling show() once and closing the figure doesn't cause it to return?