Skip to content

Commit d9268bd

Browse files
committed
fixing broken links, small errors in syntax, etc
1 parent fc1fc84 commit d9268bd

File tree

87 files changed

+337
-262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+337
-262
lines changed

doc/api/animation_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Examples
162162
:maxdepth: 1
163163

164164
../examples/animation/basic_example
165-
../examples/animation/basic_example_writer
165+
../examples/animation/basic_example_writer_sgskip
166166
../examples/animation/dynamic_image2
167167

168168

examples/README.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Gallery
44
=======
55

6-
Click on any image to see full size image and source code.
6+
This gallery contains examples of the many things you can do with
7+
Matplotlib. Click on any image to see the full image and source code.
78

89
.. contents::

examples/animation/moviewriter_sgskip.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- noplot -*-
22
"""
3+
.. _animation-moviewriter:
4+
35
===========
46
MovieWriter
57
===========

examples/api/agg_oo_sgskip.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# -*- noplot -*-
22
"""
3+
.. _api-agg_oo:
4+
35
=============================
46
The object-oriented interface
57
=============================
68
79
A pure OO (look Ma, no pylab!) example using the agg backend
810
9-
1011
"""
1112
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
1213
from matplotlib.figure import Figure

examples/api/font_file_sgskip.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
font_manager.FontProperties fname argument (for a more flexible
1010
solution, see the font_family_rc.py and fonts_demo.py examples).
1111
12-
1312
"""
1413
import sys
1514
import os

examples/axes_grid1/demo_axes_rgb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
=============
3-
Demo Axes Rgb
3+
Demo Axes RGB
44
=============
55
66
"""

examples/event_handling/pipong.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Pipong
44
======
55
6-
A matplotlib based game of Pong illustrating one way to write interactive
6+
A Matplotlib based game of Pong illustrating one way to write interactive
77
animation which are easily ported to multiple backends
88
pipong.py was written by Paul Ivanov <http://pirsquared.org>
99
"""

examples/event_handling/pong_gtk_sgskip.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
"""
22
========
3-
Pong Gtk
3+
Pong GTK
44
========
55
6-
For detailed comments on animation and the techniques used here, see
7-
the wiki entry
8-
http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
6+
A small game demo using GTK.
97
108
"""
119
from __future__ import print_function

examples/misc/README.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Miscellaneous Examples
2+
======================

examples/misc/contour_manual.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
==============
3-
Contour Manual
3+
Manual Contour
44
==============
55
66
Example of displaying your own contour lines and polygons using ContourSet.

examples/misc/image_thumbnail_sgskip.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- noplot -*-
22
"""
3+
.. _misc-image_thumbnail:
4+
35
===============
46
Image Thumbnail
57
===============

examples/misc/rc_traits_sgskip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
=========
66
77
Here is some example code showing how to define some representative
8-
rc properties and construct a matplotlib artist using traits.
9-
matplotlib does not ship with enthought.traits, so you will need to
8+
rc properties and construct a Matplotlib artist using traits.
9+
Matplotlib does not ship with enthought.traits, so you will need to
1010
install it separately.
1111
1212
"""

examples/misc/svg_filter_line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
===============
3-
Svg Filter Line
3+
SVG Filter Line
44
===============
55
66
Demonstrate SVG filtering effects which might be used with mpl.

examples/misc/svg_filter_pie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
==============
3-
Svg Filter Pie
3+
SVG Filter Pie
44
==============
55
66
Demonstrate SVG filtering effects which might be used with mpl.

examples/pylab_examples/annotation_demo.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@
2626
2727
Valid keys are
2828
29-
width : the width of the arrow in points
30-
frac : the fraction of the arrow length occupied by the head
31-
headwidth : the width of the base of the arrow head in points
32-
shrink : move the tip and base some percent away from the
33-
annotated point and text
34-
any key for matplotlib.patches.polygon (e.g., facecolor)
29+
width : the width of the arrow in points
30+
frac : the fraction of the arrow length occupied by the head
31+
headwidth : the width of the base of the arrow head in points
32+
shrink : move the tip/base some % away from the annotated point and text
33+
any key for matplotlib.patches.polygon (e.g., facecolor)
3534
3635
For physical coordinate systems (points or pixels) the origin is the
3736
(bottom, left) of the figure or axes.

