Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1441d2b

Browse files
committed
some more doc updates
svn path=/trunk/matplotlib/; revision=5367
1 parent ac160de commit 1441d2b

15 files changed

Lines changed: 140 additions & 31 deletions

doc/devel/add_new_projection.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _adding-new-scales:
2+
13
***********************************************
24
Adding new scales and projections to matplotlib
35
***********************************************
@@ -28,6 +30,7 @@ code for scales and projections can be included anywhere: directly
2830
within a plot script, in third-party code, or in the matplotlib source
2931
tree itself.
3032

33+
.. _creating-new-scale:
3134

3235
Creating a new scale
3336
====================
@@ -63,6 +66,8 @@ A full-fledged and heavily annotated example is in
6366
in :mod:`matplotlib.scale` that may be used as starting points.
6467

6568

69+
.. _creating-new-projection:
70+
6671
Creating a new projection
6772
=========================
6873

doc/devel/coding_guide.rst

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
***************
1+
.. _coding-guide:
2+
3+
************
4+
Coding Guide
5+
************
6+
7+
.. _version-control:
8+
29
Version Control
3-
***************
10+
===============
411

512
svn checkouts
6-
=============
13+
-------------
714

815
Checking out everything in the trunk (matplotlib and toolkits)::
916

@@ -21,7 +28,7 @@ Branch checkouts, eg the maintenance branch::
2128
v0_91_maint mpl91 --username=youruser --password=yourpass
2229

2330
Committing changes
24-
==================
31+
------------------
2532

2633
When committing changes to matplotlib, there are a few things to bear
2734
in mind.
@@ -74,12 +81,14 @@ in mind.
7481

7582
> svn commit -F svnmerge-commit-message.txt
7683

77-
***********
84+
85+
.. _style-guide:
86+
7887
Style Guide
79-
***********
88+
===========
8089

8190
Importing and name spaces
82-
=========================
91+
-------------------------
8392

8493
For `numpy <http://www.numpy.org>`_, use::
8594

@@ -115,7 +124,7 @@ function to the new developer. The former makes it explcit that
115124
you are importing a module or package.
116125

117126
Naming, spacing, and formatting conventions
118-
===========================================
127+
-------------------------------------------
119128

120129
In general, we want to hew as closely as possible to the standard
121130
coding guidelines for python written by Guido in `PEP 0008
@@ -172,7 +181,7 @@ for older versions of emacs (emacs<22) you need to do:
172181
(add-hook 'local-write-file-hooks 'delete-trailing-whitespace)))
173182
174183
Keyword argument processing
175-
===========================
184+
---------------------------
176185

177186
Matplotlib makes extensive use of ``**kwargs`` for pass through
178187
customizations from one function to another. A typical example is in
@@ -255,6 +264,8 @@ forced to use ``**kwargs``. An example is
255264
elif len(args) == 1:
256265
...etc...
257266

267+
.. _docstrings:
268+
258269
Documentation and Docstrings
259270
============================
260271

@@ -327,9 +338,11 @@ made some manual hacks in this case which violates the "single entry
327338
point" requirement above; hopefully we'll find a more elegant solution
328339
before too long.
329340

330-
********
341+
342+
.. _licenses:
343+
331344
Licenses
332-
********
345+
========
333346

334347
Matplotlib only uses BSD compatible code. If you bring in code from
335348
another project make sure it has a PSF, BSD, MIT or compatible

doc/devel/documenting_mpl.rst

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _documenting-matplotlib:
2+
13
**********************
24
Documenting Matplotlib
35
**********************
@@ -56,6 +58,8 @@ markup and working with Sphinx in general.
5658

5759
.. _documentation: http://sphinx.pocoo.org/contents.html
5860

61+
.. _referring-to-mpl-docs:
62+
5963
Referring to mpl documents
6064
==========================
6165

@@ -78,6 +82,8 @@ In the ``users`` subdirectory, if I want to refer to a file in the mpl-data dire
7882
.. literalinclude:: ../mpl_data/matplotlibrc
7983

8084

85+
.. _internal-section-refs:
86+
8187
Internal section references
8288
===========================
8389

@@ -103,4 +109,39 @@ is better than::
103109

104110
In addition, since underscores are widely used by Sphinx itself, let's prefer hyphens to separate words.
105111

112+
.. _emacs-helpers:
113+
114+
Emacs helpers
115+
=============
116+
117+
There is an emacs mode `rst.el
118+
<http://docutils.sourceforge.net/tools/editors/emacs/rst.el>`_ which
119+
automates many important ReST tasks like building and updateing
120+
table-of-contents, and promoting or demoting section headings. Here
121+
is the basic ``.emacs`` configuration::
122+
123+
(require 'rst)
124+
(setq auto-mode-alist
125+
(append '(("\\.txt$" . rst-mode)
126+
("\\.rst$" . rst-mode)
127+
("\\.rest$" . rst-mode)) auto-mode-alist))
128+
129+
130+
Some helpful functions::
131+
132+
C-c TAB - rst-toc-insert
133+
134+
Insert table of contents at point
135+
136+
C-c C-u - rst-toc-update
137+
138+
Update the table of contents at point
139+
140+
C-c C-l rst-shift-region-left
141+
142+
Shift region to the left
143+
144+
C-c C-r rst-shift-region-right
145+
146+
Shift region to the right
106147

