Re: [Matplotlib-users] How to draw a specific country by basemap?

2011-02-09 Thread Eric Liang
On 01/27/2011 09:24 PM, Thomas Lecocq wrote: > Hi, > > Adding some extra work in the readshapefile method in your code allows > you to play with the region names etc,... > > I've just made a new tutorial script to show this : > > http://www.geophysique.be/2011/01/27/matplotlib-basemap-tutoria

[Matplotlib-users] Best way to set scales bounds to appropriate values

2011-02-09 Thread neurino
Hi, I'm a matplotlib newbie. An example is worth a thousand words: In [1]: matplotlib.__version__ Out[1]: '0.99.3' In [2]: a, b, x = np.zeros(10), np.ones(10), np.arange(10) In [3]: plot(x, a); plot(x, b) Well all I see is an empty plot with the two horizontal lines at y=0 and y=1 covered by t

[Matplotlib-users] No autoscaled and correctly tickered logarithmic y-axis after zoom

2011-02-09 Thread Thore Oltersdorf
Dear Matplotlib-Users. After changing the scaling from the y-axis from default to semilogy the tickers were not updated anymore automatically when a zoom is applied. Even after deep searches within the ticker API as well as the mail archive list I could not find an appropriate solution for this

[Matplotlib-users] Fancy labelling / tickering of isolines

2011-02-09 Thread Thore Oltersdorf
Dear Matplotlib-Users. I try to generate some 2d plot with dimension log10(p)-h from refprop. For the isolines (isentropes, isotherms, isochores etc.) I was successful but adding labels to these isolines were quite discouraging until now. Please have a view on the screenshot to have an idea of

[Matplotlib-users] Trouble with api example code 'watermark_image.py'

2011-02-09 Thread Thore Oltersdorf
Dear Developers of Matplotlib, at first thanks for this mightiest tool for graphical output from python data. I have encountered problems on trying the watermark feature as described at http://matplotlib.sourceforge.net/examples/api/watermark_image.html. When I invoke the script from a Enthoug

[Matplotlib-users] Trouble with api example code within watermark_image.py

2011-02-09 Thread Thore Oltersdorf
Dear Developers of Matplotlib, at first thanks for this mightiest tool for graphical output from python data. I have encountered problems on trying the watermark feature as described at http://matplotlib.sourceforge.net/examples/api/watermark_image.html. When I invoke the script from a Enthoug

[Matplotlib-users] Fail to try api example code 'watermark_image.py'

2011-02-09 Thread Thore Oltersdorf
Dear Developers of Matplotlib, at first thanks for this mightiest tool for graphical output from python data. I have encountered problems on trying the watermark feature as described at http://matplotlib.sourceforge.net/examples/api/watermark_image.html. When I invoke the script from a Enthoug

Re: [Matplotlib-users] Trouble with api example code within watermark_image.py

2011-02-09 Thread Thomas Lecocq
matplotlib.cbook documentation : http://matplotlib.sourceforge.net/api/cbook_api.html?highlight=matplotlib.cbook#matplotlib.cbook.get_sample_data matplotlib.cbook.get_sample_data(fname, asfileobj=True)¶ Check the cachedirectory ~/.matplotlib/sample_data for a sample_data file. If it does no

Re: [Matplotlib-users] Best way to set scales bounds to appropriate values

2011-02-09 Thread Thomas Lecocq
This will do : pyplot.xlim(-5,15) pyplot.ylim(-5,5) HTH. Thomas ** Thomas Lecocq Geologist Ph.D.Student (Seismology) Royal Observatory of Belgium ** Date: Wed, 9 Feb 2011 11:53:17 +0100 From: neur...@gmail.com To: matplotlib-users@lists.sourc

Re: [Matplotlib-users] Best way to set scales bounds to appropriate values

2011-02-09 Thread neurino
Well, not that automatic... I wonder why matplotlib takes care of settings limits on data but fails in a common situation so I'm forced to override it every time because I don't know in advance what data I get... Thanks anyway. Cheers neurino 2011/2/9 Thomas Lecocq > This will do : > > pyplo

Re: [Matplotlib-users] Best way to set scales bounds to appropriate values

2011-02-09 Thread Thomas Lecocq
Neurino I'm sure : 1° there must be a parameter in the default behaviour of the subplot to control taht 2° you can always set xlim( min(X)/2, max(X)/2 ) ... Thomas ** Thomas Lecocq Geologist Ph.D.Student (Seismology) Royal Observatory of Belgium **

[Matplotlib-users] Plotting multi-colored lines atop basemap instances

2011-02-09 Thread Bruce Ford
I am attempting to plot a line atop a basemap instance called "m". I can do this without a problem with: plot = m.plot(lon,lat,'r-') #lon and lat are lists However, I'd like to color the line based on a third list called "intensity." For instance, if the value of intensity between two points i

Re: [Matplotlib-users] Plotting multi-colored lines atop basemap instances

2011-02-09 Thread Thomas Lecocq
Bruce, From: br...@clearscienceinc.com Date: Wed, 9 Feb 2011 09:51:06 -0500 To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] Plotting multi-colored lines atop basemap instances I am attempting to plot a line atop a basemap instance called "m". I can do this without a

