Re: [Matplotlib-users] interactive plots in ipython -pylab are delayed until ipython prompt

2010-07-09 Thread John Hunter
On Fri, Jul 9, 2010 at 9:52 PM, bdb112 wrote: > python or ipython. See version numbers at end. > > > > import time > # Note - this version is meant to be pasted! > > print('When pasted in to ipython -pylab, the plot should appear immediately, > ' >      ' then the ipython prompt after sleep(2): b

[Matplotlib-users] interactive plots in ipython -pylab are delayed until ipython prompt

2010-07-09 Thread bdb112
I have successfully used ipython -pylab under w32 python, but under the builtin ipython under ubuntu 9 and 10, the graphics display thread seems to block until the ipython command line - as if the threading (internal to ipython etc) is not happening. For example if the following is pasted in, the

Re: [Matplotlib-users] No color scaling when using plot_surface. Please help

2010-07-09 Thread Benjamin Root
Jeremy, I believe that 0.99.1 is fairly old. I don't know when Axes3D came along, but I am sure you can find it in 0.99.3. It is most definitely in 1.0, but you might not need to go that far if your distro does not provide it. Ben Root On Fri, Jul 9, 2010 at 4:50 PM, Jeremy Conlin wrote: > O

Re: [Matplotlib-users] Problems with pygtk and matplotlib

2010-07-09 Thread John Hunter
On Fri, Jul 9, 2010 at 3:10 PM, Preben Randhol wrote: > I'm trying to plot several subplots. I have setup a scrollwidget and > viewport and I pack a canvas into a vbox in the viewport. > > Problem is that when I scroll, either some of the subplots are missing, > or I get an error when I try to zo

Re: [Matplotlib-users] Problems with pygtk and matplotlib

2010-07-09 Thread John Hunter
On Fri, Jul 9, 2010 at 3:10 PM, Preben Randhol wrote: > Hi > > I'm trying to plot several subplots. I have setup a scrollwidget and > viewport and I pack a canvas into a vbox in the viewport. > > Problem is that when I scroll, either some of the subplots are missing, > or I get an error when I try

Re: [Matplotlib-users] No color scaling when using plot_surface. Please help

2010-07-09 Thread Jeremy Conlin
On Thu, Jul 8, 2010 at 8:41 AM, Jeremy Conlin wrote: > On Sun, Jul 4, 2010 at 8:38 PM, Benjamin Root wrote: >> Jeremy, >> >> The pcolor function can take a vmin and a vmax parameter if you wish to >> control the colorscaling.  In addition, you can use a special array >> structure called a "masked

[Matplotlib-users] Problems with pygtk and matplotlib

2010-07-09 Thread Preben Randhol
Hi I'm trying to plot several subplots. I have setup a scrollwidget and viewport and I pack a canvas into a vbox in the viewport. Problem is that when I scroll, either some of the subplots are missing, or I get an error when I try to zoom on a graph that argument is not a gdk.gtk.image (or someth

Re: [Matplotlib-users] update an existing contour plot with new data

2010-07-09 Thread Ryan May
On Fri, Jul 9, 2010 at 10:49 AM, Johannes Röhrs wrote: > > > Thanks a lot, this solutions seems to serve my purpose. A new method > C.remove() would of course be even better. > > One could say the problem is solved, but why does there no method exist to > update a contour plot as there is for ma

Re: [Matplotlib-users] update an existing contour plot with new data

2010-07-09 Thread Johannes Röhrs
Thanks a lot, this solutions seems to serve my purpose. A new method C.remove() would of course be even better. One could say the problem is solved, but why does there no method exist to update a contour plot as there is for many other plot routines, i.e. set_xdata/set_ydata for plot set_data

Re: [Matplotlib-users] update an existing contour plot with new data

