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

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 numbers

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 karia...@astro.uni-bonn.de 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

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 cdf.

[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

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 alan.is...@gmail.com wrote: On 7/9/2010 12:02 AM, per freem wrote:  How can I plot the

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 an

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 robert.k...@gmail.com wrote: On 7/9/10 10:02 AM, per freem wrote: I'd like to clarify: I want the empirical cdf, but I

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 perfr...@gmail.com wrote: How does Alan's code compare with using cumfreq and then plotting its result?  Is the only

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; I'm not

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 johanne...@met.no 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)

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 10:49 AM, Johannes Röhrs johanne...@met.no 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

[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

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 jlcon...@gmail.com wrote: On Sun, Jul 4, 2010 at 8:38 PM, Benjamin Root ben.r...@ou.edu 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

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 rand...@pvv.org 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

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

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

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 boyd.blackw...@anu.edu.au 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