Re: [Matplotlib-users] re freshing plot in loop

2008-10-23 Thread joschu
I wasn't aware of those examples. I tried the first one and again it didn't refresh. I was able to get things working by switching my backend to Tcl. Previously I was using wxpython, and I think there was a problem in the installation. efiring wrote: > > joschu wrote: >> My program runs throu

Re: [Matplotlib-users] imread() and binary PNGs

2008-10-23 Thread Joshua Lippai
Actually, I should clarify something. The way imread is set up, since the file is a PNG, it never goes through pil_to_array at all in standard imread and instead gets passed to the handler _png.read_png. Anyway, I'll take a closer peek inside the _png.cpp file once I get some more time. Josh On T

Re: [Matplotlib-users] imread() and binary PNGs

2008-10-23 Thread Joshua Lippai
David, After playing around with this file and the various elements of image.py, I've determined that the pil_to_array function in matplotlib.image works just fine, so the place where the problem is introduced in imread is the read_png function in matplotlib._png. So a simpler work-around for this

Re: [Matplotlib-users] imread() and binary PNGs

2008-10-23 Thread David Warde-Farley
On 23-Oct-08, at 4:43 PM, David Warde-Farley wrote: > Sure; see http://morrislab.med.utoronto.ca/~dwf/bin.png > > In [12]: x = imread('bin.png'); imshow(x) > > produces a colourful plot that bears no resemblance to the original. Two other things: a) PIL can read in these without incide

Re: [Matplotlib-users] imread() and binary PNGs

2008-10-23 Thread David Warde-Farley
On 23-Oct-08, at 8:50 AM, Michael Droettboom wrote: > I'm not aware of that problem. It should convert any PNG implicitly > to our native RGBA format. Can you provide a PNG file that > illustrates the breakage? Sure; see http://morrislab.med.utoronto.ca/~dwf/bin.png In [12]: x = imread('b

Re: [Matplotlib-users] re freshing plot in loop

2008-10-23 Thread Eric Firing
joschu wrote: > My program runs through a loop and is supposed to re-plot the graph after > each step (which includes a pause of 1 second). I can't get the plot to > refresh. I wrote the following simple program which has the same problem. I > tried both draw() nor f.canvas.draw() works. I'm runni

Re: [Matplotlib-users] Quiver plot of masked array

2008-10-23 Thread Eric Firing
Jesper Larsen wrote: > Hi mpl users, > > I get some strange results when I make a quiver plot of a masked > array. This script: > > from numpy.ma import zeros, masked_values > from pylab import quiver, savefig > a = masked_values(zeros((5,5)), 0) > quiver(a,a) > savefig('test.png') > > gives me

Re: [Matplotlib-users] GUI neutral animation example doesn't work with WxAgg/Wx

2008-10-23 Thread Tony S Yu
On Oct 23, 2008, at 12:00 PM, John Hunter wrote: > On Thu, Oct 23, 2008 at 10:30 AM, Tony S Yu <[EMAIL PROTECTED]> wrote: >> The GUI neutral animation example from the SciPy cookbook doesn't >> seem >> to work for Wx or WxAgg backends. A plot window opens but nothing >> happens. It appears to b

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread Ryan May
Michael Droettboom wrote: > Ryan May wrote: >> John Hunter wrote: >>> Yes, but it's pretty easy. To build and update from the docs dir, I >>> just do >>> >>> python make.py html sf >>> I've pushed your changes out -- thanks! >>> >> >> Thanks. Now, did I do something wron

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread John Hunter
On Thu, Oct 23, 2008 at 11:44 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > It's probably just that John didn't rebuild matplotlib itself and then clean > before republishing the docs. Your change works for me locally. I think the trick is I also have to "touch" the pymods_api.rst doc. I

Re: [Matplotlib-users] basemap with Python26?

2008-10-23 Thread Yeates, Mathew C
yes, thats the problem. I need ssl Thx Mathew From: Jeff Whitaker [EMAIL PROTECTED] Sent: Thursday, October 23, 2008 10:01 AM To: Yeates, Mathew C Cc: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] basemap with Python26? Yeates, Mat

Re: [Matplotlib-users] basemap with Python26?

2008-10-23 Thread Jeff Whitaker
Yeates, Mathew C wrote: > Hi > I'm getting the traceback > > from mpl_toolkits.basemap import Basemap > > /home/myeates/lib/python2.6/site-packages/httplib2/__init__.py:44: > DeprecationWarning: the sha module is deprecated; use the hashlib module > instead > import sha >

Re: [Matplotlib-users] Savefig('file.pdf') error with latex custom font

