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.r...@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 <jkly...@uvic.ca 
> <mailto:jkly...@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 
> <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/ <http://web.uvic.ca/~jklymak/>
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net 
> <mailto:Matplotlib-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users 
> <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
> 

--
Jody Klymak    
http://web.uvic.ca/~jklymak/





------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to