[Tutor] Plotting a Linear Equation
Emanuel Woiski
woiski at gmail.com
Thu Apr 21 21:24:00 CEST 2011
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 <avifancy at gmail.com>
> 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 at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110421/3a854f65/attachment-0001.html>
More information about the Tutor
mailing list