[Matplotlib-users] does mpl.canvas has a flag needsdrawing?

2009-09-18 Thread Werner F. Bruhin
I have multiple canvas and sometimes one or more might have nothing to draw (no data). Currently I just call. canvas.draw() canvas.Refresh() for each of the canvas, but this gives me an error if there is no data. Is there a built-in flag I can check before calling draw? Or do I have to keep

Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?

2009-09-18 Thread John Hunter
On Thu, Sep 17, 2009 at 8:34 PM, Reckoner recko...@gmail.com wrote: thanks. does this mean that http://www.scipy.org/Cookbook/Matplotlib/mplot3D is out of date? Yes, it needs to be updated -- best would just be to remove the contents there and point to the mplot3d on the mpl website. Can

Re: [Matplotlib-users] does mpl.canvas has a flag needsdrawing?

2009-09-18 Thread John Hunter
On Fri, Sep 18, 2009 at 4:39 AM, Werner F. Bruhin werner.bru...@free.fr wrote: I have multiple canvas and sometimes one or more might have nothing to draw (no data). Currently I just call. canvas.draw() canvas.Refresh() for each of the canvas, but this gives me an error if there is no

Re: [Matplotlib-users] violin plots

2009-09-18 Thread John Hunter
On Thu, Sep 17, 2009 at 11:28 PM, Andrew Straw straw...@astraw.com wrote: Flávio Coelho has implemented Violin plots for MPL. Nice! He has a question regarding its suitability for inclusion due to a dependency on scipy for the gaussian_kde function.

Re: [Matplotlib-users] does mpl.canvas has a flag needsdrawing?

2009-09-18 Thread John Hunter
We want a complete, free standing example that exposes the bug, with any additional info like mpl backend and version number. On Sep 18, 2009, at 7:43 AM, Werner F. Bruhin werner.bru...@free.fr wrote: John, John Hunter wrote: On Fri, Sep 18, 2009 at 4:39 AM, Werner F. Bruhin

Re: [Matplotlib-users] does mpl.canvas has a flag needsdrawing?

2009-09-18 Thread Werner F. Bruhin
John, John Hunter wrote: On Fri, Sep 18, 2009 at 4:39 AM, Werner F. Bruhin werner.bru...@free.fr wrote: I have multiple canvas and sometimes one or more might have nothing to draw (no data). Currently I just call. canvas.draw() canvas.Refresh() for each of the canvas, but this

Re: [Matplotlib-users] does mpl.canvas has a flag needsdrawing?

2009-09-18 Thread Werner F. Bruhin
John Hunter wrote: We want a complete, free standing example that exposes the bug, with any additional info like mpl backend and version number. matplotlib: 0.99.0 wx.Python: 2.8.10.1 (unicode on Win Vista) Python 2.5.4 If I comment line 78 then the exception goes away. The attached code

Re: [Matplotlib-users] does mpl.canvas has a flag needsdrawing?

2009-09-18 Thread John Hunter
On Fri, Sep 18, 2009 at 8:15 AM, Werner F. Bruhin werner.bru...@free.fr wrote: John Hunter wrote: We want a complete, free standing example that exposes the bug, with any additional info like mpl backend and version number. Thanks -- when posting a bug, please consider taking the time to make

[Matplotlib-users] Contouring on triangular grids

2009-09-18 Thread Ian Thomas
I've written some code to perform contouring on triangular grids. I wrote the underlying C++ for a separate project, but as there has been some interest on the mpl mailing lists for such functionality I've had a go at wrapping it up as a python module so that it is available from mpl. I've also

Re: [Matplotlib-users] Polar plots rendered incorrectly in SVG

2009-09-18 Thread Bartosz Telenczuk
Dear Jae-Joon, Your workaround worked perfectly! Thanks a lot! Cheers, Bartosz -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year.

Re: [Matplotlib-users] does mpl.canvas has a flag needsdrawing?

2009-09-18 Thread Jae-Joon Lee
My guess is that the error happens when the matplotlib tries to format the date ticklabels when the xlim is not correctly set, i.e., [0, 1] in the example. But, I'm not sure what is the best approach here. Werner, if there is nothing to draw (i,e, xlim is [0,1]), change the xlim to some arbitrary

Re: [Matplotlib-users] Contouring on triangular grids

2009-09-18 Thread Andrew Straw
Ian Thomas wrote: I've written some code to perform contouring on triangular grids. I wrote the underlying C++ for a separate project, but as there has been some interest on the mpl mailing lists for such functionality I've had a go at wrapping it up as a python module so that it is available

Re: [Matplotlib-users] Contouring on triangular grids

2009-09-18 Thread Christopher Barker
Andrew Straw wrote: Thanks for this. Yes, indeed. It looks like nice stuff! I do encourage you to keep up the good work on this (the only thing I notice is the need for some more docs). I also encourage you to keep the contour generating code separate from anything matplotlib specific. I,

Re: [Matplotlib-users] saving an axes to draw in a different figure

