On Tue, Sep 15, 2009 at 7:57 AM, Michael Droettboom <md...@stsci.edu> 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, though. I will > have to experiment. Not possible, as far as I could tell. This was my first reflex and all of my experiments ended losing the other lines, and I couldn't find by searching the lists whether there was any way to do it. But I admit I didn't go as far as asking on the docutils or sphinx lists. > It's not possible now. The tricky part of this is that currently we don't > keep the module around after it's done plotting. This is actually very much > on purpose since keeping all that data around for all of the example plots > in the matplotlib documentation would quickly consume a lot of memory. > Perhaps when used in this mode (with a function argument) we could. Alas, > again that's api-by-inputs :) Well, even if the module isn't kept in memory, from an api perspective I think it would still be useful to have this .. plot:: script.py func mode. It would make it easier to organize scripts for plot generation in papers. But don't worry too much about it. The real problem was having figures with captions, and at least we have that done. Hopefully some time in the future these extensions can be cleaned up a little bit (the code is indeed a bit messy). In the meantime, we have something very useful that we need *today*, so I'm happy :) Cheers, f ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel