Revision: 7514 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7514&view=rev Author: jdh2358 Date: 2009-08-21 05:33:25 +0000 (Fri, 21 Aug 2009)
Log Message: ----------- tweaks to sampledoc Modified Paths: -------------- trunk/sampledoc_tut/custom_look.rst trunk/sampledoc_tut/extensions.rst Modified: trunk/sampledoc_tut/custom_look.rst =================================================================== --- trunk/sampledoc_tut/custom_look.rst 2009-08-20 23:16:11 UTC (rev 7513) +++ trunk/sampledoc_tut/custom_look.rst 2009-08-21 05:33:25 UTC (rev 7514) @@ -9,7 +9,7 @@ the sites created with the default css, so here we'll invoke TS Elliots' maxim "Talent imitates, but genius steals" and grab their css and part of their layout. As before, you can either get the required -files :file:`_static/default.css`, :file:`_templates:layout.html` and +files :file:`_static/default.css`, :file:`_templates/layout.html` and :file:`_static/logo.png` from the website or svn (see :ref:`fetching-the-data`). Since I did a svn checkout before, I will just copy the stuff I need from there:: Modified: trunk/sampledoc_tut/extensions.rst =================================================================== --- trunk/sampledoc_tut/extensions.rst 2009-08-20 23:16:11 UTC (rev 7513) +++ trunk/sampledoc_tut/extensions.rst 2009-08-21 05:33:25 UTC (rev 7514) @@ -26,7 +26,7 @@ In addition to the builtin matplotlib extensions for embedding pyplot plots and rendering math with matplotlib's native math engine, we also have extensions for syntax highlighting ipython sessions, making -inhertiance diagrams, and more. +inhertiance diagrams, and more. We need to inform sphinx of our new extensions in the :file:`conf.py` file by adding the following. First we tell it where to find the extensions:: @@ -37,7 +37,7 @@ sys.path.append(os.path.abspath('sphinxext')) And then we tell it what extensions to load:: - + # Add any Sphinx extension module names here, as strings. They can # be extensions coming with Sphinx (named 'sphinx.ext.*') or your # custom ones. @@ -108,13 +108,13 @@ .. math:: - W^{3\beta}_{\delta_1 \rho_1 \sigma_2} \approx U^{3\beta}_{\delta_1 \rho_1} + W^{3\beta}_{\delta_1 \rho_1 \sigma_2} \approx U^{3\beta}_{\delta_1 \rho_1} -which is rendered as +which is rendered as .. math:: - W^{3\beta}_{\delta_1 \rho_1 \sigma_2} \approx U^{3\beta}_{\delta_1 \rho_1} + W^{3\beta}_{\delta_1 \rho_1 \sigma_2} \approx U^{3\beta}_{\delta_1 \rho_1} This documentation framework includes a Sphinx extension, :file:`sphinxext/mathmpl.py`, that uses matplotlib to render math @@ -147,9 +147,19 @@ Inserting automatically-generated plots is easy. Simply put the script to generate the plot in the :file:`pyplots` directory, and -refer to it using the ``plot`` directive. To include the source code -for the plot in the document, pass the ``include-source`` parameter:: +refer to it using the ``plot`` directive. First make a +:file:`pyplots` directory at the top level of your project (next to +:``conf.py``) and copy the :file:`ellipses.py`` file into it:: + home:~/tmp/sampledoc> mkdir pyplots + home:~/tmp/sampledoc> cp ../sampledoc_tut/pyplots/ellipses.py pyplots/ + + +You can refer to this file in your sphinx documentation; by default it +will just inline the plot with links to the source and PF and high +resolution PNGS. To also include the source code for the plot in the +document, pass the ``include-source`` parameter:: + .. plot:: pyplots/ellipses.py :include-source: @@ -161,9 +171,9 @@ :include-source: -You can also inline simple plots, and the code will be executed at -documentation build time and the figure inserted into your docs; the -following code:: +You can also inline code for plots directly, and the code will be +executed at documentation build time and the figure inserted into your +docs; the following code:: .. plot:: @@ -192,7 +202,7 @@ <http://matplotlib.sourceforge.net/users/pyplot_tutorial.html>`_ and the `gallery <http://matplotlib.sourceforge.net/gallery.html>`_ for lots of examples of matplotlib plots. - + Inheritance diagrams ==================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins