matplotlib/matplotlib — pull request #737 by dmcdougall (2012-03-02 02:38:03+00:00)
Title: Added fplot to Axes subclass.

Plotting functionality for Python callables, ala Matlab's 'fplot' function.

An adaptive step-size is used. Smaller step sizes are used when the gradient of the function is larger. The heavy lifting for the step size is done by the fplot function. Then x,y coordinates are created and passed directly to the plot function in the Axes subclass. As a result, all of the usual kwargs are still supported.

Only one callable is supported so far, it would be desirable to support an array/list of callables and plot them all simultaneously.

There are some unresolved problems. One is the inability to deal with the scenario when f(x) is undefined for some x.

The reason I've tried to make a start on this is to address issue #330. I'll need some help resolving some of the issues I've documented in the source code, but I'd like some feedback on this initial effort.