"Emanuel Woiski" wrote
easy:
I love your sense of humour!
import pylab as pl
import numpy as np
x1,x2,n,m,b = 0.,10.,11,2.,5.
x = np.r_[x1:x2:n*1j]
pl.plot(x,m*x + b); pl.grid(); pl.show()
Now, given this is a list for beginners to Python, could you
try explaining what you did there and h
easy:
import pylab as pl
import numpy as np
x1,x2,n,m,b = 0.,10.,11,2.,5.
x = np.r_[x1:x2:n*1j]
pl.plot(x,m*x + b); pl.grid(); pl.show()
regards
woiski
2011/4/21 ifancy
> I want to use matplotlib (or similar) to plot an equation in
> (y=mx+b) or standard form (Ax + By = C). I could make
>
I want to use matplotlib (or similar) to plot an equation in
(y=mx+b) or standard form (Ax + By = C). I could make
two points out of those manually, but I was wondering if anyone knew of
an easier way. Thanks.
___
Tutor maillist - Tutor@pyth
It sounds to me like you need to set a nonzero linewidth. The default is to
not fill in the space between points. Check out the documentation at
http://matplotlib.sourceforge.net/contents.html. It's a lot to wade through,
but worth it when you learn how to unlock the power of the software.
-Original Message-
From: Greg
To: tutor
Sent: Fri, Sep 24, 2010 3:29 am
Subject: Re: [Tutor] Plotting a Linear Equation
On Thu, Sep 23, 2010 at 10:51 PM, Corey Richardson
wrote:
Hello tutors. Probably the wrong mailing list, but someone might know.
I want to use matplotlib (or
On Thu, Sep 23, 2010 at 10:51 PM, Corey Richardson wrote:
> Hello tutors. Probably the wrong mailing list, but someone might know.
> I want to use matplotlib (or similar) to plot an equation in
> slope-intercept (y=mx+b) or standard form (Ax + By = C). As far as I've read
> and tested, you can o
Hello tutors. Probably the wrong mailing list, but someone might know.
I want to use matplotlib (or similar) to plot an equation in
slope-intercept (y=mx+b) or standard form (Ax + By = C). As far as I've
read and tested, you can only plot with a series of points. I could make
two points out of