Mon, 16 Feb 2009 10:30:47 -0500, Michael Droettboom wrote: > A preliminary version of this is committed on the branch and trunk. > > You can now do: > > .. plot:: > > from matplotlib.pyplot import * > plot([1,2,3]) > > One open API question is whether to implicitly "from matplotlib.pyplot > import *" or "from matplotlib import pyplot as plt" or nothing. I > generally don't like "import *" or implicit things, so I've decided to > do none of the above. But I could see how it might be nice to reduce > the verbosity of these little code examples to import something be > default. Let me know if you feel strongly about changing it. > > It has also been moved to the installed source directory, so other > projects no longer need to copy it. Just change the entry in the > extensions list in the Sphinx conf.py from 'plot_directive' to > 'matplotlib.sphinxext.plot_directive' and remove your local copy of the > extension.
Scipy's plot directive has had this feature for some time: http://svn.scipy.org/svn/numpy/trunk/doc/sphinxext/plot_directive.py plus some extra features. I think it should contain all the features in matplotlib's version; but OTOH, I haven't tried to build matplotlib docs using it. I think we really should merge it back *now*! (Re: Gael's thread; sorry, I've been lazy pushing the changes back...) The "official" version of the plot directive should IMO end up either in Sphinx or matplotlib repository. It's probably OK to require matplotlib SVN version to build Scipy docs for a while... What do you think? -- Pauli Virtanen ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel