plot directive in reST tutorials

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 of defining directives etc. So those things will need to be
merged with the other changes made on the Numpy side.

Ok, I'll try to get these merged now, starting from the Scipy
version.

What was new:

* Detect doctest format automatically.
* Matplotlib rcparameters settable in conf.py
* :include-source: also as conf.py option
* Preamble code in conf.py, to run in every plot
* Used Sphinx API to register the directive.
* Slightly modified template for the inserted RST, to make multiple
  output figures floatable side-by-side in HTML.

So I think what needs to be merged is the output file handling,
and to check that the output is similar as previously for the matplotlib
docs.

···

--
Pauli Virtanen

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 rather than the old and
brittle way of defining directives etc. So those things will need to be
merged with the other changes made on the Numpy side.
    
Ok, I'll try to get these merged now, starting from the Scipy
version.

What was new:

* Detect doctest format automatically.
* Matplotlib rcparameters settable in conf.py
* :include-source: also as conf.py option
* Preamble code in conf.py, to run in every plot
* Used Sphinx API to register the directive.
* Slightly modified template for the inserted RST, to make multiple
  output figures floatable side-by-side in HTML.

So I think what needs to be merged is the output file handling,
and to check that the output is similar as previously for the matplotlib
docs.
  

Those all look like great features to have.

Thanks for volunteering to do the merge.

I would also add that it should be ported to the Sphinx extension API (basically the stuff in the last section in the file). It's a lot easier now, and should be more stable between docutils/Sphinx versions:

http://sphinx.pocoo.org/ext/appapi.html

Cheers,
Mike

···

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

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, 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 of defining directives etc. So those things will need to be
merged with the other changes made on the Numpy side.
    

Ok, I'll try to get these merged now, starting from the Scipy
version.

What was new:

* Detect doctest format automatically.
* Matplotlib rcparameters settable in conf.py
* :include-source: also as conf.py option
* Preamble code in conf.py, to run in every plot
* Used Sphinx API to register the directive.
* Slightly modified template for the inserted RST, to make multiple
  output figures floatable side-by-side in HTML.

So I think what needs to be merged is the output file handling,
and to check that the output is similar as previously for the matplotlib
docs.
  

Those all look like great features to have.

Thanks for volunteering to do the merge.

I would also add that it should be ported to the Sphinx extension API (basically the stuff in the last section in the file). It's a lot easier now, and should be more stable between docutils/Sphinx versions:

http://sphinx.pocoo.org/ext/appapi.html

Cheers,
Mike

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA