David, the preferred way to custom plots seems to be passing an Axes
instance to the plotting function. Some tricks allow use of
pylab/pyplot style:

def custom_plot(x, y, axes=None):
    ...
    if axes is None: axes = pyplot.gca()
    axes.plot(x, y)
    ....

What you don't get this way is the axes.custom_plot(x, y) sintax,
which requires subclassing Axes. But doing this is not common and not
straighforward if you want it to work well with pyplot.subplot() and
the like.

Maybe monkey patching would work but well, you know... I never tried it anyway.

Goyo

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to