Re: [Matplotlib-users] Trouble with api example code within watermark_image.py

2011-02-09 Thread Thore Oltersdorf
Dear Thomas. Thanks again for your reply. I have tried your solution of putting the logo-file into the folder %HOME% on my Windows system. Actually what happened is that after invocation of the script the file vanished into the nowhere... I couldn't see any change in the error output otherwise I w

Re: [Matplotlib-users] Plotting multi-colored lines atop basemap instances

2011-02-09 Thread Jeff Whitaker
On 2/9/11 7:51 AM, Bruce Ford wrote: > I am attempting to plot a line atop a basemap instance called "m". I > can do this without a problem with: > > plot = m.plot(lon,lat,'r-') #lon and lat are lists > > However, I'd like to color the line based on a third list called > "intensity." For insta

Re: [Matplotlib-users] Best way to set scales bounds to appropriate values

2011-02-09 Thread Benjamin Root
On Wed, Feb 9, 2011 at 6:47 AM, neurino wrote: > Well, not that automatic... > > I wonder why matplotlib takes care of settings limits on data but fails in > a common situation so I'm forced to override it every time because I don't > know in advance what data I get... > > Thanks anyway. > > Chee

Re: [Matplotlib-users] Fancy labelling / tickering of isolines

2011-02-09 Thread Benjamin Root
On Wed, Feb 9, 2011 at 5:18 AM, Thore Oltersdorf < thore.oltersd...@ise.fraunhofer.de> wrote: > Dear Matplotlib-Users. > > I try to generate some 2d plot with dimension log10(p)-h from refprop. > For the isolines (isentropes, isotherms, isochores etc.) I was successful > but adding labels to these

Re: [Matplotlib-users] No autoscaled and correctly tickered logarithmic y-axis after zoom

2011-02-09 Thread Benjamin Root
On Wed, Feb 9, 2011 at 5:08 AM, Thore Oltersdorf < thore.oltersd...@ise.fraunhofer.de> wrote: > Dear Matplotlib-Users. > > After changing the scaling from the y-axis from default to semilogy the > tickers were not updated anymore automatically when a zoom is applied. > > Even after deep searches w

Re: [Matplotlib-users] No autoscaled and correctly tickered logarithmic y-axis after zoom

2011-02-09 Thread Benjamin Root
On Wed, Feb 9, 2011 at 1:17 PM, Thore Oltersdorf < thore.oltersd...@ise.fraunhofer.de> wrote: > Dear Benjamin. > > Attached you find the same graph as for the other problem regarding the > inline annotations. But now zoomed once to reproduce the correctly scaled > x-axis but not autoscaled y-axis.

[Matplotlib-users] Stair plot

2011-02-09 Thread Alejandro Weinstein
Hi: Any suggestion for making a stair plot in Matplotlib (like the stairs function in Matlab)? The attached figure is the output of the following Matlab commands: x = 0:10; stairs(x); I guess it is a matter of using a zero-order hold interpolation rather than linear interpolation between the po

Re: [Matplotlib-users] Stair plot

2011-02-09 Thread Alan G Isaac
You could use econpy's step_pts function: http://code.google.com/p/econpy/source/browse/trunk/pytrix/pytrix.py fwiw, Alan Isaac -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory

Re: [Matplotlib-users] Stair plot

2011-02-09 Thread Paul Ivanov
Alejandro Weinstein, on 2011-02-09 13:01, wrote: > Hi: > > Any suggestion for making a stair plot in Matplotlib (like the stairs > function in Matlab)? > > The attached figure is the output of the following Matlab commands: > > x = 0:10; > stairs(x); > > I guess it is a matter of using a zero-

[Matplotlib-users] There is no plot in the PNG file. The PDF file is fine.

2011-02-09 Thread Curiouslearn
Can you please see the code below and let me know why the png figure comes out empty (it only contains the x-axis, does not contain the scatterplot). The pdf file has no such problems. I have tried saving another usual line plot in .png format and I had no problems. Does this have to do with scatt

[Matplotlib-users] Update individual elements (i.e an artist) for drawing

