Caption in Plot Directive

Moving this to matplotlib-devel

Is this information incorrect?

http://matplotlib.sourceforge.net/devel/documenting_mpl.html#module-matplotlib.sphinxext.plot_directive

This line seems to preclude ever getting to the below code to process
the caption.

https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/sphinxext/plot_directive.py#L601

I think the proper fix is to make :caption: an option.

I implemented :caption: as an option [1], but this is at odds with the
original figure directive [2]. AFAICT either the check for content and
arguments has to be removed and all content after a filename is given
is assumed to be a caption, or caption has to become an option.

Skipper

[1] https://github.com/jseabold/matplotlib/commit/2f003e296a0c37bcbf6687702ddfd34ac12235b4
[2] reStructuredText Directives

ยทยทยท

On Thu, Jan 5, 2012 at 1:17 PM, Skipper Seabold <jsseabold@...149...> wrote: