[Matplotlib-users] ValueError: The Cairo backend can not draw paths longer than 18980 points.

2014-07-13 Thread Tommy Carstensen
To matplotlib-users, When I do: cd basemap-1.0.7/examples python3 simpletest.py Then I get this error message: Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/backends/backend_gtk3cairo.py", line 32, in on_draw_ev

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-27 Thread surfcast23
Thank you for the help! Daπid wrote: > > On Sat, Jul 28, 2012 at 12:22 AM, surfcast23 wrote: >> Am I reading (bins[1]-bins[0]) correctly as taking the difference >> between >> what is in the second and first bin? > > Yes. I am multipliying the width of the bins by their total height. > Surely

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-27 Thread Daπid
On Sat, Jul 28, 2012 at 12:22 AM, surfcast23 wrote: > Am I reading (bins[1]-bins[0]) correctly as taking the difference between > what is in the second and first bin? Yes. I am multipliying the width of the bins by their total height. Surely there are cleaner and more general ways (say, when the

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-27 Thread surfcast23
That worked beautifully thank you! Am I reading (bins[1]-bins[0]) correctly as taking the difference between what is in the second and first bin? Daπid wrote: > > I guess it is showing, but you have many data points, so the gaussian > is too small down there. You have to increase its values t

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-27 Thread Daπid
I guess it is showing, but you have many data points, so the gaussian is too small down there. You have to increase its values to make both areas fit: plt.plot(bins, N*(bins[1]-bins[0])*y, 'r--', linewidth=1) And you will get a nice gaussian fitting your data. On Fri, Jul 27, 2012 at 11:12 PM,

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-27 Thread surfcast23
Thanks for catching that sigma was still a vector! I am no longer getting the errors, but the best fit line is not showing up.Is there something else I am missing ? BTW thanks for the heads up on the np.mean and np.standard functions. Khary Daπid wrote: > > On Fri, Jul 27, 2012 at 9:57 PM, su

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-27 Thread Daπid
On Fri, Jul 27, 2012 at 9:57 PM, surfcast23 wrote: > y = mlab.normpdf( nbins, avg, sigma) > l = plt.plot(nbins, y, 'r--', linewidth=1) > plt.show() You should not change bins there, as you are evaluating the gaussian function at different values. Also, sigma is a vector, but it should be an scal

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-27 Thread surfcast23
Just tried it with nbins set to 216 and I still get the error surfcast23 wrote: > > Hi David, > >I tried your fix > nbins = 20 > n, bins, patches = plt.hist(C, nbins, range=None, normed=False, > weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', > orientation='v

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-27 Thread surfcast23
Hi David, I tried your fix nbins = 20 n, bins, patches = plt.hist(C, nbins, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log = False, color=None, label=None) plt.title("") plt.text(25,20,'M < -21.5' '\

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-27 Thread Daπid
In the example you provide, bins is returned by the hist command, whereas in your code, bins is a number that you defined as 20. So, change: bins = 20 plt.hist(C, bins, ... by: nbins = 20 n, bins, patches = plt.hist(C, nbins, ... As a side comment, your data loading is too complex, and fail pr

[Matplotlib-users] ValueError: x and y must have same first dimension

2012-07-26 Thread surfcast23
Hi I have a code to plot a histogram and I am trying to add a best fit line following this example http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo.html but run into this error Traceback (most recent call last): File "/home/Astro/count_Histogram.py", line 54, in

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

[Matplotlib-users] ValueError

2010-07-08 Thread Shir J. Livne
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? Thanks, Shir -- T

Re: [Matplotlib-users] ValueError: x and y must have same first dimension

2010-03-21 Thread Gökhan Sever
On Sun, Mar 21, 2010 at 1:57 PM, AG wrote: > Hi List > > I cannot figure out how to satisfy this issue to resolve the ValueError: > x and y must have same first dimension. > > > This is the relevant code: > [code] > > for i in range( 0, time + 1 ): > >outflow = constant * quantity > >quant

[Matplotlib-users] ValueError: x and y must have same first dimension

2010-03-21 Thread AG
Hi List I cannot figure out how to satisfy this issue to resolve the ValueError: x and y must have same first dimension. This is the relevant code: [code] for i in range( 0, time + 1 ): outflow = constant * quantity quantityChange = inflow - outflow changeList.append( quantityCh

Re: [Matplotlib-users] ValueError: Can only output finite numbers in PDF

2008-10-06 Thread Alan
Thanks for all replies. I got a solution by copying some files from SVN trunk revision 6155. I did as follow: svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib sudo cp -b matplotlib/lib/matplotlib/backends/backend_pdf.py /sw/lib/python2.5/site-packages/matplotlib/b

Re: [Matplotlib-users] ValueError: Can only output finite numbers in PDF

2008-10-03 Thread Favre-Nicolin Vincent
On vendredi 3 octobre 2008, Alan wrote: > We are developing an application (CING: cing.googlecodes.com) and we You mean http://cing.googlecode.com (no "s") [...] > I don't have much idea at moment how to debug it better, but it seems > that I cannot generate the PDFs because mtplib functions

Re: [Matplotlib-users] ValueError: Can only output finite numbers in PDF

2008-10-03 Thread Michael Droettboom
Are you perhaps trying to plot data containing NaN or Inf? If so, this is a known bug in 0.98.3 that has seen been corrected on SVN trunk. A workaround is to pass masked arrays (where the NaNs and Infs are masked out) to matplotlib instead. But this bug should be gone in the next release of ma

[Matplotlib-users] ValueError: Can only output finite numbers in PDF

2008-10-03 Thread Alan
Dear all, I don't know much how to express this issue I am having but I will try. We are developing an application (CING: cing.googlecodes.com) and we have some routines to test the sanity of our code. I am developing in python, on a mac book pro with Mac OSX tiger and FINK. So when we were usi

Re: [Matplotlib-users] ValueError in backend_gtk.py when switching from linear to log scale

2008-08-22 Thread Michael Droettboom
Can you provide a standalone script to illustrate this problem? I suspect that the position of the text is somehow negative and is getting masked away by the log transformation (which is obviously undefined for negative numbers). Also, have you tried the GtkAgg backend instead? That sees a lot

Re: [Matplotlib-users] "ValueError: oridinal must be >= 1" with 0.98.1 - non with 0.98.0

2008-06-30 Thread Adam Mercer
On Wed, Jun 25, 2008 at 8:44 AM, John Hunter <[EMAIL PROTECTED]> wrote: > I think I have this fixed in svn Just downloaded 0.98.2 and the code that failed in 0.98.1 works! Thanks! Cheers Adam - Check out the new SourceForg

Re: [Matplotlib-users] "ValueError: oridinal must be >= 1" with 0.98.1 - non with 0.98.0

2008-06-25 Thread Adam Mercer
> I think I have this fixed in svn -- also, I rewrote your example to > use csv2rec (which returns record arrays). Thought you might be > interested: > > import matplotlib.mlab as mlab > import matplotlib.pyplot as plt > import matplotlib.dates as mdates > import matplotlib.cbook as cbook > r1 = m

Re: [Matplotlib-users] "ValueError: oridinal must be >= 1" with 0.98.1 - non with 0.98.0

2008-06-25 Thread John Hunter
On Tue, Jun 24, 2008 at 8:13 AM, Adam Mercer <[EMAIL PROTECTED]> wrote: > What's strange is that if I comment out the plotting of the second > test data set then the plot is produced without error, even though the > reported error (when plotting both data sets) seems to have nothing to > do with t

Re: [Matplotlib-users] "ValueError: oridinal must be >= 1" with 0.98.1 - non with 0.98.0

2008-06-24 Thread Adam Mercer
On Tue, Jun 24, 2008 at 6:14 AM, Darren Dale <[EMAIL PROTECTED]> wrote: > Please, include a brief standalone script that demonstrates the problem when > reporting problems. Sorry should have done that, I've attached an example script (and the according data files) which exhibits the problem on 0.

Re: [Matplotlib-users] "ValueError: oridinal must be >= 1" with 0.98.1 - non with 0.98.0

2008-06-24 Thread John Hunter
On Tue, Jun 24, 2008 at 6:43 AM, Johan Mazel <[EMAIL PROTECTED]> wrote: > I used to have such errors when I was trying to display empty vectors. > But since you're saying that the script work on previous version of > Matplotlib... I recently made some changes to try and support a use-case where th

Re: [Matplotlib-users] "ValueError: oridinal must be >= 1" with 0.98.1 - non with 0.98.0

2008-06-24 Thread Johan Mazel
I used to have such errors when I was trying to display empty vectors. But since you're saying that the script work on previous version of Matplotlib... Sorry if it hasn't helped. Johan 2008/6/24 Darren Dale <[EMAIL PROTECTED]>: > On Monday 23 June 2008 23:37:09 Adam Mercer wrote: > > Hi > > > >

Re: [Matplotlib-users] "ValueError: oridinal must be >= 1" with 0.98.1 - non with 0.98.0

2008-06-24 Thread Darren Dale
On Monday 23 June 2008 23:37:09 Adam Mercer wrote: > Hi > > Just upgraded to matplotlib-0.98.1, and a code that worked with 0.98.0 > is now failing with the following error: Please, include a brief standalone script that demonstrates the problem when reporting problems. > Traceback (most recent

[Matplotlib-users] "ValueError: oridinal must be >= 1" with 0.98.1 - non with 0.98.0

2008-06-23 Thread Adam Mercer
Hi Just upgraded to matplotlib-0.98.1, and a code that worked with 0.98.0 is now failing with the following error: Traceback (most recent call last): File "./plot_workout.py", line 126, in time_plot = time_axes.plot_date(times_dates, times, 'bo-') File "/opt/local/lib/python2.5/site-pack