How can I extract from a figure or axes the data that it currently displays?
I had hoped that something like from pylab import * plot([1,3,2]) data = getp(gca(), 'data') xdata = getp(gca(), 'xdata') ydata = getp(gca(), 'ydata') would do the trick, as suggested by the brief mention of these properties at http://matplotlib.sourceforge.net/matplotlib.pyplot.html#-plot but all I get is the exception Traceback (most recent call last): File "bug.py", line 3, in <module> data = getp(gca(), 'data') File "/usr/lib/python2.5/site-packages/matplotlib/artist.py", line 629, in getp func = getattr(o, 'get_' + name) AttributeError: Subplot instance has no attribute 'get_data' in python-matplotlib-0.91.1. Thanks for any suggestions! Markus P.S.: It seems that the link http://matplotlib.sourceforge.net/matplotlib.pyplot.html#-getp on http://matplotlib.sourceforge.net/ is broken. -- Markus Kuhn, Computer Laboratory, University of Cambridge http://www.cl.cam.ac.uk/~mgk25/ || CB3 0FD, Great Britain ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users