[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

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

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' '\n'

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

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 surfcas...@gmail.com 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

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,

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

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 surfcas...@gmail.com 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

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 surfcas...@gmail.com 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

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

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

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

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

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 computing.acco...@googlemail.comwrote: 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 *

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

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

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 =

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 call

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 the

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

[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 module time_plot = time_axes.plot_date(times_dates, times, 'bo-') File