examples/pylab_examples/anscombe.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
========
3-
Anscombe
4-
========
2+
==================
3+
Anscombe's Quartet
4+
==================
55
66
"""
77
from __future__ import print_function

examples/pylab_examples/aspect_loglog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
=============
3-
Aspect Loglog
3+
Loglog Aspect
44
=============
55
66
"""

examples/pylab_examples/axis_equal_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Axis Equal Demo
44
===============
55
6-
This example is only interesting when ran in interactive mode
6+
This example is only interesting when run in interactive mode.
77
88
"""
99

examples/pylab_examples/bar_stacked.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Bar Stacked
44
===========
55
6-
a stacked bar plot with errorbars
6+
A stacked bar plot with errorbars.
77
"""
88
import numpy as np
99
import matplotlib.pyplot as plt

examples/pylab_examples/centered_ticklabels.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
Centered Ticklabels
44
===================
55
6-
sometimes it is nice to have ticklabels centered. mpl currently
6+
sometimes it is nice to have ticklabels centered. Matplotlib currently
77
associates a label with a tick, and the label can be aligned
8-
'center', 'left', or 'right' using the horizontal alignment property:
8+
'center', 'left', or 'right' using the horizontal alignment property::
99
1010
11-
for label in ax.xaxis.get_xticklabels():
12-
label.set_horizontalalignment('right')
13-
11+
for label in ax.xaxis.get_xticklabels():
12+
label.set_horizontalalignment('right')
1413
1514
but this doesn't help center the label between ticks. One solution
16-
is to "face it". Use the minor ticks to place a tick centered
15+
is to "fake it". Use the minor ticks to place a tick centered
1716
between the major ticks. Here is an example that labels the months,
1817
centered between the ticks
1918
"""

examples/pylab_examples/color_by_yvalue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Color By Yvalue
44
===============
55
6-
use masked arrays to plot a line with different colors by y-value
6+
Use masked arrays to plot a line with different colors by y-value.
77
"""
88
import numpy as np
99
import matplotlib.pyplot as plt

examples/pylab_examples/colours_sgskip.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
Some simple functions to generate colours.
88
9-
109
"""
1110
import numpy as np
1211
from matplotlib import colors as mcolors

examples/pylab_examples/contour_label_demo.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
##################################################
2222
# Define our surface
23-
##################################################
2423
delta = 0.025
2524
x = np.arange(-3.0, 3.0, delta)
2625
y = np.arange(-2.0, 2.0, delta)
@@ -33,7 +32,6 @@
3332
##################################################
3433
# Make contour labels using creative float classes
3534
# Follows suggestion of Manuel Metz
36-
##################################################
3735
plt.figure()
3836

3937
# Basic contour plot
@@ -63,7 +61,6 @@ def __repr__(self):
6361
##################################################
6462
# Label contours with arbitrary strings using a
6563
# dictionary
66-
##################################################
6764
plt.figure()
6865

6966
# Basic contour plot

examples/pylab_examples/coords_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Coords Report
44
=============
55
6-
override the default reporting of coords
6+
Override the default reporting of coords.
77
"""
88

99
import matplotlib.pyplot as plt

