Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Matthew Brett
Hi guys, > You can now do: > > .. plot:: > > from matplotlib.pyplot import * > plot([1,2,3]) This is very nice - thank you for doing that. But, thinking about the online tutorials, you often want to do something as you can do with the sourcecode directive, as in: .. testcode:: impor

Re: [matplotlib-devel] Sphinx custom extension mess, and patches

2009-02-16 Thread Gael Varoquaux
On Tue, Feb 17, 2009 at 12:17:17AM +0100, Georg Brandl wrote: > I'm all for it. In the case of autosummary, I'm guilty of not getting it > in sooner. This will change soon. In other cases, I don't even know of > the extension, probably because those who write it deem it as too > project-specific

Re: [matplotlib-devel] [Numpy-discussion] Sphinx custom extension mess, and patches

2009-02-16 Thread Pauli Virtanen
Mon, 16 Feb 2009 13:36:07 -0600, Robert Kern wrote: [clip] > At one point, some of us had a plan to keep all of these "scientific" > extensions collected here: > > http://sphinx.googlecode.com/svn/contrib/trunk/numpyext/ > > SVN-using projects could use svn:externals to include these in their >

Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Michael Droettboom
Sorry -- Ignore my last comment. I see the Scipy version already has the covered -- it's just in a different place. No problem. Cheers, Mike Michael Droettboom wrote: > Pauli Virtanen wrote: > >> Mon, 16 Feb 2009 13:26:40 -0500, Michael Droettboom wrote: >> [clip] >> >> >>> Anyway,

Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Michael Droettboom
Pauli Virtanen wrote: > Mon, 16 Feb 2009 13:26:40 -0500, Michael Droettboom wrote: > [clip] > >> Anyway, the current version in matplotlib handles files in a way that >> behaves well with Sphinx (which I see is a TODO list item in the numpy >> version). It also uses the Sphinx extension API rat

Re: [matplotlib-devel] [Numpy-discussion] Sphinx custom extension mess, and patches

2009-02-16 Thread Robert Kern
On Sun, Feb 15, 2009 at 08:04, Gael Varoquaux wrote: > Hi all, > > Sorry for the multiple posting, this concerns various groups, and I'd > rather the information not be lost. > > While working on getting our in-lab library ready to be merged with NiPy, > I ran into some sort of 'sphinx extension m

Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Pauli Virtanen
Mon, 16 Feb 2009 13:26:40 -0500, Michael Droettboom wrote: [clip] > Anyway, the current version in matplotlib handles files in a way that > behaves well with Sphinx (which I see is a TODO list item in the numpy > version). It also uses the Sphinx extension API rather than the old and > brittle way

Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Gael Varoquaux
On Mon, Feb 16, 2009 at 01:26:40PM -0500, Michael Droettboom wrote: > > 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... > I think it makes the mos

Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Michael Droettboom
Pauli Virtanen wrote: > 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 whet

Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Pauli Virtanen
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.p

Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Michael Droettboom
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 gener

Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Michael Droettboom
Has anyone else had a chance to look at this? It seems fairly straightforward and I may have a go at this this morning if no one else has already. Mike Fernando Perez wrote: > Howdy, > > recently, Matthew Brett pointed out that reST supports a mode that's > very handy for writing tutorial-like

Re: [matplotlib-devel] Sphinx custom extension mess, and patches

2009-02-16 Thread Michael Droettboom
Gael, You raise a very good point about the duplication of code around. As a case in point, the patches you provided no longer apply to the "canonical" (or at least original) versions of the plugins that began life in matplotlib. Recent versions of Sphinx have a proper extension API, so that