8000 Merge pull request #7439 from NelleV/MEP12_api · alvarosg/matplotlib@a07af2d · GitHub
[go: up one dir, main page]

Skip to content

Commit a07af2d

Browse files
authored
Merge pull request matplotlib#7439 from NelleV/MEP12_api
DOC: MEP12 API examples
2 parents 660aa65 + e00ee31 commit a07af2d

39 files changed

+240
-31
lines changed

examples/api/agg_oo.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# -*- noplot -*-
22
"""
3+
=============================
4+
The object-oriented interface
5+
=============================
6+
37
A pure OO (look Ma, no pylab!) example using the agg backend
48
"""
59
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas

examples/api/barchart_demo.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
"""
2+
========
3+
Barchart
4+
========
5+
26
A bar plot with errorbars and height labels on individual bars
37
"""
48
import numpy as np

examples/api/bbox_intersect.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
===========================================
3+
Changing colors of lines intersecting a box
4+
===========================================
5+
6+
The lines intersecting the rectangle are colored in red, while the others
7+
are left as blue lines. This example showcases the `intersect_bbox` function.
8+
9+
"""
10+
111
import numpy as np
212
import matplotlib.pyplot as plt
313
from matplotlib.transforms import Bbox

examples/api/collections_demo.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
'''Demonstration of LineCollection, PolyCollection, and
2-
RegularPolyCollection with autoscaling.
1+
'''
2+
=========================================================
3+
Line, Poly and RegularPoly Collection with autoscaling
4+
=========================================================
35
46
For the first two subplots, we will use spirals. Their
57
size will be set in plot units, not data units. Their positions

examples/api/colorbar_basics.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
"""
2+
========
3+
Colorbar
4+
========
5+
6+
This example shows how to use colorbar by specifying the mappable object (here
7+
the imshow returned object) and the axes to attach the colorbar to.
8+
"""
9+
110
import numpy as np
211
import matplotlib.pyplot as plt
312

examples/api/colorbar_only.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'''
2-
Make a colorbar as a separate figure.
2+
====================
3+
Customized colorbars
4+
====================
5+
6+
This example shows how to build colorbars without an attached mappable.
37
'''
48

59
import matplotlib.pyplot as plt

examples/api/compound_path.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
"""
2-
Make a compund path -- in this case two simple polygons, a rectangle
3-
and a triangle. Use CLOSEOPOLY and MOVETO for the different parts of
2+
=============
3+
Compound path
4+
=============
5+
6+
Make a compound path -- in this case two simple polygons, a rectangle
7+
and a triangle. Use CLOSEPOLY and MOVETO for the different parts of
48
the compound path
59
"""
610
import numpy as np

examples/api/custom_projection_example.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
=================
3+
Custom projection
4+
=================
5+
6+
This example showcases the Hammer projection by alleviating many features of
7+
matplotlib.
8+
"""
9+
10+
111
from __future__ import unicode_literals
212

313
import matplotlib

examples/api/custom_scale_example.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
============
3+
Custom scale
4+
============
5+
6+
This example showcases how to create a custom scale, by implementing the
7+
scaling use for latitude data in a Mercator Projection.
8+
"""
9+
10+
111
from __future__ import unicode_literals
212

313
import numpy as np

examples/api/date_demo.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
"""
2+
================
3+
Date tick labels
4+
================
5+
26
Show how to make date plots in matplotlib using date tick locators and
37
formatters. See major_minor_demo1.py for more information on
48
controlling major and minor ticks

0 commit comments

Comments
 (0)
0