Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e20ce21

Browse files
authored
Merge pull request #27929 from timhoffm/doc-plot-types
DOC: Add summary lines to plot types
2 parents bb3f0dc + 6e24418 commit e20ce21

29 files changed

+35
-5
lines changed

galleries/plot_types/arrays/barbs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
=================
33
barbs(X, Y, U, V)
44
=================
5+
Plot a 2D field of wind barbs.
56
67
See `~matplotlib.axes.Axes.barbs`.
78
"""

galleries/plot_types/arrays/contour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
================
33
contour(X, Y, Z)
44
================
5+
Plot contour lines.
56
67
See `~matplotlib.axes.Axes.contour`.
78
"""

galleries/plot_types/arrays/contourf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
=================
33
contourf(X, Y, Z)
44
=================
5+
Plot filled contours.
56
67
See `~matplotlib.axes.Axes.contourf`.
78
"""

galleries/plot_types/arrays/imshow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
=========
33
imshow(Z)
44
=========
5+
Display data as an image, i.e., on a 2D regular raster.
56
67
See `~matplotlib.axes.Axes.imshow`.
78
"""

galleries/plot_types/arrays/pcolormesh.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
===================
33
pcolormesh(X, Y, Z)
44
===================
5+
Create a pseudocolor plot with a non-regular rectangular grid.
56
67
`~.axes.Axes.pcolormesh` is more flexible than `~.axes.Axes.imshow` in that
78
the x and y vectors need not be equally spaced (indeed they can be skewed).

galleries/plot_types/arrays/quiver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==================
33
quiver(X, Y, U, V)
44
==================
5+
Plot a 2D field of arrows.
56
67
See `~matplotlib.axes.Axes.quiver`.
78
"""

galleries/plot_types/arrays/streamplot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
======================
33
streamplot(X, Y, U, V)
44
======================
5+
Draw streamlines of a vector flow.
56
67
See `~matplotlib.axes.Axes.streamplot`.
78
"""

galleries/plot_types/basic/fill_between.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
=======================
33
fill_between(x, y1, y2)
44
=======================
5+
Fill the area between two horizontal curves.
56
67
See `~matplotlib.axes.Axes.fill_between`.
78
"""

galleries/plot_types/basic/plot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==========
33
plot(x, y)
44
==========
5+
Plot y versus x as lines and/or markers.
56
67
See `~matplotlib.axes.Axes.plot`.
78
"""

galleries/plot_types/basic/scatter_plot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
=============
33
scatter(x, y)
44
=============
5+
A scatter plot of y vs. x with varying marker size and/or color.
56
67
See `~matplotlib.axes.Axes.scatter`.
78
"""

galleries/plot_types/basic/stackplot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
===============
33
stackplot(x, y)
44
===============
5+
Draw a stacked area plot or a streamgraph.
6+
57
See `~matplotlib.axes.Axes.stackplot`
68
"""
79
import matplotlib.pyplot as plt

galleries/plot_types/basic/stairs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==============
33
stairs(values)
44
==============
5+
Draw a stepwise constant function as a line or a filled plot.
56
67
See `~matplotlib.axes.Axes.stairs` when plotting :math:`y` between
78
:math:`(x_i, x_{i+1})`. For plotting :math:`y` at :math:`x`, see

galleries/plot_types/basic/stem.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==========
33
stem(x, y)
44
==========
5+
Create a stem plot.
56
67
See `~matplotlib.axes.Axes.stem`.
78
"""

galleries/plot_types/stats/boxplot_plot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==========
33
boxplot(X)
44
==========
5+
Draw a box and whisker plot.
56
67
See `~matplotlib.axes.Axes.boxplot`.
78
"""

galleries/plot_types/stats/ecdf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
=======
33
ecdf(x)
44
=======
5+
Compute and plot the empirical cumulative distribution function of x.
56
67
See `~matplotlib.axes.Axes.ecdf`.
78
"""

galleries/plot_types/stats/errorbar_plot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==========================
33
errorbar(x, y, yerr, xerr)
44
==========================
5+
Plot y versus x as lines and/or markers with attached errorbars.
56
67
See `~matplotlib.axes.Axes.errorbar`.
78
"""

