Re: [Matplotlib-users] pyplot.show

2009-09-18 Thread Thomas Hrabe
starting with ipython -pylab solves it... thanks for the help! Thomas Hrabe 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 display of already > existing plots. > > For instanc

Re: [Matplotlib-users] pyplot.show

2009-09-18 Thread sunqiang
oops, maybe use pyplot.ion() not pyplot.ioff(). and pyplot.show() is not needed. just pyplot.plot(values) is enough to launch a new figure window and you can continue plot new lines or legend... interactively. I test it on my pc: Windows XP, Python 2.5.4, Matplotlib 0.99.0. On Sat, Sep 19, 2009 a

Re: [Matplotlib-users] Bug in demean

2009-09-18 Thread Eric Firing
Keith Goodman wrote: > Robert Kern recently noticed a bug in demean. The bug and the fix is here: > > http://mail.scipy.org/pipermail/numpy-discussion/2009-August/06.html > Fixed. Thank you for pointing this out. Eric > -

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 wrote: > > Hi, > > thank you for the quick reply. Unfortunately, none of both works fo

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 su

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 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 display of

[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]: [] nothing happens until I type In[3]: pyplot.show()

[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) # T

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 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 and one of

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

2009-09-18 Thread Philip Austin
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 -- Come build with us! The BlackBerry® Developer Conferenc

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 wrote: > On Thu, Sep 17, 2009 at 8:34 PM, Reckoner wrote: >> thanks. does this mean that >> >> http://www.scipy.org/Cookbook/Matplotlib/mplot3D >> >> is out of date? > > Ye

[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 array,

Re: [Matplotlib-users] matshow

2009-09-18 Thread Jae-Joon Lee
On Thu, Sep 17, 2009 at 2:49 AM, Bala subramanian 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 attached). Similarly I wan

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 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 fo

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 John Hunter
On Fri, Sep 18, 2009 at 11:44 AM, Jae-Joon Lee 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 cases. I agree that

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, wrote: > I'm trying to draw the axes f

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, fo

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 availab

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] 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 BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart y

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

2009-09-18 Thread Werner F. Bruhin
John Hunter wrote: > On Fri, Sep 18, 2009 at 8:15 AM, Werner F. Bruhin > 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, ple

[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 add

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 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 a *minimal* ex

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 does

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" wrote: > John, > > John Hunter wrote: >> On Fri, Sep 18, 2009 at 4:39 AM, Werner F. Bruhin > > wrote: >> >>> I have

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 > 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 give

Re: [Matplotlib-users] violin plots

2009-09-18 Thread John Hunter
On Thu, Sep 17, 2009 at 11:28 PM, Andrew Straw 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. > http://pyinsci.blogspot.com/2009/09/violin-plot-with-matplot

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 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 data. > > Is the

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 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 you do this for

[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