2008-10-23 Thread Jouni K . Seppänen
"David Krapohl" <[EMAIL PROTECTED]> writes: >> >From your backtrace, it looks like dviread fails to parse a tfm file: >> >> > File "/usr/lib/python2.5/site-packages/matplotlib/dviread.py", line >> 398, >> > in __init__ >> > for char in range(0, max(tfm.width)) ] >> > ValueError: max() arg is

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread Michael Droettboom
Ryan May wrote: > John Hunter wrote: > >> On Thu, Oct 23, 2008 at 10:51 AM, Ryan May <[EMAIL PROTECTED]> wrote: >> >> >>> I've done it for barbs and I'll see if I notice anything else as time >>> allows. Obviously I'm biased towards certain functionality. :) I'm >>> guessing you guys have

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread Ryan May
John Hunter wrote: > On Thu, Oct 23, 2008 at 10:51 AM, Ryan May <[EMAIL PROTECTED]> wrote: > >> I've done it for barbs and I'll see if I notice anything else as time >> allows. Obviously I'm biased towards certain functionality. :) I'm >> guessing you guys have to do regenerate the docs and push

Re: [Matplotlib-users] interactive use?

2008-10-23 Thread beaubert
On Thursday 23 October 2008 15:51:53 Robin wrote: > Hi, > > I don't think this is possible - but I wanted to check in case I'm > missing something. > > Is there a way of changing the appearance of the plot interactively? > I'm thinking of things like dragging the position of a legend, right > click

[Matplotlib-users] re freshing plot in loop

2008-10-23 Thread joschu
My program runs through a loop and is supposed to re-plot the graph after each step (which includes a pause of 1 second). I can't get the plot to refresh. I wrote the following simple program which has the same problem. I tried both draw() nor f.canvas.draw() works. I'm running it from ipython -p

[Matplotlib-users] basemap with Python26?

2008-10-23 Thread Yeates, Mathew C
Hi I'm getting the traceback >>> from mpl_toolkits.basemap import Basemap /home/myeates/lib/python2.6/site-packages/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha Traceback (most recent call last): File "", line 1, in F

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread John Hunter
On Thu, Oct 23, 2008 at 10:51 AM, Ryan May <[EMAIL PROTECTED]> wrote: > I've done it for barbs and I'll see if I notice anything else as time > allows. Obviously I'm biased towards certain functionality. :) I'm > guessing you guys have to do regenerate the docs and push them somewhere > before a

Re: [Matplotlib-users] GUI neutral animation example doesn't work with WxAgg/Wx

2008-10-23 Thread John Hunter
On Thu, Oct 23, 2008 at 10:30 AM, Tony S Yu <[EMAIL PROTECTED]> wrote: > The GUI neutral animation example from the SciPy cookbook doesn't seem > to work for Wx or WxAgg backends. A plot window opens but nothing > happens. It appears to be some weird problem with ion on wx. > GUI neutral animation

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread Ryan May
John Hunter wrote: > On Thu, Oct 23, 2008 at 9:53 AM, Ryan May <[EMAIL PROTECTED]> wrote: >> I'll comment that the new site looks absolutely awesome. I've turned >> quite a few heads around here when I show people the new site and docs, >> especially the gallery. Great work guys! >> >> One questio

Re: [Matplotlib-users] Matplotlib-users Digest, Vol 29, Issue 48

2008-10-23 Thread Michael
On Thu, 2008-10-23 at 13:34 +, Thomas Guettler wrote: > Hi, > > I use the API of matplotlib and have a basic problem: > > Up to now I am used to gather my data into a list of tuples. But > matplotlib uses serveral lists instead. > > Example: > me: [(date1, count1), (date2, count2), ...] >

[Matplotlib-users] basemap with Python26

2008-10-23 Thread Mathew Yeates
Hi I'm getting the traceback >>> from mpl_toolkits.basemap import Basemap /home/myeates/lib/python2.6/site-packages/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha Traceback (most recent call last): File "", line 1, in Fi

[Matplotlib-users] GUI neutral animation example doesn't work with WxAgg/Wx

2008-10-23 Thread Tony S Yu
The GUI neutral animation example from the SciPy cookbook doesn't seem to work for Wx or WxAgg backends. A plot window opens but nothing happens. It appears to be some weird problem with ion on wx. For example, the following code will run and immediately close: >>> plt.ion() >>> plt.plot(x,

Re: [Matplotlib-users] list of tuples vs tuple of lists

2008-10-23 Thread Brent Pedersen
On Thu, Oct 23, 2008 at 6:35 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > You could use the (admittedly inscrutable) "unzip" technique: > > ax.plot_date(*zip(*items)) > > See this blog post for explanation: > > http://paddy3118.blogspot.com/2007/02/unzip-un-needed-in-python.html > > If you u

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread John Hunter
On Thu, Oct 23, 2008 at 9:53 AM, Ryan May <[EMAIL PROTECTED]> wrote: > I'll comment that the new site looks absolutely awesome. I've turned > quite a few heads around here when I show people the new site and docs, > especially the gallery. Great work guys! > > One question, how is the list of "plo

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread Ryan May
I'll comment that the new site looks absolutely awesome. I've turned quite a few heads around here when I show people the new site and docs, especially the gallery. Great work guys! One question, how is the list of "plotting commands" on the main page generated? Is it just the pyplot API? Right

