Is there documentation mapping matplotlib's stateful pyplot API to the object-oriented equivalents?

Viewed 434

I prefer to use Matplotlib's object-oriented API, operating on figures and axes directly, rather than use matplotlib.pyplot commands.

However I often find it easier to find documentation on how to do something via the pyplot interface. In these cases it would be really useful to find out what the relevant pyplot commands are doing in terms of Figure and Axes methods, as it would help me handle whatever specific corner case I was wrestling with when I went looking for documentation.

For instance, plt.xlabel() is equivalent to ax.set_xlabel() if ax is the "current" axes in pyplot's stateful interface. But I can't find anything in the xlabel() documentation that mentions Axes.set_xlabel() at all. In this case it's not too hard to look up separately in the Axes documentation, but a mapping would be really nice.

Is there any source of information that would tell me what each particular pyplot command does in terms of the object-oriented interface?

2 Answers
Related