doc/devel/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
:Release: |version|
88
:Date: |today|
99

10-
Introduction to developer's guide here **TODO**.
11-
1210
.. toctree::
1311

1412
coding_guide.rst

doc/faq/howto_faq.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.._ howto-faq:
2+
13
*****
24
HOWTO
35
*****
@@ -25,7 +27,7 @@ is controlled by the "markeredgewidth" property::
2527
The other properties that control the tick marker, and all markers,
2628
are ``markerfacecolor``, ``markeredgecolor``, ``markeredgewidth``,
2729
``markersize``. For more information on configuring ticks, see
28-
:ref:`artist-tut-axis` and :ref:`artist-tut-tick`.
30+
:ref:`axis-container` and :ref:`tick-container`.
2931

3032
.. _howto-webapp:
3133

doc/faq/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _api-index:
1+
.. _faq-index:
22

33
####################
44
The Matplotlib FAQ

doc/faq/installing_faq.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
.. _installing-faq:
2+
13
==================
24
Installation FAQ
35
==================
46

5-
6-
77
How do I report a compilation problem?
88
======================================
99

@@ -22,7 +22,13 @@ install directory. To cleanly rebuild:
2222
* delete the ``build`` directory in the source tree
2323
* delete ``site-packages/matplotlib`` directory in the Python
2424
installation. The location of ``site-packages`` is
25-
platform-specific.
25+
platform-specific. You can find out where matplotlib is installed by doing::
26+
27+
> python -c 'import matplotlib; print matplotlib.__file__'
28+
29+
and then making sure you remove the matplotlib directory (and
30+
any matplotlib*.egg files) you find there.
31+
2632
* you may also want to clear some of the cache data that
2733
matplotlib stores in your ``.matplotlib`` directory. You can
2834
find the location of this directory by doing::
@@ -55,7 +61,7 @@ make image files (PNG, SVG, PDF, PS).
5561

5662
There are a two primary ways to configure your backend. One is to set
5763
the ``backend`` parameter in you ``matplotlibrc`` file (see
58-
link:Configuring)::
64+
:ref:`customizing-matplotlib`)::
5965

6066
backend : WXAgg # use wxpython with antigrain (agg) rendering
6167

doc/faq/troubleshooting_faq.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
.. _troubleshooting-faq:
2+
13
===================
24
Troubleshooting FAQ
35
===================
46

7+
58
.. _reporting-problems:
69

710
How do I report a problem?
@@ -16,16 +19,26 @@ If not, please provide the following information in your e-mail to the
1619
<http://lists.sourceforge.net/mailman/listinfo/matplotlib-users>`_:
1720

1821
* your operating system; on Linux/UNIX post the output of ``uname -a``
19-
* matplotlib version : ``import matplotlib; print matplotlib.__version__``
22+
23+
* matplotlib version::
24+
25+
python -c `import matplotlib; print matplotlib.__version__`
26+
2027
* where you obtained matplotlib (e.g. your Linux distribution's
2128
packages or the matplotlib Sourceforge site)
22-
* any customizations to your ``matplotlibrc`` file
29+
30+
* any customizations to your ``matplotlibrc`` file (see
31+
:ref:`customizing-matplotlib`).
32+
2333
* if the problem is reproducible, please try to provide a *minimal*,
2434
standalone Python script that demonstrates the problem
35+
2536
* you can get very helpful debugging output from matlotlib by
2637
running your script with a ``verbose-helpful`` or
2738
``--verbose-debug`` flags and posting the verbose output the
28-
lists.
39+
lists::
40+
41+
> python simple_plot.py --verbose-helpful > output.txt
2942

3043
If you compiled matplotlib yourself, please also provide
3144

doc/users/artists.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _artist-tutorial:
2+
13
***************
24
Artist tutorial
35
***************
@@ -136,6 +138,8 @@ Try creating the figure below.
136138
.. image:: figures/fig_axes_labels_simple.png
137139
:scale: 75
138140

141+
.. _customizing-artists:
142+
139143
Customizing your objects
140144
========================
141145

@@ -231,6 +235,8 @@ docs at http://matplotlib.sourceforge.net/classdocs.html or PDF documentation
231235
at http://matplotlib.sourceforge.net/api.pdf for a listing of
232236
properties for a give object.
233237

238+
.. _object-containers:
239+
234240
Object containers
235241
=================
236242

doc/users/customizing.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _customizing-matplotlib:
2+
13
Customizing matplotlib
24
======================
35

@@ -20,6 +22,8 @@ do::
2022
matplotlib.rc('lines', linewidth=2, color='r')
2123

2224

25+
.. _matplotlibrc-sample:
26+
2327
A sample matplotlibrc file
2428
--------------------------
2529

0 commit comments

Comments
 (0)