Re: [Matplotlib-users] Linear regression question

2009-04-06 Thread Juls Night
Eric Firing writes: > > Solution: use > x = arange(11) > y = arange(11) > > Eric Thanks Eric, That has solved my problem! Best, Juls -- This SF.net email is sponsored by: High Quality Requirements in a Collaborat

Re: [Matplotlib-users] Linear regression question

2009-04-06 Thread Eric Firing
Juls Night wrote: > I'm new to matplotlib and am really enjoying using it. I'm confused by > something > though: [...] > The following code produces an error though (only the length of the vectors > have > been changed): > > from pylab import * > > x = range(11) > y = range(11) > > m,b = polyf

[Matplotlib-users] Linear regression question

2009-04-06 Thread Juls Night
I'm new to matplotlib and am really enjoying using it. I'm confused by something though: If I plot the following linear regression it works as expected. from pylab import * x = range(10) y = range(10) m,b = polyfit(x, y, 1) plot(x, y, 'yo', x, m*x+b, '--k') show() The following code produces