examples/pylab_examples/cursor_demo_sgskip.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
Cursor Demo
55
===========
66
7-
"""
8-
9-
"""
107
This example shows how to use matplotlib to provide a data cursor. It
118
uses matplotlib to draw the cursor and may be a slow since this
129
requires redrawing the figure with every mouse move.
@@ -16,6 +13,7 @@
1613
1714
The mpldatacursor and mplcursors third-party packages can be used to achieve a
1815
similar effect. See
16+
1917
https://github.com/joferkington/mpldatacursor
2018
https://github.com/anntzer/mplcursors
2119
"""

examples/pylab_examples/custom_cmap.py

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
"""
2-
===========
3-
Custom Cmap
4-
===========
5-
6-
"""
7-
import numpy as np
8-
import matplotlib.pyplot as plt
9-
from matplotlib.colors import LinearSegmentedColormap
10-
11-
"""
2+
=========================================
123
Creating a colormap from a list of colors
13-
-----------------------------------------
4+
=========================================
5+
146
Creating a colormap from a list of colors can be done with the `from_list`
157
method of `LinearSegmentedColormap`. You must pass a list of RGB tuples that
168
define the mixture of colors from 0 to 1.
@@ -24,20 +16,20 @@
2416
2517
Example: suppose you want red to increase from 0 to 1 over the bottom
2618
half, green to do the same over the middle half, and blue over the top
27-
half. Then you would use:
19+
half. Then you would use::
2820
29-
cdict = {'red': ((0.0, 0.0, 0.0),
30-
(0.5, 1.0, 1.0),
31-
(1.0, 1.0, 1.0)),
21+
cdict = {'red': ((0.0, 0.0, 0.0),
22+
(0.5, 1.0, 1.0),
23+
(1.0, 1.0, 1.0)),
3224
33-
'green': ((0.0, 0.0, 0.0),
34-
(0.25, 0.0, 0.0),
35-
(0.75, 1.0, 1.0),
36-
(1.0, 1.0, 1.0)),
25+
'green': ((0.0, 0.0, 0.0),
26+
(0.25, 0.0, 0.0),
27+
(0.75, 1.0, 1.0),
28+
(1.0, 1.0, 1.0)),
3729
38-
'blue': ((0.0, 0.0, 0.0),
39-
(0.5, 0.0, 0.0),
40-
(1.0, 1.0, 1.0))}
30+
'blue': ((0.0, 0.0, 0.0),
31+
(0.5, 0.0, 0.0),
32+
(1.0, 1.0, 1.0))}
4133
4234
If, as in this example, there are no discontinuities in the r, g, and b
4335
components, then it is quite simple: the second and third element of
@@ -61,18 +53,22 @@
6153
y1, it is saying that for x from 0 to 0.5, red increases from 0 to 1,
6254
but then it jumps down, so that for x from 0.5 to 1, red increases from
6355
0.7 to 1. Green ramps from 0 to 1 as x goes from 0 to 0.5, then jumps
64-
back to 0, and ramps back to 1 as x goes from 0.5 to 1.
56+
back to 0, and ramps back to 1 as x goes from 0.5 to 1.::
6557
66-
row i: x y0 y1
67-
/
68-
/
69-
row i+1: x y0 y1
58+
row i: x y0 y1
59+
/
60+
/
61+
row i+1: x y0 y1
7062
7163
Above is an attempt to show that for x in the range x[i] to x[i+1], the
7264
interpolation is between y1[i] and y0[i+1]. So, y0[0] and y1[-1] are
7365
never used.
7466
7567
"""
68+
import numpy as np
69+
import matplotlib.pyplot as plt
70+
from matplotlib.colors import LinearSegmentedColormap
71+
7672
# Make some illustrative fake data:
7773

7874
x = np.arange(0, np.pi, 0.1)

examples/pylab_examples/customize_rc.py

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,22 @@
99
If you like to work interactively, and need to create different sets
1010
of defaults for figures (e.g., one set of defaults for publication, one
1111
set for interactive exploration), you may want to define some
12-
functions in a custom module that set the defaults, e.g.,
13-
14-
def set_pub():
15-
rc('font', weight='bold') # bold fonts are easier to see
16-
rc('tick', labelsize=15) # tick labels bigger
17-
rc('lines', lw=1, color='k') # thicker black lines (no budget for color!)
18-
rc('grid', c='0.5', ls='-', lw=0.5) # solid gray grid lines
19-
rc('savefig', dpi=300) # higher res outputs
20-
21-
22-
23-
Then as you are working interactively, you just need to do
24-
25-
>>> set_pub()
26-
>>> subplot(111)
27-
>>> plot([1,2,3])
28-
>>> savefig('myfig')
29-
>>> rcdefaults() # restore the defaults
12+
functions in a custom module that set the defaults, e.g.,::
13+
14+
def set_pub():
15+
rc('font', weight='bold') # bold fonts are easier to see
16+
rc('tick', labelsize=15) # tick labels bigger
17+
rc('lines', lw=1, color='k') # thicker black lines (no budget for color!)
18+
rc('grid', c='0.5', ls='-', lw=0.5) # solid gray grid lines
19+
rc('savefig', dpi=300) # higher res outputs
20+
21+
Then as you are working interactively, you just need to do::
22+
23+
>>> set_pub()
24+
>>> subplot(111)
25+
>>> plot([1,2,3])
26+
>>> savefig('myfig')
27+
>>> rcdefaults() # restore the defaults
3028
3129
"""
3230
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)