2009-09-18 Thread Jae-Joon Lee
I don't think your approach will work in general. When you move an axes from one figure to the other, you have to update the transform attributes of all the artists, which, I think, could be tricky to do for general cases. On Thu, Sep 17, 2009 at 1:59 PM, jason-s...@creativetrax.com wrote:

Re: [Matplotlib-users] saving an axes to draw in a different figure

2009-09-18 Thread John Hunter
On Fri, Sep 18, 2009 at 11:44 AM, Jae-Joon Lee lee.j.j...@gmail.com wrote: I don't think your approach will work in general. When you move an axes from one figure to the other, you have to update the transform attributes of all the artists, which, I think, could be tricky to do for general

Re: [Matplotlib-users] does mpl.canvas has a flag needsdrawing?

2009-09-18 Thread Werner F. Bruhin
Hi Jae-Joon, Jae-Joon Lee wrote: My guess is that the error happens when the matplotlib tries to format the date ticklabels when the xlim is not correctly set, i.e., [0, 1] in the example. But, I'm not sure what is the best approach here. Werner, if there is nothing to draw (i,e, xlim is

Re: [Matplotlib-users] saving an axes to draw in a different figure

2009-09-18 Thread jason-sage
John Hunter wrote: On Fri, Sep 18, 2009 at 11:44 AM, Jae-Joon Lee lee.j.j...@gmail.com wrote: I don't think your approach will work in general. When you move an axes from one figure to the other, you have to update the transform attributes of all the artists, which, I think, could be

Re: [Matplotlib-users] matshow

2009-09-18 Thread Jae-Joon Lee
On Thu, Sep 17, 2009 at 2:49 AM, Bala subramanian bala.biophys...@gmail.com wrote: Friends, I have a matrix data and i used matshow() function to plot. The plot is attached. 1) After plotting the data, i used xticks() function to change the x-axis tick labels from x1 to x12 ( figure

[Matplotlib-users] matplotlib crashing on WxAgg backend

2009-09-18 Thread Jeff Peery
hello, have an error occuring that causes my app to crash. I found a few other email listings similar to my problem, but there were no responses that I could learn from.   I am quickly plotting an array as it grows. I have a wxframe, canvas, figure and an axes. I clear the axes, plot the

Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?

2009-09-18 Thread Reckoner
if you're asking me, I don't have write access to this website. Thanks again. On Fri, Sep 18, 2009 at 4:45 AM, John Hunter jdh2...@gmail.com wrote: On Thu, Sep 17, 2009 at 8:34 PM, Reckoner recko...@gmail.com wrote: thanks. does this mean that http://www.scipy.org/Cookbook/Matplotlib/mplot3D

Re: [Matplotlib-users] [xpyx] Re: axes3d material in matplotlib-0.99.0.win32-py2.5 missing?

2009-09-18 Thread John Hunter
On Fri, Sep 18, 2009 at 4:00 PM, Philip Austin paus...@eos.ubc.ca wrote: Reckoner wrote: if you're asking me, I don't have write access to this website. See http://www.scipy.org/UserPreferences to create a wiki account -- best, Phil I was asking you -- let me know if you are unable to do it

[Matplotlib-users] How to plot saved plot data in a new figure?

2009-09-18 Thread Michael McNeil Forbes
Hi, Is there a standard way to compute first and then plot something later? For example, I would like to generate a fine contour plot, then use it as a background later. x = np.linspace(-1,1,1000) X,Y = np.meshgrid(x,x) Z = ((X*X + Y*Y) - 0.5)**2 + Y**2 contours = plt.contour(X,Y,Z,100) #

[Matplotlib-users] pyplot.show

2009-09-18 Thread Thomas Hrabe
Hi all, I am a beginner with matplotlib and doing my first steps with python plotting. However, I learned that pyplot.show really forces the display of already existing plots. For instance, when I type In[2]: pyplot.plot([1,2,3]) Out[2]: [matplotlib.lines.Line2D object at 0x2e33850] nothing

Re: [Matplotlib-users] pyplot.show

2009-09-18 Thread sunqiang
may be you can try pyplot.ion()? it turns interactive mode on. Hope this helps. On Sat, Sep 19, 2009 at 1:11 PM, Thomas Hrabe thr...@gmail.com wrote: Hi all, I am a beginner with matplotlib and doing my first steps with python plotting. However, I learned that pyplot.show really forces the

Re: [Matplotlib-users] pyplot.show

2009-09-18 Thread Thomas Hrabe
Hi, thank you for the quick reply. Unfortunately, none of both works for me. values = [1,2,3]; pyplot.ioff(); #pyplot.ion(); print pyplot.isinteractive(); pyplot.plot(values); pyplot.show(); The value (True|False) of interactive mode does not make a difference to the plotting. Other

Re: [Matplotlib-users] pyplot.show

2009-09-18 Thread Gökhan Sever
Running IPython with -pylab or specifying the threading option? See more at http://ipython.scipy.org/doc/stable/html/interactive/reference.html?highlight=pylab On Sat, Sep 19, 2009 at 12:42 AM, Thomas Hrabe thr...@gmail.com wrote: Hi, thank you for the quick reply. Unfortunately, none of