2011-02-09 Thread Aman Thakral
Hi, I was just wondering, how would I go about redrawing only a single element (i.e. an artist)? I know that matplotlib.artist.Artist has a draw() method that accepts a renderer as the argument. I tried something along the lines of: renderer = fig.canvas.get_renderer() title = ax.set_title("This

Re: [Matplotlib-users] Plotting multi-colored lines atop basemap instances

2011-02-09 Thread Bruce Ford
I brute-forced this another way by dealing the arrays I had created. Thanks for the suggestions! --- Bruce W. Ford Clear Science, Inc. On Wed, Feb 9, 2011 at 10:30 AM, Jeff Whitaker wrote: > On 2/9/11 7:51 AM, Bruce Ford wrote: > > I am attempting to plot

[Matplotlib-users] m.pcolor: shade a grid based on value

2011-02-09 Thread Michael Rawlins
I'm trying to shade grids below a certain threshold a certain color. Using m.pcolor. Also would like to know more about how the routine I've been given, and am using using, (below) works. I'm fairly new to matplotlib so thanks for the help. Looks like array is filled in these lines: thevar='m

Re: [Matplotlib-users] Trouble with imshow

2011-02-09 Thread Benjamin Root
On Wed, Feb 9, 2011 at 1:50 AM, Eric Firing wrote: > On 02/08/2011 02:39 PM, Christoph Gohlke wrote: > > > > > > > Please consider the attached patch for the _image.frombyte function. It > > avoids temporary copies in case of non-contiguous input arrays. Copying > > a 1024x1024 slice out of a con

Re: [Matplotlib-users] There is no plot in the PNG file. The PDF file is fine.

2011-02-09 Thread Goyo
2011/2/9 Curiouslearn > > Can you please see the code below and let me know why the png figure > comes out empty (it only contains the x-axis, does not contain the > scatterplot). The pdf file has no such problems. Seems like mpl is getting confused because of the rect argument of add_axes. Note

[Matplotlib-users] memory usage with repeated imshow

2011-02-09 Thread Tom Dimiduk
I am using matplotlib pylab in association with ipython -pylab to show many large (~2000x2000 or larger) images. Each time I show another image it consumes more memory until eventually exhausting all system memory and making my whole system unresponsive. The easiest way to replicate this behav

Re: [Matplotlib-users] Trouble with imshow

2011-02-09 Thread Benjamin Root
On Wed, Feb 9, 2011 at 1:50 AM, Eric Firing wrote: > On 02/08/2011 02:39 PM, Christoph Gohlke wrote: > > > > > > > Please consider the attached patch for the _image.frombyte function. It > > avoids temporary copies in case of non-contiguous input arrays. Copying > > a 1024x1024 slice out of a con

Re: [Matplotlib-users] memory usage with repeated imshow

2011-02-09 Thread Robert Abiad
Tom, I just went through this, though with version 1.01 of mpl, so it may be different. You can read the very long thread at: http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg20031.html Those who maintain mpl don't think there is a memory leak. What I found was that imsh

Re: [Matplotlib-users] Trouble with imshow

2011-02-09 Thread Eric Firing
On 02/09/2011 12:36 PM, Benjamin Root wrote: > On Wed, Feb 9, 2011 at 1:50 AM, Eric Firing > wrote: > > On 02/08/2011 02:39 PM, Christoph Gohlke wrote: > > > > > > > Please consider the attached patch for the _image.frombyte > function. It > >

Re: [Matplotlib-users] Trouble with imshow

2011-02-09 Thread Eric Firing
On 02/09/2011 02:29 PM, Benjamin Root wrote: > On Wed, Feb 9, 2011 at 1:50 AM, Eric Firing > wrote: > > On 02/08/2011 02:39 PM, Christoph Gohlke wrote: > > > > > > > Please consider the attached patch for the _image.frombyte > function. It > >

Re: [Matplotlib-users] Trouble with imshow

2011-02-09 Thread Christoph Gohlke
On 2/9/2011 4:29 PM, Benjamin Root wrote: On Wed, Feb 9, 2011 at 1:50 AM, Eric Firing mailto:efir...@hawaii.edu>> wrote: On 02/08/2011 02:39 PM, Christoph Gohlke wrote: > > > Please consider the attached patch for the _image.frombyte function. It > avoids temporary c

Re: [Matplotlib-users] Trouble with imshow

2011-02-09 Thread Eric Firing
On 02/09/2011 02:29 PM, Benjamin Root wrote: > > Bug Report: > > At some point between the recent revision and r8934, setting the alpha > value to anythhing but None will cause the image to not show. I suspect > it has something to do with some of the recent revisions. Maybe the > alpha values w

[Matplotlib-users] [matplotlib]problem

2011-02-09 Thread Jorgos Castello
Dear Reader, I am a student at university and I was trying to install your Matplotlib library. Well, I tried and failed ! Google&Co and your homepage couldn't help me anymore. First, my system is MacOS X SnowLeopard 10.6.6 / installed Python 2.7.1 ( not Apple Python ) / installed NumPy 1.5.1 / i

Re: [Matplotlib-users] Trouble with imshow

2011-02-09 Thread Benjamin Root
On Wed, Feb 9, 2011 at 7:22 PM, Eric Firing wrote: > On 02/09/2011 02:29 PM, Benjamin Root wrote: > > > > > Bug Report: > > > > At some point between the recent revision and r8934, setting the alpha > > value to anythhing but None will cause the image to not show. I suspect > > it has something

Re: [Matplotlib-users] [matplotlib]problem

2011-02-09 Thread Paul Ivanov
Jorgos Castello, on 2011-02-10 02:52, wrote: > First, my system is MacOS X SnowLeopard 10.6.6 / installed Python 2.7.1 ( not > Apple Python ) / installed NumPy 1.5.1 / installed SciPy 0.9.0rc1/ installed > matplotlib-1.0.1-python.org-32bit-py2.7-macosx10.3.dmg > > Second, I tried to figure out