> I'm looking for an interface closer to > what my HP graphing calculator would use, i.e. something like this: > > > plot(lambda x: sin(x*pi), # function or expression to plot, > start=0.0, > end=2.0, > ) > > and have step size taken either from some default, or better still, > automatically calculated so one point is calculated per pixel. > > Is there a way to do this in iPython or matplotlib? I don't think there is, but using range and list comprehension you can write a little utility function that does that:
HTH -- Miki Tebeka <miki.teb...@gmail.com> http://pythonwise.blogspot.com def simplot(fn, start, end): xs = range(start, end+1) plot(xs, [fn(x) for x in xs)]) -- http://mail.python.org/mailman/listinfo/python-list