-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathscreenshots.html
More file actions
470 lines (453 loc) · 36.4 KB
/
screenshots.html
File metadata and controls
470 lines (453 loc) · 36.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Screenshots — Matplotlib 1.3.1 documentation</title>
<link rel="stylesheet" href="../_static/mpl.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.3.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Matplotlib 1.3.1 documentation"
href="../_static/opensearch.xml"/>
<link rel="top" title="Matplotlib 1.3.1 documentation" href="../index.html" />
<link rel="up" title="User’s Guide" href="index.html" />
<link rel="next" title="What’s new in matplotlib" href="whats_new.html" />
<link rel="prev" title="Our Favorite Recipes" href="recipes.html" />
<link rel="canonical" href="https://matplotlib.org/2.0.2/users/screenshots.html" />
<script data-domain="matplotlib.org" defer="defer" src="https://views.scientific-python.org/js/script.js"></script>
</head>
<body>
<div id="unreleased-message"> You are reading an old version of the documentation (v1.3.1). For the latest version see <a href="/stable/">https://matplotlib.org/stable/</a> </div>
<!-- Piwik -->
<script type="text/javascript">
if ("matplotlib.sourceforge.net" == document.location.hostname ||
"matplotlib.sf.net" == document.location.hostname) {
var pkBaseURL = (("https:" == document.location.protocol) ? "https://apps.sourceforge.net/piwik/matplotlib/" : "http://apps.sourceforge.net/piwik/matplotlib/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript">
if ("matplotlib.sourceforge.net" == document.location.hostname ||
"matplotlib.sf.net" == document.location.hostname) {
piwik_action_name = '';
piwik_idsite = 1;
piwik_url = pkBaseURL + "piwik.php";
piwik_log(piwik_action_name, piwik_idsite, piwik_url);
document.write(unescape('%3Cobject%3E%3Cnoscript%3E%3Cp%3E%3Cimg src="http://apps.sourceforge.net/piwik/matplotlib/piwik.php?idsite=1" alt="piwik"/%3E%3C/p%3E%3C/noscript%3E%3C/object%3E'));
}
</script>
<!-- End Piwik Tag -->
<link rel="shortcut icon" href="_static/favicon.ico">
<!-- The "Fork me on github" ribbon -->
<img style="float: right; margin-bottom: -40px; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" usemap="#ribbonmap"/>
<map name="ribbonmap">
<area shape="poly" coords="15,0,148,-1,148,135" href="https://github.com/matplotlib/matplotlib" title="Fork me on GitHub" />
</map>
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
<a href="../index.html"><img src="../_static/logo2.png" border="0" alt="matplotlib"/></a>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="whats_new.html" title="What’s new in matplotlib"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="recipes.html" title="Our Favorite Recipes"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">home</a>| </li>
<li><a href="../examples/index.html">examples</a>| </li>
<li><a href="../gallery.html">gallery</a>| </li>
<li><a href="../api/pyplot_summary.html">pyplot</a>| </li>
<li><a href="../contents.html">docs</a> »</li>
<li><a href="index.html" accesskey="U">User’s Guide</a> »</li>
</ul>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Screenshots</a><ul>
<li><a class="reference internal" href="#simple-plot">Simple Plot</a></li>
<li><a class="reference internal" href="#subplot-demo">Subplot demo</a></li>
<li><a class="reference internal" href="#histograms">Histograms</a></li>
<li><a class="reference internal" href="#path-demo">Path demo</a></li>
<li><a class="reference internal" href="#mplot3d">mplot3d</a></li>
<li><a class="reference internal" href="#streamplot">Streamplot</a></li>
<li><a class="reference internal" href="#ellipses">Ellipses</a></li>
<li><a class="reference internal" href="#bar-charts">Bar charts</a></li>
<li><a class="reference internal" href="#pie-charts">Pie charts</a></li>
<li><a class="reference internal" href="#table-demo">Table demo</a></li>
<li><a class="reference internal" href="#scatter-demo">Scatter demo</a></li>
<li><a class="reference internal" href="#slider-demo">Slider demo</a></li>
<li><a class="reference internal" href="#fill-demo">Fill demo</a></li>
<li><a class="reference internal" href="#date-demo">Date demo</a></li>
<li><a class="reference internal" href="#financial-charts">Financial charts</a></li>
<li><a class="reference internal" href="#basemap-demo">Basemap demo</a></li>
<li><a class="reference internal" href="#log-plots">Log plots</a></li>
<li><a class="reference internal" href="#polar-plots">Polar plots</a></li>
<li><a class="reference internal" href="#legends">Legends</a></li>
<li><a class="reference internal" href="#mathtext-examples">Mathtext_examples</a></li>
<li><a class="reference internal" href="#native-tex-rendering">Native TeX rendering</a></li>
<li><a class="reference internal" href="#eeg-demo">EEG demo</a></li>
<li><a class="reference internal" href="#xkcd-style-sketch-plots">XKCD-style sketch plots</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="recipes.html"
title="previous chapter">Our Favorite Recipes</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="whats_new.html"
title="next chapter">What’s new in matplotlib</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/users/screenshots.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="screenshots">
<span id="matplotlibscreenshots"></span><h1>Screenshots<a class="headerlink" href="#screenshots" title="Permalink to this headline">¶</a></h1>
<p>Here you’ll find a host of example plots with the code that
generated them.</p>
<div class="section" id="simple-plot">
<h2>Simple Plot<a class="headerlink" href="#simple-plot" title="Permalink to this headline">¶</a></h2>
<p>Here’s a very basic <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.plot" title="matplotlib.pyplot.plot"><tt class="xref py py-func docutils literal"><span class="pre">plot()</span></tt></a> with text labels:</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/simple_plot.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/simple_plot.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/simple_plot.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/simple_plot.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/simple_plot1.png" src="../_images/simple_plot1.png" />
</div>
</div>
<div class="section" id="subplot-demo">
<span id="screenshots-subplot-demo"></span><h2>Subplot demo<a class="headerlink" href="#subplot-demo" title="Permalink to this headline">¶</a></h2>
<p>Multiple axes (i.e. subplots) are created with the
<a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.subplot" title="matplotlib.pyplot.subplot"><tt class="xref py py-func docutils literal"><span class="pre">subplot()</span></tt></a> command:</p>
<p>(<a class="reference external" href="../mpl_examples/subplots_axes_and_figures/subplot_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/subplots_axes_and_figures/subplot_demo.png">png</a>, <a class="reference external" href="../mpl_examples/subplots_axes_and_figures/subplot_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/subplots_axes_and_figures/subplot_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/subplot_demo3.png" src="../_images/subplot_demo3.png" />
</div>
</div>
<div class="section" id="histograms">
<span id="screenshots-histogram-demo"></span><h2>Histograms<a class="headerlink" href="#histograms" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.hist" title="matplotlib.pyplot.hist"><tt class="xref py py-func docutils literal"><span class="pre">hist()</span></tt></a> command automatically generates
histograms and returns the bin counts or probabilities:</p>
<p>(<a class="reference external" href="../mpl_examples/statistics/histogram_demo_features.py">Source code</a>, <a class="reference external" href="../mpl_examples/statistics/histogram_demo_features.png">png</a>, <a class="reference external" href="../mpl_examples/statistics/histogram_demo_features.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/statistics/histogram_demo_features.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/histogram_demo_features2.png" src="../_images/histogram_demo_features2.png" />
</div>
</div>
<div class="section" id="path-demo">
<span id="screenshots-path-demo"></span><h2>Path demo<a class="headerlink" href="#path-demo" title="Permalink to this headline">¶</a></h2>
<p>You can add arbitrary paths in matplotlib using the
<a class="reference internal" href="../api/path_api.html#module-matplotlib.path" title="matplotlib.path"><tt class="xref py py-mod docutils literal"><span class="pre">matplotlib.path</span></tt></a> module:</p>
<p>(<a class="reference external" href="../mpl_examples/shapes_and_collections/path_patch_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/shapes_and_collections/path_patch_demo.png">png</a>, <a class="reference external" href="../mpl_examples/shapes_and_collections/path_patch_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/shapes_and_collections/path_patch_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/path_patch_demo1.png" src="../_images/path_patch_demo1.png" />
</div>
</div>
<div class="section" id="mplot3d">
<span id="screenshots-mplot3d-surface"></span><h2>mplot3d<a class="headerlink" href="#mplot3d" title="Permalink to this headline">¶</a></h2>
<p>The mplot3d toolkit (see <a class="reference internal" href="../mpl_toolkits/mplot3d/tutorial.html#toolkit-mplot3d-tutorial"><em>mplot3d tutorial</em></a> and
<a class="reference internal" href="../examples/mplot3d/index.html#mplot3d-examples-index"><em>mplot3d Examples</em></a>) has support for simple 3d graphs
including surface, wireframe, scatter, and bar charts.</p>
<p>(<a class="reference external" href="../mpl_examples/mplot3d/surface3d_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/mplot3d/surface3d_demo.png">png</a>, <a class="reference external" href="../mpl_examples/mplot3d/surface3d_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/mplot3d/surface3d_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/surface3d_demo4.png" src="../_images/surface3d_demo4.png" />
</div>
<p>Thanks to John Porter, Jonathon Taylor, Reinier Heeres, and Ben Root for
the <tt class="xref py py-obj docutils literal"><span class="pre">mplot3d</span></tt> toolkit. This toolkit is included with all standard matplotlib
installs.</p>
</div>
<div class="section" id="streamplot">
<span id="screenshots-ellipse-demo"></span><h2>Streamplot<a class="headerlink" href="#streamplot" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.streamplot" title="matplotlib.pyplot.streamplot"><tt class="xref py py-meth docutils literal"><span class="pre">streamplot()</span></tt></a> function plots the streamlines of
a vector field. In addition to simply plotting the streamlines, it allows you
to map the colors and/or line widths of streamlines to a separate parameter,
such as the speed or local intensity of the vector field.</p>
<p>(<a class="reference external" href="../mpl_examples/images_contours_and_fields/streamplot_demo_features.py">Source code</a>)</p>
<div class="figure">
<img alt="../_images/streamplot_demo_features_001.png" src="../_images/streamplot_demo_features_001.png" />
<p class="caption">(<a class="reference external" href="../mpl_examples/images_contours_and_fields/streamplot_demo_features_00.png">png</a>, <a class="reference external" href="../mpl_examples/images_contours_and_fields/streamplot_demo_features_00.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/images_contours_and_fields/streamplot_demo_features_00.pdf">pdf</a>)</p>
</div>
<div class="figure">
<img alt="../_images/streamplot_demo_features_011.png" src="../_images/streamplot_demo_features_011.png" />
<p class="caption">(<a class="reference external" href="../mpl_examples/images_contours_and_fields/streamplot_demo_features_01.png">png</a>, <a class="reference external" href="../mpl_examples/images_contours_and_fields/streamplot_demo_features_01.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/images_contours_and_fields/streamplot_demo_features_01.pdf">pdf</a>)</p>
</div>
<p>This feature complements the <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.quiver" title="matplotlib.pyplot.quiver"><tt class="xref py py-meth docutils literal"><span class="pre">quiver()</span></tt></a> function for
plotting vector fields. Thanks to Tom Flannaghan and Tony Yu for adding the
streamplot function.</p>
</div>
<div class="section" id="ellipses">
<h2>Ellipses<a class="headerlink" href="#ellipses" title="Permalink to this headline">¶</a></h2>
<p>In support of the
<a class="reference external" href="http://www.jpl.nasa.gov/news/phoenix/main.php">Phoenix</a> mission to
Mars (which used matplotlib to display ground tracking of spacecraft),
Michael Droettboom built on work by Charlie Moad to provide an extremely
accurate 8-spline approximation to elliptical arcs (see
<a class="reference internal" href="../api/artist_api.html#matplotlib.patches.Arc" title="matplotlib.patches.Arc"><tt class="xref py py-class docutils literal"><span class="pre">Arc</span></tt></a>), which are insensitive to zoom level.</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/ellipse_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/ellipse_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/ellipse_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/ellipse_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/ellipse_demo1.png" src="../_images/ellipse_demo1.png" />
</div>
</div>
<div class="section" id="bar-charts">
<span id="screenshots-barchart-demo"></span><h2>Bar charts<a class="headerlink" href="#bar-charts" title="Permalink to this headline">¶</a></h2>
<p>Bar charts are simple to create using the <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.bar" title="matplotlib.pyplot.bar"><tt class="xref py py-func docutils literal"><span class="pre">bar()</span></tt></a>
command, which includes customizations such as error bars:</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/barchart_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/barchart_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/barchart_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/barchart_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/barchart_demo3.png" src="../_images/barchart_demo3.png" />
</div>
<p>It’s also simple to create stacked bars
(<a class="reference external" href="mpl_examples/pylab_examples/bar_stacked.html">bar_stacked.py</a>),
candlestick bars
(<a class="reference external" href="mpl_examples/pylab_examples/finance_demo.html">finance_demo.py</a>),
and horizontal bar charts
(<a class="reference external" href="mpl_examples/lines_bars_and_markers/barh_demo.html">barh_demo.py</a>).</p>
</div>
<div class="section" id="pie-charts">
<span id="screenshots-pie-demo"></span><h2>Pie charts<a class="headerlink" href="#pie-charts" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.pie" title="matplotlib.pyplot.pie"><tt class="xref py py-func docutils literal"><span class="pre">pie()</span></tt></a> command allows you to easily create pie
charts. Optional features include auto-labeling the percentage of area,
exploding one or more wedges from the center of the pie, and a shadow effect.
Take a close look at the attached code, which generates this figure in just
a few lines of code.</p>
<p>(<a class="reference external" href="../mpl_examples/pie_and_polar_charts/pie_demo_features.py">Source code</a>, <a class="reference external" href="../mpl_examples/pie_and_polar_charts/pie_demo_features.png">png</a>, <a class="reference external" href="../mpl_examples/pie_and_polar_charts/pie_demo_features.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pie_and_polar_charts/pie_demo_features.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/pie_demo_features1.png" src="../_images/pie_demo_features1.png" />
</div>
</div>
<div class="section" id="table-demo">
<span id="screenshots-table-demo"></span><h2>Table demo<a class="headerlink" href="#table-demo" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.table" title="matplotlib.pyplot.table"><tt class="xref py py-func docutils literal"><span class="pre">table()</span></tt></a> command adds a text table
to an axes.</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/table_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/table_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/table_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/table_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/table_demo1.png" src="../_images/table_demo1.png" />
</div>
</div>
<div class="section" id="scatter-demo">
<span id="screenshots-scatter-demo"></span><h2>Scatter demo<a class="headerlink" href="#scatter-demo" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.scatter" title="matplotlib.pyplot.scatter"><tt class="xref py py-func docutils literal"><span class="pre">scatter()</span></tt></a> command makes a scatter plot
with (optional) size and color arguments. This example plots changes
in Google’s stock price, with marker sizes reflecting the
trading volume and colors varying with time. Here, the
alpha attribute is used to make semitransparent circle markers.</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/scatter_demo2.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/scatter_demo2.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/scatter_demo2.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/scatter_demo2.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/scatter_demo21.png" src="../_images/scatter_demo21.png" />
</div>
</div>
<div class="section" id="slider-demo">
<span id="screenshots-slider-demo"></span><h2>Slider demo<a class="headerlink" href="#slider-demo" title="Permalink to this headline">¶</a></h2>
<p>Matplotlib has basic GUI widgets that are independent of the graphical
user interface you are using, allowing you to write cross GUI figures
and widgets. See <a class="reference internal" href="../api/widgets_api.html#module-matplotlib.widgets" title="matplotlib.widgets"><tt class="xref py py-mod docutils literal"><span class="pre">matplotlib.widgets</span></tt></a> and the
<a class="reference external" href="../examples/widgets/index.html">widget examples</a>.</p>
<p>(<a class="reference external" href="../mpl_examples/widgets/slider_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/widgets/slider_demo.png">png</a>, <a class="reference external" href="../mpl_examples/widgets/slider_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/widgets/slider_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/slider_demo.png" src="../_images/slider_demo.png" />
</div>
</div>
<div class="section" id="fill-demo">
<span id="screenshots-fill-demo"></span><h2>Fill demo<a class="headerlink" href="#fill-demo" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.fill" title="matplotlib.pyplot.fill"><tt class="xref py py-func docutils literal"><span class="pre">fill()</span></tt></a> command lets you
plot filled curves and polygons:</p>
<p>(<a class="reference external" href="../mpl_examples/lines_bars_and_markers/fill_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/lines_bars_and_markers/fill_demo.png">png</a>, <a class="reference external" href="../mpl_examples/lines_bars_and_markers/fill_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/lines_bars_and_markers/fill_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/fill_demo2.png" src="../_images/fill_demo2.png" />
</div>
<p>Thanks to Andrew Straw for adding this function.</p>
</div>
<div class="section" id="date-demo">
<span id="screenshots-date-demo"></span><h2>Date demo<a class="headerlink" href="#date-demo" title="Permalink to this headline">¶</a></h2>
<p>You can plot date data with major and minor ticks and custom tick formatters
for both.</p>
<p>(<a class="reference external" href="../mpl_examples/api/date_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/api/date_demo.png">png</a>, <a class="reference external" href="../mpl_examples/api/date_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/api/date_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/date_demo3.png" src="../_images/date_demo3.png" />
</div>
<p>See <a class="reference internal" href="../api/ticker_api.html#module-matplotlib.ticker" title="matplotlib.ticker"><tt class="xref py py-mod docutils literal"><span class="pre">matplotlib.ticker</span></tt></a> and <a class="reference internal" href="../api/dates_api.html#module-matplotlib.dates" title="matplotlib.dates"><tt class="xref py py-mod docutils literal"><span class="pre">matplotlib.dates</span></tt></a> for details and usage.</p>
</div>
<div class="section" id="financial-charts">
<span id="screenshots-jdh-demo"></span><h2>Financial charts<a class="headerlink" href="#financial-charts" title="Permalink to this headline">¶</a></h2>
<p>You can make sophisticated financial plots by combining the various
plot functions, layout commands, and labeling tools provided by matplotlib.
The following example emulates one of the financial plots in
<a class="reference external" href="http://www.advsofteng.com/gallery_finance.html">ChartDirector</a>:</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/finance_work2.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/finance_work2.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/finance_work2.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/finance_work2.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/finance_work21.png" src="../_images/finance_work21.png" />
</div>
</div>
<div class="section" id="basemap-demo">
<span id="screenshots-basemap-demo"></span><h2>Basemap demo<a class="headerlink" href="#basemap-demo" title="Permalink to this headline">¶</a></h2>
<p>Jeff Whitaker’s <a class="reference internal" href="../mpl_toolkits/index.html#toolkit-basemap"><em>Basemap (Not distributed with matplotlib)</em></a> 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.</p>
<p>(<a class="reference external" href="../pyplots/plotmap.py">Source code</a>, <a class="reference external" href="../pyplots/plotmap.png">png</a>, <a class="reference external" href="../pyplots/plotmap.hires.png">hires.png</a>, <a class="reference external" href="../pyplots/plotmap.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/plotmap.png" src="../_images/plotmap.png" />
</div>
</div>
<div class="section" id="log-plots">
<span id="screenshots-log-demo"></span><h2>Log plots<a class="headerlink" href="#log-plots" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.semilogx" title="matplotlib.pyplot.semilogx"><tt class="xref py py-func docutils literal"><span class="pre">semilogx()</span></tt></a>,
<a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.semilogy" title="matplotlib.pyplot.semilogy"><tt class="xref py py-func docutils literal"><span class="pre">semilogy()</span></tt></a> and
<a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.loglog" title="matplotlib.pyplot.loglog"><tt class="xref py py-func docutils literal"><span class="pre">loglog()</span></tt></a> functions simplify the creation of
logarithmic plots.</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/log_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/log_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/log_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/log_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/log_demo2.png" src="../_images/log_demo2.png" />
</div>
<p>Thanks to Andrew Straw, Darren Dale and Gregory Lielens for contributions
log-scaling infrastructure.</p>
</div>
<div class="section" id="polar-plots">
<span id="screenshots-polar-demo"></span><h2>Polar plots<a class="headerlink" href="#polar-plots" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.polar" title="matplotlib.pyplot.polar"><tt class="xref py py-func docutils literal"><span class="pre">polar()</span></tt></a> command generates polar plots.</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/polar_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/polar_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/polar_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/polar_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/polar_demo1.png" src="../_images/polar_demo1.png" />
</div>
</div>
<div class="section" id="legends">
<span id="screenshots-legend-demo"></span><h2>Legends<a class="headerlink" href="#legends" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.legend" title="matplotlib.pyplot.legend"><tt class="xref py py-func docutils literal"><span class="pre">legend()</span></tt></a> command automatically
generates figure legends, with MATLAB-compatible legend placement
commands.</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/legend_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/legend_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/legend_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/legend_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/legend_demo5.png" src="../_images/legend_demo5.png" />
</div>
<p>Thanks to Charles Twardy for input on the legend command.</p>
</div>
<div class="section" id="mathtext-examples">
<span id="screenshots-mathtext-examples-demo"></span><h2>Mathtext_examples<a class="headerlink" href="#mathtext-examples" title="Permalink to this headline">¶</a></h2>
<p>Below is a sampling of the many TeX expressions now supported by matplotlib’s
internal mathtext engine. The mathtext module provides TeX style mathematical
expressions using <a class="reference external" href="http://freetype.sourceforge.net/index2.html">freetype2</a>
and the BaKoMa computer modern or <a class="reference external" href="http://www.stixfonts.org">STIX</a> fonts.
See the <a class="reference internal" href="../api/mathtext_api.html#module-matplotlib.mathtext" title="matplotlib.mathtext"><tt class="xref py py-mod docutils literal"><span class="pre">matplotlib.mathtext</span></tt></a> module for additional details.</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/mathtext_examples.py">Source code</a>)</p>
<p>(<a class="reference external" href="../mpl_examples/pylab_examples/mathtext_examples_01_00.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/mathtext_examples_01_00.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/mathtext_examples_01_00.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/mathtext_examples_01_001.png" src="../_images/mathtext_examples_01_001.png" />
</div>
<p>Matplotlib’s mathtext infrastructure is an independent implementation and
does not require TeX or any external packages installed on your computer. See
the tutorial at <a class="reference internal" href="mathtext.html#mathtext-tutorial"><em>Writing mathematical expressions</em></a>.</p>
</div>
<div class="section" id="native-tex-rendering">
<span id="screenshots-tex-demo"></span><h2>Native TeX rendering<a class="headerlink" href="#native-tex-rendering" title="Permalink to this headline">¶</a></h2>
<p>Although matplotlib’s internal math rendering engine is quite
powerful, sometimes you need TeX. Matplotlib supports external TeX
rendering of strings with the <em>usetex</em> option.</p>
<p>(<a class="reference external" href="../pyplots/tex_demo.py">Source code</a>, <a class="reference external" href="../pyplots/tex_demo.png">png</a>, <a class="reference external" href="../pyplots/tex_demo.hires.png">hires.png</a>, <a class="reference external" href="../pyplots/tex_demo.pdf">pdf</a>)</p>
<div class="figure">
<img alt="../_images/tex_demo1.png" src="../_images/tex_demo1.png" />
</div>
</div>
<div class="section" id="eeg-demo">
<span id="screenshots-eeg-demo"></span><h2>EEG demo<a class="headerlink" href="#eeg-demo" title="Permalink to this headline">¶</a></h2>
<p>You can embed matplotlib into pygtk, wx, Tk, FLTK, or Qt
applications. Here is a screenshot of an EEG viewer called pbrain,
which is part of the NeuroImaging in Python suite
<a class="reference external" href="http://nipy.sourceforge.net/nipy/stable/index.html">NIPY</a>.</p>
<img alt="../_images/eeg_small.png" src="../_images/eeg_small.png" />
<p>The lower axes uses <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.specgram" title="matplotlib.pyplot.specgram"><tt class="xref py py-func docutils literal"><span class="pre">specgram()</span></tt></a>
to plot the spectrogram of one of the EEG channels.</p>
<p>For examples of how to embed matplotlib in different toolkits, see:</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference internal" href="../examples/user_interfaces/embedding_in_gtk2.html#user-interfaces-embedding-in-gtk2"><em>user_interfaces example code: embedding_in_gtk2.py</em></a></li>
<li><a class="reference internal" href="../examples/user_interfaces/embedding_in_wx2.html#user-interfaces-embedding-in-wx2"><em>user_interfaces example code: embedding_in_wx2.py</em></a></li>
<li><a class="reference internal" href="../examples/user_interfaces/mpl_with_glade.html#user-interfaces-mpl-with-glade"><em>user_interfaces example code: mpl_with_glade.py</em></a></li>
<li><em class="xref std std-ref">user_interfaces-embedding_in_qt</em></li>
<li><a class="reference internal" href="../examples/user_interfaces/embedding_in_tk.html#user-interfaces-embedding-in-tk"><em>user_interfaces example code: embedding_in_tk.py</em></a></li>
</ul>
</div></blockquote>
</div>
<div class="section" id="xkcd-style-sketch-plots">
<h2>XKCD-style sketch plots<a class="headerlink" href="#xkcd-style-sketch-plots" title="Permalink to this headline">¶</a></h2>
<p>matplotlib supports plotting in the style of <tt class="xref py py-obj docutils literal"><span class="pre">xkcd</span></tt>.</p>
<p>(<a class="reference external" href="../mpl_examples/showcase/xkcd.py">Source code</a>)</p>
<div class="figure">
<img alt="../_images/xkcd_001.png" src="../_images/xkcd_001.png" />
<p class="caption">(<a class="reference external" href="../mpl_examples/showcase/xkcd_00.png">png</a>, <a class="reference external" href="../mpl_examples/showcase/xkcd_00.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/showcase/xkcd_00.pdf">pdf</a>)</p>
</div>
<div class="figure">
<img alt="../_images/xkcd_011.png" src="../_images/xkcd_011.png" />
<p class="caption">(<a class="reference external" href="../mpl_examples/showcase/xkcd_01.png">png</a>, <a class="reference external" href="../mpl_examples/showcase/xkcd_01.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/showcase/xkcd_01.pdf">pdf</a>)</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="whats_new.html" title="What’s new in matplotlib"
>next</a> |</li>
<li class="right" >
<a href="recipes.html" title="Our Favorite Recipes"
>previous</a> |</li>
<li><a href="../index.html">home</a>| </li>
<li><a href="../examples/index.html">examples</a>| </li>
<li><a href="../gallery.html">gallery</a>| </li>
<li><a href="../api/pyplot_summary.html">pyplot</a>| </li>
<li><a href="../contents.html">docs</a> »</li>
<li><a href="index.html" >User’s Guide</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team; 2012 - 2013 The matplotlib development team.
Last updated on Oct 10, 2013.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b2.
</div>
</body>
</html>