Re: [Matplotlib-users] How to use the set_clip_path with the imshow function

2008-10-23 Thread Michael Droettboom
This has now been fixed in SVN. See the example/pylab_examples/image_clip_path.py for usage. Mike Federico Milano wrote: > Dear Mike, > > thanks a lot for the information. > > Best wishes, > > Federico > > > > Michael Droettboom wrote: > >> Unfortunately, clip paths are not implemented for t

[Matplotlib-users] interactive use?

2008-10-23 Thread Robin
Hi, I don't think this is possible - but I wanted to check in case I'm missing something. Is there a way of changing the appearance of the plot interactively? I'm thinking of things like dragging the position of a legend, right clicking to be able to insert a text box or access properties of the

Re: [Matplotlib-users] list of tuples vs tuple of lists

2008-10-23 Thread Michael Droettboom
You could use the (admittedly inscrutable) "unzip" technique: ax.plot_date(*zip(*items)) See this blog post for explanation: http://paddy3118.blogspot.com/2007/02/unzip-un-needed-in-python.html If you use Numpy arrays, of course, you could use slicing, which, IMHO, is clearer: items = numpy.a

Re: [Matplotlib-users] savefig to StringIO and import into PIL

2008-10-23 Thread Jesper Larsen
Hi Michael, 2008/10/22 Michael Droettboom <[EMAIL PROTECTED]>: > You need to "rewind" the StringIO cursor before opening with PIL: > > imgdata = StringIO.StringIO() > fig.savefig(imgdata, format='png') > imgdata.seek(0) > im = Image.open(imgdata) Thanks. It works fine now. Best regards, Jesper

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread Michael Droettboom
Fixed. These errors were all in new content. Any comments on the content? ... :) Xavier Gnata wrote: > ok. > It is way better now but still: > http://validator.w3.org/check?uri=http%3A%2F%2Fmatplotlib.sourceforge.net%2F&charset=(detect+automatically)&doctype=Inline&group=0 > > > > hum I should

[Matplotlib-users] list of tuples vs tuple of lists

2008-10-23 Thread Thomas Guettler
Hi, I use the API of matplotlib and have a basic problem: Up to now I am used to gather my data into a list of tuples. But matplotlib uses serveral lists instead. Example: me: [(date1, count1), (date2, count2), ...] matplotlib: ax.plot_date(dates, counts) Finally I use something like this q

Re: [Matplotlib-users] imread() and binary PNGs

2008-10-23 Thread Michael Droettboom
I'm not aware of that problem. It should convert any PNG implicitly to our native RGBA format. Can you provide a PNG file that illustrates the breakage? Mike David Warde-Farley wrote: > Howdy, > > I noticed that MPL's imread() command, when applied to binary (1-bit > grayscale) PNGs does so

[Matplotlib-users] Quiver plot of masked array

2008-10-23 Thread Jesper Larsen
Hi mpl users, I get some strange results when I make a quiver plot of a masked array. This script: from numpy.ma import zeros, masked_values from pylab import quiver, savefig a = masked_values(zeros((5,5)), 0) quiver(a,a) savefig('test.png') gives me a plot which has 25 horizontal arrows (althou

Re: [Matplotlib-users] dynamic basemap

2008-10-23 Thread Jeff Whitaker
John [H2O] wrote: > Hello, > > I'm creating a web application that will take user input from a javascript > map to give me bounding coordinates (i.e. urcrnrlat, urcrnrlon, llcrnrlat, > llcrnrlon) and possibly a switch for polar projection. Other than that I > have no further information. Which pro

Re: [Matplotlib-users] ANN: matplotlib website 1.0

2008-10-23 Thread Xavier Gnata
ok. It is way better now but still: http://validator.w3.org/check?uri=http%3A%2F%2Fmatplotlib.sourceforge.net%2F&charset=(detect+automatically)&doctype=Inline&group=0 hum I should spend some time on this because: http://validator.w3.org/check?uri=http%3A%2F%2Fmatplotlib.sourceforge.net%2Fgallery.h

[Matplotlib-users] imread() and binary PNGs

2008-10-23 Thread David Warde-Farley
Howdy, I noticed that MPL's imread() command, when applied to binary (1-bit grayscale) PNGs does some serious mangling. Anyone know what's going on, or is it just that only RGBA PNG's are supported? Thanks, David - Thi

Re: [Matplotlib-users] Savefig('file.pdf') error with latex custom font

2008-10-23 Thread David Krapohl
On Thu, Oct 23, 2008 at 7:04 AM, Jouni K. Seppänen <[EMAIL PROTECTED]> wrote: > "David Krapohl" <[EMAIL PROTECTED]> > writes: > > > I am getting an error with savefig and pdf when I try to used matplotlib > > with latex font rendering (attached below). In etc/matplotlibrc, I set > > text.latex.pre