44Screenshots
55**********************
66
7- Here you will find a host of example figures with the code that
8- generated them
7+ Here you'll find a host of example plots with the code that
8+ generated them.
99
1010Simple Plot
1111===========
1212
13- The most basic :func: `~matplotlib.pyplot.plot `, with text labels
13+ Here's a very basic :func: `~matplotlib.pyplot.plot ` with text labels:
1414
1515.. plot :: mpl_examples/pylab_examples/simple_plot.py
1616
@@ -19,8 +19,8 @@ The most basic :func:`~matplotlib.pyplot.plot`, with text labels
1919Subplot demo
2020============
2121
22- Multiple regular axes (numrows by numcolumns ) are created with the
23- :func: `~matplotlib.pyplot.subplot ` command.
22+ Multiple axes (i.e. subplots ) are created with the
23+ :func: `~matplotlib.pyplot.subplot ` command:
2424
2525.. plot :: mpl_examples/subplots_axes_and_figures/subplot_demo.py
2626
@@ -30,7 +30,7 @@ Histograms
3030==========
3131
3232The :func: `~matplotlib.pyplot.hist ` command automatically generates
33- histograms and will return the bin counts or probabilities
33+ histograms and returns the bin counts or probabilities:
3434
3535.. plot :: mpl_examples/statistics/histogram_demo_features.py
3636
@@ -40,8 +40,8 @@ histograms and will return the bin counts or probabilities
4040Path demo
4141=========
4242
43- You can add arbitrary paths in matplotlib as of release 0.98. See
44- the :mod: `matplotlib.path `.
43+ You can add arbitrary paths in matplotlib using the
44+ :mod: `matplotlib.path ` module:
4545
4646.. plot :: mpl_examples/shapes_and_collections/path_patch_demo.py
4747
@@ -52,13 +52,14 @@ mplot3d
5252
5353The mplot3d toolkit (see :ref: `toolkit_mplot3d-tutorial ` and
5454:ref: `mplot3d-examples-index `) has support for simple 3d graphs
55- including surface, wireframe, scatter, and bar charts (added in
56- matlpotlib-0.99). Thanks to John Porter, Jonathon Taylor and Reinier
57- Heeres for the mplot3d toolkit. The toolkit is included with all
58- standard matplotlib installs.
55+ including surface, wireframe, scatter, and bar charts.
5956
6057.. plot :: mpl_examples/mplot3d/surface3d_demo.py
6158
59+ Thanks to John Porter, Jonathon Taylor, Reinier Heeres, and Ben Root for
60+ the `mplot3d ` toolkit. This toolkit is included with all standard matplotlib
61+ installs.
62+
6263.. _screenshots_ellipse_demo :
6364
6465
@@ -67,12 +68,10 @@ Ellipses
6768
6869In support of the
6970`Phoenix <http://www.jpl.nasa.gov/news/phoenix/main.php >`_ mission to
70- Mars, which used matplotlib in ground tracking of the spacecraft,
71- Michael Droettboom built on work by Charlie Moad to provide an
72- extremely accurate 8-spline approximation to elliptical arcs (see
73- :class: `~matplotlib.patches.Arc `) in the viewport. This
74- provides a scale free, accurate graph of the arc regardless of zoom
75- level
71+ Mars (which used matplotlib to display ground tracking of spacecraft),
72+ Michael Droettboom built on work by Charlie Moad to provide an extremely
73+ accurate 8-spline approximation to elliptical arcs (see
74+ :class: `~matplotlib.patches.Arc `), which are insensitive to zoom level.
7675
7776.. plot :: mpl_examples/pylab_examples/ellipse_demo.py
7877
@@ -81,27 +80,29 @@ level
8180Bar charts
8281==========
8382
84- The :func: `~matplotlib.pyplot.bar `
85- command takes error bars as an optional argument. You can also use up
86- and down bars, stacked bars, candlestick bars, etc, ... See
87- `bar_stacked.py <examples/pylab_examples/bar_stacked.py >`_ for another example.
88- You can make horizontal bar charts with the
89- :func: `~matplotlib.pyplot.barh ` command.
83+ Bar charts are simple to create using the :func: `~matplotlib.pyplot.bar `
84+ command, which includes customizations such as error bars:
9085
9186.. plot :: mpl_examples/pylab_examples/barchart_demo.py
9287
88+ It's also simple to create stacked bars
89+ (`bar_stacked.py <mpl_examples/pylab_examples/bar_stacked.html >`_),
90+ candlestick bars
91+ (`bar_stacked.py <mpl_examples/pylab_examples/finance_demo.html >`_),
92+ and horizontal bar charts
93+ (`barh_demo.py <mpl_examples/lines_bars_and_markers/barh_demo.html >`_).
94+
9395.. _screenshots_pie_demo :
9496
9597
9698Pie charts
9799==========
98100
99- The :func: `~matplotlib.pyplot.pie ` command
100- uses a MATLAB compatible syntax to produce pie charts. Optional
101- features include auto-labeling the percentage of area, exploding one
102- or more wedges out from the center of the pie, and a shadow effect.
103- Take a close look at the attached code that produced this figure; nine
104- lines of code.
101+ The :func: `~matplotlib.pyplot.pie ` command allows you to easily create pie
102+ charts. Optional features include auto-labeling the percentage of area,
103+ exploding one or more wedges from the center of the pie, and a shadow effect.
104+ Take a close look at the attached code, which generates this figure in just
105+ a few lines of code.
105106
106107.. plot :: mpl_examples/pie_and_polar_charts/pie_demo_features.py
107108
@@ -110,23 +111,23 @@ lines of code.
110111Table demo
111112==========
112113
113- The :func: `~matplotlib.pyplot.table ` command will place a text table
114- on the axes
114+ The :func: `~matplotlib.pyplot.table ` command adds a text table
115+ to an axes.
115116
116117.. plot :: mpl_examples/pylab_examples/table_demo.py
117118
118119
119120.. _screenshots_scatter_demo :
120121
122+
121123Scatter demo
122124============
123125
124126The :func: `~matplotlib.pyplot.scatter ` command makes a scatter plot
125- with (optional) size and color arguments. This example plots changes
126- in Google stock price from one day to the next with the sizes coding
127- trading volume and the colors coding price change in day i. Here the
128- alpha attribute is used to make semitransparent circle markers with
129- the Agg backend (see :ref: `what-is-a-backend `)
127+ with (optional) size and color arguments. This example plots changes
128+ in Google's stock price, with marker sizes reflecting the
129+ trading volume and colors varying with time. Here, the
130+ alpha attribute is used to make semitransparent circle markers.
130131
131132.. plot :: mpl_examples/pylab_examples/scatter_demo2.py
132133
@@ -138,8 +139,8 @@ Slider demo
138139
139140Matplotlib has basic GUI widgets that are independent of the graphical
140141user interface you are using, allowing you to write cross GUI figures
141- and widgets. See matplotlib.widgets and the widget ` examples
142- < examples/widgets> `
142+ and widgets. See :mod: ` matplotlib.widgets ` and the
143+ ` widget examples < ../ examples/widgets/index.html >`_.
143144
144145.. plot :: mpl_examples/widgets/slider_demo.py
145146
@@ -150,34 +151,33 @@ Fill demo
150151=========
151152
152153The :func: `~matplotlib.pyplot.fill ` command lets you
153- plot filled polygons. Thanks to Andrew Straw for providing this
154- function
154+ plot filled curves and polygons:
155155
156156.. plot :: mpl_examples/lines_bars_and_markers/fill_demo.py
157157
158+ Thanks to Andrew Straw for adding this function.
158159
159160.. _screenshots_date_demo :
160161
161162Date demo
162163=========
163164
164- You can plot date data with major and minor ticks and custom tick
165- formatters for both the major and minor ticks; see matplotlib.ticker
166- and matplotlib.dates for details and usage.
165+ You can plot date data with major and minor ticks and custom tick formatters
166+ for both.
167167
168168.. plot :: mpl_examples/api/date_demo.py
169169
170+ See :mod: `matplotlib.ticker ` and :mod: `matplotlib.dates ` for details and usage.
171+
170172.. _screenshots_jdh_demo :
171173
172174Financial charts
173175================
174176
175- You can make much more sophisticated financial plots. This example
176- emulates one of the `ChartDirector
177- <http://www.advsofteng.com/gallery_finance.html> `_ financial plots.
178- Some of the data in the plot, are real financial data, some are random
179- traces that I used since the goal was to illustrate plotting
180- techniques, not market analysis!
177+ You can make sophisticated financial plots by combining the various
178+ plot functions, layout commands, and labeling tools provided by matplotlib.
179+ The following example emulates one of the financial plots in
180+ `ChartDirector <http://www.advsofteng.com/gallery_finance.html >`_:
181181
182182
183183.. plot :: mpl_examples/pylab_examples/finance_work2.py
@@ -188,9 +188,7 @@ techniques, not market analysis!
188188Basemap demo
189189============
190190
191- Jeff Whitaker's :ref: `toolkit_basemap ` add-on toolkit makes it possible to plot data on many
192- different map projections. This example shows how to plot contours, markers and text
193- on an orthographic projection, with NASA's "blue marble" satellite image as a background.
191+ Jeff Whitaker's :ref: `toolkit_basemap ` add-on toolkit makes it possible to plot data on many different map projections. This example shows how to plot contours, markers and text on an orthographic projection, with NASA's "blue marble" satellite image as a background.
194192
195193.. plot :: pyplots/plotmap.py
196194
@@ -201,16 +199,14 @@ Log plots
201199
202200The :func: `~matplotlib.pyplot.semilogx `,
203201:func: `~matplotlib.pyplot.semilogy ` and
204- :func: `~matplotlib.pyplot.loglog ` functions generate log scaling on the
205- respective axes. The lower subplot uses a base10 log on the xaxis and
206- a base 4 log on the yaxis. Thanks to Andrew Straw, Darren Dale and
207- Gregory Lielens for contributions to the log scaling
208- infrastructure.
209-
210-
202+ :func: `~matplotlib.pyplot.loglog ` functions simplify the creation of
203+ logarithmic plots.
211204
212205.. plot :: mpl_examples/pylab_examples/log_demo.py
213206
207+ Thanks to Andrew Straw, Darren Dale and Gregory Lielens for contributions
208+ log-scaling infrastructure.
209+
214210.. _screenshots_polar_demo :
215211
216212Polar plots
@@ -222,40 +218,43 @@ The :func:`~matplotlib.pyplot.polar` command generates polar plots.
222218
223219.. _screenshots_legend_demo :
224220
221+
225222Legends
226223=======
227224
228225The :func: `~matplotlib.pyplot.legend ` command automatically
229- generates figure legends, with MATLAB compatible legend placement
230- commands. Thanks to Charles Twardy for input on the legend
231- command
226+ generates figure legends, with MATLAB-compatible legend placement
227+ commands.
232228
233229.. plot :: mpl_examples/pylab_examples/legend_demo.py
234230
231+ Thanks to Charles Twardy for input on the legend command.
232+
235233.. _screenshots_mathtext_examples_demo :
236234
237235Mathtext_examples
238236=================
239237
240- A sampling of the many TeX expressions now supported by matplotlib's
241- internal mathtext engine. The mathtext module provides TeX style
242- mathematical expressions using `freetype2
243- <http://freetype.sourceforge.net/index2.html> `_ and the BaKoMa
244- computer modern or `STIX <http://www.stixfonts.org >`_ fonts. See the
245- :mod: `matplotlib.mathtext ` module for additional. matplotlib mathtext
246- is an independent implementation, and does not required TeX or any
247- external packages installed on your computer. See the tutorial at
248- :ref: `mathtext-tutorial `.
238+ Below is a sampling of the many TeX expressions now supported by matplotlib's
239+ internal mathtext engine. The mathtext module provides TeX style mathematical
240+ expressions using `freetype2 <http://freetype.sourceforge.net/index2.html >`_
241+ and the BaKoMa computer modern or `STIX <http://www.stixfonts.org >`_ fonts.
242+ See the :mod: `matplotlib.mathtext ` module for additional details.
249243
250244.. plot :: mpl_examples/pylab_examples/mathtext_examples.py
251245
246+ Matplotlib's mathtext infrastructure is an independent implementation and
247+ does not require TeX or any external packages installed on your computer. See
248+ the tutorial at :ref: `mathtext-tutorial `.
249+
250+
252251.. _screenshots_tex_demo :
253252
254253Native TeX rendering
255254====================
256255
257256Although matplotlib's internal math rendering engine is quite
258- powerful, sometimes you need TeX, and matplotlib supports external TeX
257+ powerful, sometimes you need TeX. Matplotlib supports external TeX
259258rendering of strings with the *usetex * option.
260259
261260.. plot :: pyplots/tex_demo.py
@@ -265,17 +264,20 @@ rendering of strings with the *usetex* option.
265264EEG demo
266265=========
267266
268- You can embed matplotlib into pygtk, wxpython, Tk, FLTK or Qt
269- applications. Here is a screenshot of an eeg viewer called pbrain
270- which is part of the NeuroImaging in Python suite `NIPY
271- <http://neuroimaging.scipy.org> `_. Pbrain is written in pygtk using
272- matplotlib. The lower axes uses :func: `~matplotlib.pyplot.specgram `
273- to plot the spectrogram of one of the EEG channels. For an example of
274- how to use the navigation toolbar in your applications, see
275- :ref: `user_interfaces-embedding_in_gtk2 `. If you want to use
276- matplotlib in a wx application, see
277- :ref: `user_interfaces-embedding_in_wx2 `. If you want to work with
278- `glade <http://glade.gnome.org >`_, see
279- :ref: `user_interfaces-mpl_with_glade `.
267+ You can embed matplotlib into pygtk, wx, Tk, FLTK, or Qt
268+ applications. Here is a screenshot of an EEG viewer called pbrain,
269+ which is part of the NeuroImaging in Python suite
270+ `NIPY <http://nipy.sourceforge.net/nipy/stable/index.html >`_.
280271
281272.. image :: ../_static/eeg_small.png
273+
274+ The lower axes uses :func: `~matplotlib.pyplot.specgram `
275+ to plot the spectrogram of one of the EEG channels.
276+
277+ For examples of how to embed matplotlib in different toolkits, see:
278+
279+ * :ref: `user_interfaces-embedding_in_gtk2 `
280+ * :ref: `user_interfaces-embedding_in_wx2 `
281+ * :ref: `user_interfaces-mpl_with_glade `
282+ * :ref: `user_interfaces-embedding_in_qt `
283+ * :ref: `user_interfaces-embedding_in_tk `
0 commit comments