[Matplotlib-users] matplotlib documentation from python notebook?

Thomas Caswell tcaswell at gmail.com
Mon Aug 31 05:14:38 CEST 2015


A tad dry, but through, example of what the notebook backend can do is to
look at the UAT at
https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/web_backend/nbagg_uat.ipynb


Tom

On Mon, Jun 8, 2015 at 5:28 PM Jody Klymak <jklymak at uvic.ca> wrote:

> Hi Ben,
>
> My idea was to just make the notebook the “example”.  But nbconvert-ing
> the notebook makes static images that then need to be checked into the
> repository, and take space, so I wasn’t sure how desirable that was.
>
> It would be fun to have the documentation script accept ipython notebooks
> and run nbconvert on them.  Being able to save state as you work through
> examples is quite nice, versus creating five or six standalone *.py files
> that then get run at build time.  Of course you are adding a dependency to
> anyone who has wants to build the docs.
>
> Thanks,  Jody
>
>
>
> On 8 Jun 2015, at  13:35 PM, Benjamin Root <ben.root at ou.edu> wrote:
>
> No, there isn't an accepted way to do that AFAIK. However, it doesn't seem
> like it is all that far off. Our doc-build process will create the images
> from the examples automatically, so you don't need to include the image
> tag. It is sort of a way to make sure the examples work and that the image
> matches the code correctly.
>
> On Mon, Jun 8, 2015 at 1:06 PM, Jody Klymak <jklymak at uvic.ca> wrote:
>
>>
>> Hi all,
>>
>> If I want to contribute *.rst files to the matplotlib documentation, I
>> can see a few styles already contributed, at least one of which makes
>> extensive use of ipython (http://matplotlib.org/users/image_tutorial.html).
>> However, even it makes use of `.. sourcecode:: python` and `.. plot::`
>> blocks.
>>
>> If I convert an ipython notebook to rst, it formats as: `.. code::
>> python` and instead of making plots it loads images:
>>  `.. image:: MyExample_files/MyExample_1_0.png`
>>
>> So, is there an acceptable way to directly make matplotlib documentation
>> directly from a notebook?  I didn’t see anything, but wanted to check, as
>> that would by far be the easiest way to make a *.rst that had structured
>> text, code, and plots.
>>
>> Thanks,   Jody
>>
>> --
>> Jody Klymak
>> http://web.uvic.ca/~jklymak/
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
> --
> Jody Klymak
> http://web.uvic.ca/~jklymak/
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20150831/402d78cb/attachment.html>


More information about the Matplotlib-users mailing list