8000 changes for MEP12/sphinx-gallery compliance · matplotlib/matplotlib@82c52f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 82c52f3

Browse files
yinleontacaswell
authored andcommitted
changes for MEP12/sphinx-gallery compliance
1 parent 2228b5e commit 82c52f3

File tree

12 files changed

+72
-42
lines changed

12 files changed

+72
-42
lines changed

examples/axisartist/demo_axisline_style.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""
2-
===================
3-
Demo Axisline Style
4-
===================
2+
================
3+
Axis Line Styles
4+
================
55
6+
This example shows some configurations for axis style.
67
"""
78

89
from mpl_toolkits.axisartist.axislines import SubplotZero
@@ -15,10 +16,14 @@
1516
fig.add_subplot(ax)
1617

1718
for direction in ["xzero", "yzero"]:
19+
# adds arrows at the ends of each axis
1820
ax.axis[direction].set_axisline_style("-|>")
21+
22+
# adds X and Y-axis from the origin
1923
ax.axis[direction].set_visible(True)
2024

2125
for direction in ["left", "right", "bottom", "top"]:
26+
# hides boarders
2227
ax.axis[direction].set_visible(False)
2328

2429
x = np.linspace(-0.5, 1., 100)

examples/event_handling/resample.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
"""
2-
========
3-
Resample
4-
========
2+
===============
3+
Resampling Data
4+
===============
5+
6+
7+
Downsampling lowers the sample rate or sample size of a signal. In
8+
this tutorial, the signal is downsampled when the plot is adjusted
9+
through dragging and zooming.
510
611
"""
12+
713
import numpy as np
814
import matplotlib.pyplot as plt
915

10-
1116
# A class that will downsample the data and recompute when zoomed.
1217
class DataDisplayDownsampler(object):
1318
def __init__(self, xdata, ydata):
1419
self.origYData = ydata
1520
self.origXData = xdata
16-
self.ratio = 5
21+
self.ratio = 50
1722
self.delta = xdata[-1] - xdata[0]
1823

1924
def downsample(self, xstart, xend):

examples/mplot3d/lines3d.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'''
2-
===================
3-
3D parametric curve
4-
===================
2+
================
3+
Parametric Curve
4+
================
55
6-
Demonstrating plotting a parametric curve in 3D.
6+
This example demonstrates plotting a para 6D40 metric curve in 3D.
77
'''
88

99
import matplotlib as mpl

examples/mplot3d/lorenz_attractor.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
'''
2-
====================
3-
The Lorenz Attractor
4-
====================
2+
================
3+
Lorenz Attractor
4+
================
5+
6+
This is an example of plotting Edward Lorenz's 1963 "Deterministic
7+
Nonperiodic Flow" in a 3-dimensional space using mplot3d.
58
6-
Plot of the Lorenz Attractor based on Edward Lorenz's 1963 "Deterministic
7-
Nonperiodic Flow" publication.
89
http://journals.ametsoc.org/doi/abs/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2
910
1011
Note: Because this is a simple non-linear ODE, it would be more easily

examples/mplot3d/mixed_subplots.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"""
2-
==================
3-
2D and 3D subplots
4-
==================
5-
6-
Demonstrate the mixing of 2d and 3d subplots.
2+
============================================
3+
Demonstrate the mixing of 2d and 3d subplots
4+
============================================
5+
This example shows a how to plot a 2D and 3D plot on the same figure.
76
"""
87

98
from mpl_toolkits.mplot3d import Axes3D

examples/mplot3d/offset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'''
2-
===================
3-
Offset text display
4-
===================
2+
=========================
3+
Automatic Text Offsetting
4+
=========================
55
66
This example demonstrates mplot3d's offset text display.
77
As one rotates the 3D figure, the offsets should remain oriented the

examples/pylab_examples/bar_stacked.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
"""
2-
===========
3-
Bar Stacked
4-
===========
2+
=================
3+
Stacked Bar Graph
4+
=================
5+
6+
This is an example of creating a stacked bar plot with error bars
7+
using `plt.bar`. Note the parameters `yerr` used for error bars, and
8+
`bottom` to stack the women's bars on top of the men's bars.
59
6-
A stacked bar plot with errorbars.
710
"""
11+
12+
# a stacked bar plot with errorbars
813
import numpy as np
914
import matplotlib.pyplot as plt
1015

examples/pylab_examples/dolphin.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
"""
22
=======
3-
Dolphin
3+
Dophins
44
=======
55
6+
7+
This example shows how to draw, and manipulate shapes given verticies
8+
and nodes using the patches, path and transforms classes.
9+
610
"""
11+
712
import matplotlib.cm as cm
813
import matplotlib.pyplot as plt
914
from matplotlib.patches import Circle, PathPatch

examples/pylab_examples/fill_between_demo.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
"""
2-
=================
3-
Fill Between Demo
4-
=================
2+
==============================
3+
Filling the area between lines
4+
==============================
55
6+
This example shows how to use fill_between() to color between lines based on user-defined logic.
67
"""
8+
79
import matplotlib.pyplot as plt
810
import numpy as np
911

examples/pylab_examples/geo_demo.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
"""
2-
========
3-
Geo Demo
4-
========
2+
======================
3+
Geographic Projections
4+
======================
55
6+
This shows 4 possible projections using subplot.
7+
Matplotlib also supports the <a href='http://matplotlib.org/basemap/'>Basemaps Toolkit</a> for geographic projections.
68
"""
9+
710
import matplotlib.pyplot as plt
811

912
plt.figure()

examples/pylab_examples/log_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
"""
22
========
3-
Log Test
3+
Log Axis
44
========
55
6+
This is an example of assigning a log-scale for the x-axis using
7+
`semilogx`.
68
"""
9+
710
import matplotlib.pyplot as plt
811
import numpy as np
912

examples/pylab_examples/mri_demo.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
"""
2-
========
3-
MRI Demo
4-
========
2+
===
3+
MRI
4+
===
55
6-
Displays an MRI image.
7-
"""
86
7+
This example illustrates how to read an image (of an MRI) into a numpy
8+
array, and display it in greyscale using `ax.imshow`.
9+
10+
"""
911

1012
import matplotlib.pyplot as plt
1113
import matplotlib.cbook as cbook

0 commit comments

Comments
 (0)
0