|
From: <jd...@us...> - 2008-12-16 16:19:26
|
Revision: 6630
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6630&view=rev
Author: jdh2358
Date: 2008-12-16 16:19:21 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
Merged revisions 6627,6629 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6627 | jdh2358 | 2008-12-16 06:44:09 -0800 (Tue, 16 Dec 2008) | 1 line
removed mpl_data link
........
r6629 | jdh2358 | 2008-12-16 08:13:07 -0800 (Tue, 16 Dec 2008) | 1 line
applied Darren's sphinx patch, cleaned up some docstrings
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/README.txt
trunk/matplotlib/doc/api/api_changes.rst
trunk/matplotlib/doc/api/font_manager_api.rst
trunk/matplotlib/doc/devel/documenting_mpl.rst
trunk/matplotlib/doc/make.py
trunk/matplotlib/doc/pyplots/plotmap.py
trunk/matplotlib/doc/sphinxext/inheritance_diagram.py
trunk/matplotlib/doc/sphinxext/mathmpl.py
trunk/matplotlib/doc/sphinxext/only_directives.py
trunk/matplotlib/doc/users/customizing.rst
trunk/matplotlib/doc/users/navigation_toolbar.rst
trunk/matplotlib/lib/matplotlib/collections.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6625
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6629
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/CHANGELOG 2008-12-16 16:19:21 UTC (rev 6630)
@@ -1,3 +1,10 @@
+2008-12-15 Removed mpl_data symlink in docs. On platforms that do not
+ support symlinks, these become copies, and the font files
+ are large, so the distro becomes unneccessarily bloaded.
+ Keeping the mpl_examples dir because relative links are
+ harder for the plot directive and the *.py files are not so
+ large. - JDH
+
2008-12-15 Fix \$ in non-math text with usetex off. Document
differences between usetex on/off - MGD
Modified: trunk/matplotlib/doc/README.txt
===================================================================
--- trunk/matplotlib/doc/README.txt 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/README.txt 2008-12-16 16:19:21 UTC (rev 6630)
@@ -27,9 +27,6 @@
* sphinxext - Sphinx extensions for the mpl docs
-* mpl_data - a symbolic link to the matplotlib data for reference by
- sphinx documentation
-
* mpl_examples - a link to the matplotlib examples in case any
documentation wants to literal include them
Modified: trunk/matplotlib/doc/api/api_changes.rst
===================================================================
--- trunk/matplotlib/doc/api/api_changes.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/api/api_changes.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -260,7 +260,7 @@
`Axes.toggle_log_lineary()` has been removed.
:mod:`matplotlib.artist`
-~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~
============================================================ ============================================================
Old method New method
Modified: trunk/matplotlib/doc/api/font_manager_api.rst
===================================================================
--- trunk/matplotlib/doc/api/font_manager_api.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/api/font_manager_api.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -11,7 +11,7 @@
:show-inheritance:
:mod:`matplotlib.fontconfig_pattern`
-====================================
+========================================
.. automodule:: matplotlib.fontconfig_pattern
:members:
Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst
===================================================================
--- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -271,26 +271,41 @@
==========================
In the documentation, you may want to include to a document in the
-matplotlib src, e.g. a license file, an image file from `mpl-data`, or an
-example. When you include these files, include them using a symbolic
-link from the documentation parent directory. This way, if we
-relocate the mpl documentation directory, all of the internal pointers
-to files will not have to change, just the top level symlinks. For
-example, In the top level doc directory we have symlinks pointing to
-the mpl `examples` and `mpl-data`::
+matplotlib src, e.g. a license file or an image file from `mpl-data`,
+refer to it via a relative path from the document where the rst file
+resides, eg, in :file:`users/navigation_toolbar.rst`, we refer to the
+image icons with::
- home:~/mpl/doc2> ls -l mpl_*
- mpl_data -> ../lib/matplotlib/mpl-data
- mpl_examples -> ../examples
+ .. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
-
In the `users` subdirectory, if I want to refer to a file in the mpl-data
directory, I use the symlink directory. For example, from
`customizing.rst`::
- .. literalinclude:: ../mpl_data/matplotlibrc
+ .. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc
+On exception to this is when referring to the examples dir. Relative
+paths are extremely confusing in the sphinx plot extensions, so
+without getting into the dirty details, it is easier to simply include
+a symlink to the files at the top doc level directory. This way, API
+documents like :meth:`matplotlib.pyplot.plot` can refer to the
+examples in a known location.
+In the top level doc directory we have symlinks pointing to
+the mpl `examples`::
+
+ home:~/mpl/doc> ls -l mpl_*
+ mpl_examples -> ../examples
+
+So we can include plots from the examples dir using the symlink::
+
+ .. plot:: mpl_examples/pylab_examples/simple_plot.py
+
+
+We used to use a symlink for :file:`mpl-data` too, but the distro
+becomes very large on platforms that do not support links (eg the font
+files are duplicated and large)
+
.. _internal-section-refs:
Internal section references
Modified: trunk/matplotlib/doc/make.py
===================================================================
--- trunk/matplotlib/doc/make.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/make.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -41,7 +41,7 @@
check_build()
if not os.path.exists('examples/index.rst'):
examples()
- shutil.copy('mpl_data/matplotlibrc', '_static/matplotlibrc')
+ shutil.copy('../lib/matplotlib/mpl-data/matplotlibrc', '_static/matplotlibrc')
#figs()
if os.system('sphinx-build -b html -d build/doctrees . build/html'):
raise SystemExit("Building HTML failed.")
Modified: trunk/matplotlib/doc/pyplots/plotmap.py
===================================================================
--- trunk/matplotlib/doc/pyplots/plotmap.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/pyplots/plotmap.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -11,7 +11,7 @@
# read in topo data (on a regular lat/lon grid)
# longitudes go from 20 to 380.
# you can get this data from matplolib svn matplotlib/htdocs/screenshots/data/
-datadir = '/home/jdhunter/python/svn/matplotlib/htdocs/screenshots/data/'
+datadir = '/home/jdhunter/python/svn/matplotlib/trunk/htdocs/screenshots/data/'
if not os.path.exists(datadir):
raise SystemExit('You need to download the data with svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/htdocs/screenshots/data/" and set the datadir variable in %s'%__file__)
Modified: trunk/matplotlib/doc/sphinxext/inheritance_diagram.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/inheritance_diagram.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/sphinxext/inheritance_diagram.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -39,8 +39,6 @@
from md5 import md5
from docutils.nodes import Body, Element
-from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
from docutils.parsers.rst import directives
from sphinx.roles import xfileref_role
@@ -409,12 +407,9 @@
inheritance_diagram_directive)
def setup(app):
- app.add_node(inheritance_diagram)
-
- HTMLTranslator.visit_inheritance_diagram = \
- visit_inheritance_diagram(html_output_graph)
- HTMLTranslator.depart_inheritance_diagram = do_nothing
-
- LaTeXTranslator.visit_inheritance_diagram = \
- visit_inheritance_diagram(latex_output_graph)
- LaTeXTranslator.depart_inheritance_diagram = do_nothing
+ app.add_node(inheritance_diagram,
+ html=(visit_inheritance_diagram(html_output_graph),
+ do_nothing))
+ app.add_node(inheritance_diagram,
+ latex=(visit_inheritance_diagram(latex_output_graph),
+ do_nothing))
Modified: trunk/matplotlib/doc/sphinxext/mathmpl.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/mathmpl.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/sphinxext/mathmpl.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -6,8 +6,6 @@
from docutils import nodes
from docutils.parsers.rst import directives
-from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
import warnings
# Define LaTeX math node:
@@ -69,8 +67,6 @@
self.body.append(latex2html(node, source))
def depart_latex_math_html(self, node):
pass
- HTMLTranslator.visit_latex_math = visit_latex_math_html
- HTMLTranslator.depart_latex_math = depart_latex_math_html
# Add visit/depart methods to LaTeX-Translator:
def visit_latex_math_latex(self, node):
@@ -83,9 +79,14 @@
'\\end{equation}'])
def depart_latex_math_latex(self, node):
pass
- LaTeXTranslator.visit_latex_math = visit_latex_math_latex
- LaTeXTranslator.depart_latex_math = depart_latex_math_latex
+ app.add_node(latex_math, html=(visit_latex_math_html,
+ depart_latex_math_html))
+ app.add_node(latex_math, latex=(visit_latex_math_latex,
+ depart_latex_math_latex))
+ app.add_role('math', math_role)
+
+
from matplotlib import rcParams
from matplotlib.mathtext import MathTextParser
rcParams['mathtext.fontset'] = 'cm'
Modified: trunk/matplotlib/doc/sphinxext/only_directives.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/only_directives.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/sphinxext/only_directives.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -4,8 +4,6 @@
#
from docutils.nodes import Body, Element
-from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
from docutils.parsers.rst import directives
class html_only(Body, Element):
@@ -63,9 +61,6 @@
directives.register_directive('latexonly', LatexOnlyDirective)
def setup(app):
- app.add_node(html_only)
- app.add_node(latex_only)
-
# Add visit/depart methods to HTML-Translator:
def visit_perform(self, node):
pass
@@ -76,12 +71,7 @@
def depart_ignore(self, node):
node.children = []
- HTMLTranslator.visit_html_only = visit_perform
- HTMLTranslator.depart_html_only = depart_perform
- HTMLTranslator.visit_latex_only = visit_ignore
- HTMLTranslator.depart_latex_only = depart_ignore
-
- LaTeXTranslator.visit_html_only = visit_ignore
- LaTeXTranslator.depart_html_only = depart_ignore
- LaTeXTranslator.visit_latex_only = visit_perform
- LaTeXTranslator.depart_latex_only = depart_perform
+ app.add_node(html_only, html=(visit_perform, depart_perform))
+ app.add_node(html_only, latex=(visit_ignore, depart_ignore))
+ app.add_node(latex_only, latex=(visit_perform, depart_perform))
+ app.add_node(latex_only, html=(visit_ignore, depart_ignore))
Modified: trunk/matplotlib/doc/users/customizing.rst
===================================================================
--- trunk/matplotlib/doc/users/customizing.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/users/customizing.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -67,4 +67,4 @@
`(download) <../_static/matplotlibrc>`__
-.. literalinclude:: ../mpl_data/matplotlibrc
+.. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc
Modified: trunk/matplotlib/doc/users/navigation_toolbar.rst
===================================================================
--- trunk/matplotlib/doc/users/navigation_toolbar.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/users/navigation_toolbar.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -9,11 +9,11 @@
to navigate through the data set. Here is a description of each of
the buttons at the bottom of the toolbar
-.. image:: ../mpl_data/images/home.png
+.. image:: ../../lib/matplotlib/mpl-data/images/home.png
-.. image:: ../mpl_data/images/back.png
+.. image:: ../../lib/matplotlib/mpl-data/images/back.png
-.. image:: ../mpl_data/images/forward.png
+.. image:: ../../lib/matplotlib/mpl-data/images/forward.png
The ``Forward`` and ``Back`` buttons
These are akin to the web browser forward and back buttons. They
@@ -26,7 +26,7 @@
``Back``, think web browser where data views are web pages. Use
the pan and zoom to rectangle to define new views.
-.. image:: ../mpl_data/images/move.png
+.. image:: ../../lib/matplotlib/mpl-data/images/move.png
The ``Pan/Zoom`` button
This button has two modes: pan and zoom. Click the toolbar button
@@ -50,7 +50,7 @@
mouse button. The radius scale can be zoomed in and out using the
right mouse button.
-.. image:: ../mpl_data/images/zoom_to_rect.png
+.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect.png
The ``Zoom-to-rectangle`` button
Click this toolbar button to activate this mode. Put your mouse
@@ -61,14 +61,14 @@
with the right button, which will place your entire axes in the
region defined by the zoom out rectangle.
-.. image:: ../mpl_data/images/subplots.png
+.. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
The ``Subplot-configuration`` button
Use this tool to configure the parameters of the subplot: the
left, right, top, bottom, space between the rows and space between
the columns.
-.. image:: ../mpl_data/images/filesave.png
+.. image:: ../../lib/matplotlib/mpl-data/images/filesave.png
The ``Save`` button
Click this button to launch a file save dialog. You can save
@@ -84,14 +84,14 @@
================================== ==============================================
Home/Reset **h** or **r** or **home**
Back **c** or **left arrow** or **backspace**
-Forward **v** or **right arrow**
-Pan/Zoom **p**
-Zoom-to-rect **o**
-Save **s**
+Forward **v** or **right arrow**
+Pan/Zoom **p**
+Zoom-to-rect **o**
+Save **s**
Toggle fullscreen **f**
Constrain pan/zoom to x axis hold **x**
Constrain pan/zoom to y axis hold **y**
-Preserve aspect ratio hold **CONTROL**
+Preserve aspect ratio hold **CONTROL**
Toggle grid **g**
Toggle y axis scale (log/linear) **l**
================================== ==============================================
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/lib/matplotlib/collections.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -720,7 +720,7 @@
over the regions in *x* where *where* is True. The bars range
on the y-axis from *ymin* to *ymax*
- A :class:`BrokenBarHCollection` is returned. kwargs are
+ A :class:`BrokenBarHCollection` is returned. *kwargs* are
passed on to the collection.
"""
xranges = []
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -604,7 +604,7 @@
*axisbg*:
The background color of the subplot, which can be any valid
- color specifier. See :module:`matplotlib.colors` for more
+ color specifier. See :mod:`matplotlib.colors` for more
information.
*polar*:
@@ -1149,62 +1149,62 @@
"""
Plotting commands
- ============== =================================================
- Command Description
- ============== =================================================
- axes Create a new axes
- axis Set or return the current axis limits
- bar make a bar chart
- boxplot make a box and whiskers chart
- cla clear current axes
- clabel label a contour plot
- clf clear a figure window
- close close a figure window
- colorbar add a colorbar to the current figure
- cohere make a plot of coherence
- contour make a contour plot
- contourf make a filled contour plot
- csd make a plot of cross spectral density
- draw force a redraw of the current figure
- errorbar make an errorbar graph
- figlegend add a legend to the figure
- figimage add an image to the figure, w/o resampling
- figtext add text in figure coords
- figure create or change active figure
- fill make filled polygons
- fill_between make filled polygons
- gca return the current axes
- gcf return the current figure
- gci get the current image, or None
- getp get a handle graphics property
- hist make a histogram
- hold set the hold state on current axes
- legend add a legend to the axes
- loglog a log log plot
- imread load image file into array
- imshow plot image data
- matshow display a matrix in a new figure preserving aspect
- pcolor make a pseudocolor plot
- plot make a line plot
- plotfile plot data from a flat file
- psd make a plot of power spectral density
- quiver make a direction field (arrows) plot
- rc control the default params
- savefig save the current figure
- scatter make a scatter plot
- setp set a handle graphics property
- semilogx log x axis
- semilogy log y axis
- show show the figures
- specgram a spectrogram plot
- stem make a stem plot
- subplot make a subplot (numrows, numcols, axesnum)
- table add a table to the axes
- text add some text at location x,y to the current axes
- title add a title to the current axes
- xlabel add an xlabel to the current axes
- ylabel add a ylabel to the current axes
- ============== =================================================
+ ============ =================================================
+ Command Description
+ ========= =================================================
+ axes Create a new axes
+ axis Set or return the current axis limits
+ bar make a bar chart
+ boxplot make a box and whiskers chart
+ cla clear current axes
+ clabel label a contour plot
+ clf clear a figure window
+ close close a figure window
+ colorbar add a colorbar to the current figure
+ cohere make a plot of coherence
+ contour make a contour plot
+ contourf make a filled contour plot
+ csd make a plot of cross spectral density
+ draw force a redraw of the current figure
+ errorbar make an errorbar graph
+ figlegend add a legend to the figure
+ figimage add an image to the figure, w/o resampling
+ figtext add text in figure coords
+ figure create or change active figure
+ fill make filled polygons
+ fill_between make filled polygons
+ gca return the current axes
+ gcf return the current figure
+ gci get the current image, or None
+ getp get a handle graphics property
+ hist make a histogram
+ hold set the hold state on current axes
+ legend add a legend to the axes
+ loglog a log log plot
+ imread load image file into array
+ imshow plot image data
+ matshow display a matrix in a new figure preserving aspect
+ pcolor make a pseudocolor plot
+ plot make a line plot
+ plotfile plot data from a flat file
+ psd make a plot of power spectral density
+ quiver make a direction field (arrows) plot
+ rc control the default params
+ savefig save the current figure
+ scatter make a scatter plot
+ setp set a handle graphics property
+ semilogx log x axis
+ semilogy log y axis
+ show show the figures
+ specgram a spectrogram plot
+ stem make a stem plot
+ subplot make a subplot (numrows, numcols, axesnum)
+ table add a table to the axes
+ text add some text at location x,y to the current axes
+ title add a title to the current axes
+ xlabel add an xlabel to the current axes
+ ylabel add a ylabel to the current axes
+ ============ =================================================
The following commands will set the default colormap accordingly:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|