galleries/plot_types/stats/eventplot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
============
33
eventplot(D)
44
============
5+
Plot identical parallel lines at the given positions.
56
67
See `~matplotlib.axes.Axes.eventplot`.
78
"""

galleries/plot_types/stats/hexbin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
===============
33
hexbin(x, y, C)
44
===============
5+
Make a 2D hexagonal binning plot of points x, y.
56
67
See `~matplotlib.axes.Axes.hexbin`.
78
"""

galleries/plot_types/stats/hist2d.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
============
33
hist2d(x, y)
44
============
5+
Make a 2D histogram plot.
56
67
See `~matplotlib.axes.Axes.hist2d`.
78
"""

galleries/plot_types/stats/hist_plot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
=======
33
hist(x)
44
=======
5+
Compute and plot a histogram.
56
67
See `~matplotlib.axes.Axes.hist`.
78
"""

galleries/plot_types/stats/pie.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
======
33
pie(x)
44
======
5+
Plot a pie chart.
56
67
See `~matplotlib.axes.Axes.pie`.
78
"""

galleries/plot_types/stats/violin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
=============
33
violinplot(D)
44
=============
5+
Make a violin plot.
56
67
See `~matplotlib.axes.Axes.violinplot`.
78
"""

galleries/plot_types/unstructured/tricontour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
===================
33
tricontour(x, y, z)
44
===================
5+
Draw contour lines on an unstructured triangular grid.
56
67
See `~matplotlib.axes.Axes.tricontour`.
78
"""

galleries/plot_types/unstructured/tricontourf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
====================
33
tricontourf(x, y, z)
44
====================
5+
Draw contour regions on an unstructured triangular grid.
56
67
See `~matplotlib.axes.Axes.tricontourf`.
78
"""

galleries/plot_types/unstructured/tripcolor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==================
33
tripcolor(x, y, z)
44
==================
5+
Create a pseudocolor plot of an unstructured triangular grid.
56
67
See `~matplotlib.axes.Axes.tripcolor`.
78
"""

galleries/plot_types/unstructured/triplot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
=============
33
triplot(x, y)
44
=============
5+
Draw an unstructured triangular grid as lines and/or markers.
56
67
See `~matplotlib.axes.Axes.triplot`.
78
"""

lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7104,16 +7104,19 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
71047104
def stairs(self, values, edges=None, *,
71057105
orientation='vertical', baseline=0, fill=False, **kwargs):
71067106
"""
7107-
A stepwise constant function as a line with bounding edges
7108-
or a filled plot.
7107+
Draw a stepwise constant function as a line or a filled plot.
7108+
7109+
*edges* define the x-axis positions of the steps. *values* the function values
7110+
between these steps. Depending on *fill*, the function is drawn either as a
7111+
continuous line with vertical segments at the edges, or as a filled area.
71097112
71107113
Parameters
71117114
----------
71127115
values : array-like
71137116
The step heights.
71147117
71157118
edges : array-like
7116-
The edge positions, with ``len(edges) == len(vals) + 1``,
7119+
The step positions, with ``len(edges) == len(vals) + 1``,
71177120
between which the curve takes on vals values.
71187121
71197122
orientation : {'vertical', 'horizontal'}, default: 'vertical'

lib/matplotlib/quiver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ def _h_arrows(self, length):
727727

728728

729729
_barbs_doc = r"""
730-
Plot a 2D field of barbs.
730+
Plot a 2D field of wind barbs.
731731
732732
Call signature::
733733

lib/matplotlib/stackplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def stackplot(axes, x, *args,
1919
labels=(), colors=None, hatch=None, baseline='zero',
2020
**kwargs):
2121
"""
22-
Draw a stacked area plot.
22+
Draw a stacked area plot or a streamgraph.
2323
2424
Parameters
2525
----------

0 commit comments

Comments
 (0)