2010-07-09 Thread Ryan May
On Fri, Jul 9, 2010 at 6:28 AM, Johannes Röhrs wrote: > I have some troubles updating a contour plot. I reduced my code to a simple > example to reproduce the problem: > > [code] > from pylab * > import scipy as sp > > x=sp.arange(0,2*sp.pi,0.1) > X,Y=sp.meshgrid(x,x) > f1=sp.sin(X)+sp.sin(Y) > f

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread Robert Kern
On 7/9/10 10:31 AM, per freem wrote: > Also, I am not sure how to use alan's code. > > If I try: > > ec = empirical_cdf(my_data) > plt.plot(ec) > > it doesn't actually look like a cdf Make sure my_data is sorted first. plt.plot(my_data, ec) You probably want to use one of the "steps" linestyles;

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread per freem
Also, I am not sure how to use alan's code. If I try: ec = empirical_cdf(my_data) plt.plot(ec) it doesn't actually look like a cdf On Fri, Jul 9, 2010 at 10:17 AM, per freem wrote: > How does Alan's code compare with using cumfreq and then plotting its > result?  Is the only difference that cu

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread per freem
How does Alan's code compare with using cumfreq and then plotting its result? Is the only difference that cumfreq bins the data? On Fri, Jul 9, 2010 at 10:12 AM, Robert Kern wrote: > On 7/9/10 10:02 AM, per freem wrote: >> I'd like to clarify: I want the empirical cdf, but I want it to be >> nor

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread Robert Kern
On 7/9/10 10:02 AM, per freem wrote: > I'd like to clarify: I want the empirical cdf, but I want it to be > normalized. There's a normed=True option to plt.hist but how can I do > the equivalent for CDFs? There is no such thing as a normalized empirical CDF. Or rather, there is no such thing as

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread per freem
I'd like to clarify: I want the empirical cdf, but I want it to be normalized. There's a normed=True option to plt.hist but how can I do the equivalent for CDFs? On Fri, Jul 9, 2010 at 9:14 AM, Alan G Isaac wrote: > On 7/9/2010 12:02 AM, per freem wrote: >>  How can I plot the empirical CDF of a

[Matplotlib-users] anumated plot with autscaling axises

2010-07-09 Thread aliko
Good day! Could You please tell me how can I get axises autoscaling in the animated plot example. I've take an example and have modifyed it slightly so the second line in plot gets out of bounding box during animation. What I need is autoscaling of axises during animation. Please point mee what

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread Alan G Isaac
On 7/9/2010 12:02 AM, per freem wrote: > How can I plot the empirical CDF of an array of numbers in matplotlib > in Python? I recalled David Huard posted the below, which apparently was once in the sandbox... hth, Alan Isaac def empiricalcdf(data, method='Hazen'): """Return the empirical

Re: [Matplotlib-users] problem importing pyplot/pylab on mac os x 10.4.11

2010-07-09 Thread John Hunter
On Fri, Jul 9, 2010 at 7:25 AM, Karianne Holhjem wrote: > Regarding numpy - what you say is intersting. I couldn't find any such > problems in my google-searches. I am running version 1.2.1: > [karianneholhjem:/] karianne% python -c 'import numpy; print > numpy.__version__' > 1.2.1 Can you try

Re: [Matplotlib-users] problem importing pyplot/pylab on mac os x 10.4.11

2010-07-09 Thread Karianne Holhjem
Hi, I changed the script to what you suggested and this is the output: [karianneholhjem:~] karianne% python bla.py --verbose-helpful $HOME=/Users/karianne CONFIGDIR=/Users/karianne/.matplotlib matplotlib data path /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matpl

[Matplotlib-users] update an existing contour plot with new data

2010-07-09 Thread Johannes Röhrs
Hi, I have some troubles updating a contour plot. I reduced my code to a simple example to reproduce the problem: [code] from pylab * import scipy as sp x=sp.arange(0,2*sp.pi,0.1) X,Y=sp.meshgrid(x,x) f1=sp.sin(X)+sp.sin(Y) f2=sp.cos(X)+sp.cos(Y) figure() C=contourf(f1) show() C.set_array(f2

[Matplotlib-users] Scale legend box border, dashed and dotted lines when the figure size is changed

2010-07-09 Thread Janne Blomqvist
Hi, I posted this to stackoverflow (http://stackoverflow.com/questions/3190798/scale-legend-box-border-dashed-and-dotted-lines-when-the-figure-size-is-changed), but didn't get any answer, so here goes again: I'm trying to use matplotlib to prepare some figures for publication. In order to make th

[Matplotlib-users] Python 2.7 binaries for 64 bit OSX

2010-07-09 Thread Pim Schellart
Dear Matplotlib developers, first of all my congratulations with the excellent 1.0 release, great work! I currently use a custom compiled 64 bit version of Python 2.6. But I would like to switch to the prebuild binaries for Python 2.7 as soon as possible. Are there any plans for supplying matplot

Re: [Matplotlib-users] how to plot the empirical cdf of an array?

2010-07-09 Thread Matthias Michler
On Friday July 9 2010 06:02:58 per freem wrote: > How can I plot the empirical CDF of an array of numbers in matplotlib > in Python? I'm looking for the cdf analog of pylab's "hist" function. > > One thing I can think of is: > > from scipy.stats import cumfreq > a = array([...]) # my array of num

Re: [Matplotlib-users] ValueError

2010-07-09 Thread Matthias Michler
On Friday July 9 2010 00:06:05 Shir J. Livne wrote: > Hello, > > I keep getting the error "ValueError: Need more than 1 value to unpack" > every time I try to use the line ax.plot_wireframe(myArray[:,0], > myArray[:,1], myArray[:,2]) > > What does that error mean? Hi Shir, I think you used 1d-a