Skip to content

Commit e93624b

Browse files
committed
removed mpl_data link
svn path=/branches/v0_98_5_maint/; revision=6627
1 parent 942c426 commit e93624b

File tree

6 files changed

+48
-29
lines changed

6 files changed

+48
-29
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2008-12-15 Removed mpl_data symlink in docs. On platforms that do not
2+
support symlinks, these become copies, and the font files
3+
are large, so the distro becomes unneccessarily bloaded.
4+
Keeping the mpl_examples dir because relative links are
5+
harder for the plot directive and the *.py files are not so
6+
large. - JDH
7+
18
2008-12-15 Fix \$ in non-math text with usetex off. Document
29
differences between usetex on/off - MGD
310

doc/README.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ python documentation system built on top of ReST. This directory contains
2727

2828
* sphinxext - Sphinx extensions for the mpl docs
2929

30-
* mpl_data - a symbolic link to the matplotlib data for reference by
31-
sphinx documentation
32-
3330
* mpl_examples - a link to the matplotlib examples in case any
3431
documentation wants to literal include them
3532

doc/devel/documenting_mpl.rst

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -271,25 +271,40 @@ Referring to mpl documents
271271
==========================
272272

273273
In the documentation, you may want to include to a document in the
274-
matplotlib src, e.g. a license file, an image file from `mpl-data`, or an
275-
example. When you include these files, include them using a symbolic
276-
link from the documentation parent directory. This way, if we
277-
relocate the mpl documentation directory, all of the internal pointers
278-
to files will not have to change, just the top level symlinks. For
279-
example, In the top level doc directory we have symlinks pointing to
280-
the mpl `examples` and `mpl-data`::
281-
282-
home:~/mpl/doc2> ls -l mpl_*
283-
mpl_data -> ../lib/matplotlib/mpl-data
284-
mpl_examples -> ../examples
274+
matplotlib src, e.g. a license file or an image file from `mpl-data`,
275+
refer to it via a relative path from the document where the rst file
276+
resides, eg, in :file:`users/navigation_toolbar.rst`, we refer to the
277+
image icons with::
285278

279+
.. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
286280

287281
In the `users` subdirectory, if I want to refer to a file in the mpl-data
288282
directory, I use the symlink directory. For example, from
289283
`customizing.rst`::
290284

291-
.. literalinclude:: ../mpl_data/matplotlibrc
285+
.. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc
286+
287+
On exception to this is when referring to the examples dir. Relative
288+
paths are extremely confusing in the sphinx plot extensions, so
289+
without getting into the dirty details, it is easier to simply include
290+
a symlink to the files at the top doc level directory. This way, API
291+
documents like :meth:`matplotlib.pyplot.plot` can refer to the
292+
examples in a known location.
293+
294+
In the top level doc directory we have symlinks pointing to
295+
the mpl `examples`::
296+
297+
home:~/mpl/doc> ls -l mpl_*
298+
mpl_examples -> ../examples
299+
300+
So we can include plots from the examples dir using the symlink::
301+
302+
.. plot:: mpl_examples/pylab_examples/simple_plot.py
303+
292304

305+
We used to use a symlink for :file:`mpl-data` too, but the distro
306+
becomes very large on platforms that do not support links (eg the font
307+
files are duplicated and large)
293308

294309
.. _internal-section-refs:
295310

doc/make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def html():
4141
check_build()
4242
if not os.path.exists('examples/index.rst'):
4343
examples()
44-
shutil.copy('mpl_data/matplotlibrc', '_static/matplotlibrc')
44+
shutil.copy('../lib/matplotlib/mpl-data/matplotlibrc', '_static/matplotlibrc')
4545
#figs()
4646
if os.system('sphinx-build -b html -d build/doctrees . build/html'):
4747
raise SystemExit("Building HTML failed.")

doc/users/customizing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ A sample matplotlibrc file
6767

6868
`(download) <../_static/matplotlibrc>`__
6969

70-
.. literalinclude:: ../mpl_data/matplotlibrc
70+
.. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc

doc/users/navigation_toolbar.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ All figure windows come with a navigation toolbar, which can be used
99
to navigate through the data set. Here is a description of each of
1010
the buttons at the bottom of the toolbar
1111

12-
.. image:: ../mpl_data/images/home.png
12+
.. image:: ../../lib/matplotlib/mpl-data/images/home.png
1313

14-
.. image:: ../mpl_data/images/back.png
14+
.. image:: ../../lib/matplotlib/mpl-data/images/back.png
1515

16-
.. image:: ../mpl_data/images/forward.png
16+
.. image:: ../../lib/matplotlib/mpl-data/images/forward.png
1717

1818
The ``Forward`` and ``Back`` buttons
1919
These are akin to the web browser forward and back buttons. They
@@ -26,7 +26,7 @@ The ``Forward`` and ``Back`` buttons
2626
``Back``, think web browser where data views are web pages. Use
2727
the pan and zoom to rectangle to define new views.
2828

29-
.. image:: ../mpl_data/images/move.png
29+
.. image:: ../../lib/matplotlib/mpl-data/images/move.png
3030

3131
The ``Pan/Zoom`` button
3232
This button has two modes: pan and zoom. Click the toolbar button
@@ -50,7 +50,7 @@ The ``Pan/Zoom`` button
5050
mouse button. The radius scale can be zoomed in and out using the
5151
right mouse button.
5252

53-
.. image:: ../mpl_data/images/zoom_to_rect.png
53+
.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect.png
5454

5555
The ``Zoom-to-rectangle`` button
5656
Click this toolbar button to activate this mode. Put your mouse
@@ -61,14 +61,14 @@ The ``Zoom-to-rectangle`` button
6161
with the right button, which will place your entire axes in the
6262
region defined by the zoom out rectangle.
6363

64-
.. image:: ../mpl_data/images/subplots.png
64+
.. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
6565

6666
The ``Subplot-configuration`` button
6767
Use this tool to configure the parameters of the subplot: the
6868
left, right, top, bottom, space between the rows and space between
6969
the columns.
7070

71-
.. image:: ../mpl_data/images/filesave.png
71+
.. image:: ../../lib/matplotlib/mpl-data/images/filesave.png
7272

7373
The ``Save`` button
7474
Click this button to launch a file save dialog. You can save
@@ -84,14 +84,14 @@ Command Keyboard Shortcut(s)
8484
================================== ==============================================
8585
Home/Reset **h** or **r** or **home**
8686
Back **c** or **left arrow** or **backspace**
87-
Forward **v** or **right arrow**
88-
Pan/Zoom **p**
89-
Zoom-to-rect **o**
90-
Save **s**
87+
Forward **v** or **right arrow**
88+
Pan/Zoom **p**
89+
Zoom-to-rect **o**
90+
Save **s**
9191
Toggle fullscreen **f**
9292
Constrain pan/zoom to x axis hold **x**
9393
Constrain pan/zoom to y axis hold **y**
94-
Preserve aspect ratio hold **CONTROL**
94+
Preserve aspect ratio hold **CONTROL**
9595
Toggle grid **g**
9696
Toggle y axis scale (log/linear) **l**
9797
================================== ==============================================

0 commit comments

Comments
 (0)