<div dir="ltr">A tad dry, but through, example of what the notebook backend can do is to look at the UAT at <a href="https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/web_backend/nbagg_uat.ipynb">https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/web_backend/nbagg_uat.ipynb</a> <div><br></div><div>Tom</div><div><br><div><div class="gmail_quote"><div dir="ltr">On Mon, Jun 8, 2015 at 5:28 PM Jody Klymak <<a href="mailto:jklymak@uvic.ca">jklymak@uvic.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Ben,<div><br></div><div>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.  </div><div><br></div><div>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.  </div><div><br></div><div>Thanks,  Jody</div></div><div style="word-wrap:break-word"><div><br></div><div><br></div><div><br><div><blockquote type="cite"><div>On 8 Jun 2015, at  13:35 PM, Benjamin Root <<a href="mailto:ben.root@ou.edu" target="_blank">ben.root@ou.edu</a>> wrote:</div><br><div><div dir="ltr">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.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 8, 2015 at 1:06 PM, Jody Klymak <span dir="ltr"><<a href="mailto:jklymak@uvic.ca" target="_blank">jklymak@uvic.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi all,<br>
<br>
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 (<a href="http://matplotlib.org/users/image_tutorial.html" target="_blank">http://matplotlib.org/users/image_tutorial.html</a>). However, even it makes use of `.. sourcecode:: python` and `.. plot::` blocks.<br>
<br>
If I convert an ipython notebook to rst, it formats as: `.. code:: python` and instead of making plots it loads images:<br>
 `.. image:: MyExample_files/MyExample_1_0.png`<br>
<br>
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.<br>
<br>
Thanks,   Jody<br>
<br>
--<br>
Jody Klymak<br>
<a href="http://web.uvic.ca/~jklymak/" target="_blank">http://web.uvic.ca/~jklymak/</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@lists.sourceforge.net" target="_blank">Matplotlib-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a><br>
</blockquote></div><br></div>
</div></blockquote></div><br><div>
<span style="border-collapse:separate;border-spacing:0px;color:rgb(0,0,0);font-family:'Lucida Sans Typewriter';font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>--</div><div>Jody Klymak    </div><div><a href="http://web.uvic.ca/~jklymak/" target="_blank">http://web.uvic.ca/~jklymak/</a></div><div><br></div><div><br></div><br></span><br>
</div>
<br></div></div>------------------------------------------------------------------------------<br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@lists.sourceforge.net" target="_blank">Matplotlib-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a><br>
</blockquote></div></div></div></div>