Re: [matplotlib-devel] Question on sphinxext.plot_directive...

2009-09-15 Thread Fernando Perez
On Tue, Sep 15, 2009 at 7:57 AM, Michael Droettboom wrote: > Yeah, I have the same "not quite right" feeling about it.  What about > putting the caption in an "option" such as: > >  .. plot:: foo.py >    :caption: This is my caption > > I don't know if the caption can have newlines in this mode,

Re: [matplotlib-devel] Question on sphinxext.plot_directive...

2009-09-15 Thread Michael Droettboom
Fernando Perez wrote: > Hi Michael, > > On Mon, Sep 14, 2009 at 6:57 AM, Michael Droettboom wrote: > >> I'm not sure it's that bad. It's certainly possible to do all these things >> with a single directive, since providing a path or providing source code is >> mutually exclusive. The thing on

Re: [matplotlib-devel] Question on sphinxext.plot_directive...

2009-09-14 Thread Fernando Perez
Hi Michael, On Mon, Sep 14, 2009 at 6:57 AM, Michael Droettboom wrote: > I'm not sure it's that bad.  It's certainly possible to do all these things > with a single directive, since providing a path or providing source code is > mutually exclusive.  The thing one can't do is provide inline source

Re: [matplotlib-devel] Question on sphinxext.plot_directive...

2009-09-14 Thread Michael Droettboom
Fernando Perez wrote: > I renamed it because there's a bit of a conflict with the current > 'plot' directive, which allows a filename *or* a content block, but in > that case the content block is meant to be the source code, as > illustrated in sampledoc: > > http://matplotlib.sourceforge.net/sampl

Re: [matplotlib-devel] Question on sphinxext.plot_directive...

2009-09-14 Thread Michael Droettboom
Fernando Perez wrote: > I renamed it because there's a bit of a conflict with the current > 'plot' directive, which allows a filename *or* a content block, but in > that case the content block is meant to be the source code, as > illustrated in sampledoc: > > http://matplotlib.sourceforge.net/sampl

Re: [matplotlib-devel] Question on sphinxext.plot_directive...

2009-09-13 Thread Ariel Rokem
Hi Fernando and all, > > Speaking of sphinx for books, as I've mentioned before to John, the > last big problem is being able to cross-reference arbitrary text > elements like you can in latex, be they chapters or sections or > whatever, and get a number or something that's meaningful in print. >

Re: [matplotlib-devel] Question on sphinxext.plot_directive...

2009-09-12 Thread Fernando Perez
On Sat, Sep 12, 2009 at 11:12 PM, Fernando Perez wrote: > Here's a diff against current trunk to play with this idea. Updated patch that handles correctly more than one option (I think the bug was even in the original, not sure). Cheers, f Index: plot_directive.py =

Re: [matplotlib-devel] Question on sphinxext.plot_directive...

2009-09-12 Thread Fernando Perez
On Sat, Sep 12, 2009 at 8:29 PM, Fernando Perez wrote: > Before I dive into the code too far, I figured I'd ask the experts. Too late for that, common sense has never been my forte. Here's a diff against current trunk to play with this idea. WARNING: Please note that this is NOT meant to be ap

[matplotlib-devel] Question on sphinxext.plot_directive...

2009-09-12 Thread Fernando Perez
Hi folks, if one were to say, think of writing something like a book (or a paper) using sphinx and plots generated from python scripts, the plot directive would be extremely useful. But as best as I can tell, it generates at the end of the day 'image' directives, where as for including figures in