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

Skip to content

DOC: Add summary lines to plot types #27929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions galleries/plot_types/arrays/barbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=================
barbs(X, Y, U, V)
=================
Plot a 2D field of wind barbs.

See `~matplotlib.axes.Axes.barbs`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/arrays/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
================
contour(X, Y, Z)
================
Plot contour lines.

See `~matplotlib.axes.Axes.contour`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/arrays/contourf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=================
contourf(X, Y, Z)
=================
Plot filled contours.

See `~matplotlib.axes.Axes.contourf`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/arrays/imshow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=========
imshow(Z)
=========
Display data as an image, i.e., on a 2D regular raster.

See `~matplotlib.axes.Axes.imshow`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/arrays/pcolormesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
===================
pcolormesh(X, Y, Z)
===================
Create a pseudocolor plot with a non-regular rectangular grid.

`~.axes.Axes.pcolormesh` is more flexible than `~.axes.Axes.imshow` in that
the x and y vectors need not be equally spaced (indeed they can be skewed).
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/arrays/quiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==================
quiver(X, Y, U, V)
==================
Plot a 2D field of arrows.

See `~matplotlib.axes.Axes.quiver`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/arrays/streamplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
======================
streamplot(X, Y, U, V)
======================
Draw streamlines of a vector flow.

See `~matplotlib.axes.Axes.streamplot`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/basic/fill_between.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=======================
fill_between(x, y1, y2)
=======================
Fill the area between two horizontal curves.

See `~matplotlib.axes.Axes.fill_between`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/basic/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==========
plot(x, y)
==========
Plot y versus x as lines and/or markers.

See `~matplotlib.axes.Axes.plot`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/basic/scatter_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=============
scatter(x, y)
=============
A scatter plot of y vs. x with varying marker size and/or color.

See `~matplotlib.axes.Axes.scatter`.
"""
Expand Down
2 changes: 2 additions & 0 deletions galleries/plot_types/basic/stackplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
===============
stackplot(x, y)
===============
Draw a stacked area plot or a streamgraph.

See `~matplotlib.axes.Axes.stackplot`
"""
import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/basic/stairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==============
stairs(values)
==============
Draw a stepwise constant function as a line or a filled plot.

See `~matplotlib.axes.Axes.stairs` when plotting :math:`y` between
:math:`(x_i, x_{i+1})`. For plotting :math:`y` at :math:`x`, see
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/basic/stem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==========
stem(x, y)
==========
Create a stem plot.

See `~matplotlib.axes.Axes.stem`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/stats/boxplot_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==========
boxplot(X)
==========
Draw a box and whisker plot.

See `~matplotlib.axes.Axes.boxplot`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/stats/ecdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=======
ecdf(x)
=======
Compute and plot the empirical cumulative distribution function of x.

See `~matplotlib.axes.Axes.ecdf`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/stats/errorbar_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==========================
errorbar(x, y, yerr, xerr)
==========================
Plot y versus x as lines and/or markers with attached errorbars.

See `~matplotlib.axes.Axes.errorbar`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/stats/eventplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
============
eventplot(D)
============
Plot identical parallel lines at the given positions.

See `~matplotlib.axes.Axes.eventplot`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/stats/hexbin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
===============
hexbin(x, y, C)
===============
Make a 2D hexagonal binning plot of points x, y.

See `~matplotlib.axes.Axes.hexbin`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/stats/hist2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
============
hist2d(x, y)
============
Make a 2D histogram plot.

See `~matplotlib.axes.Axes.hist2d`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/stats/hist_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=======
hist(x)
=======
Compute and plot a histogram.

See `~matplotlib.axes.Axes.hist`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/stats/pie.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
======
pie(x)
======
Plot a pie chart.

See `~matplotlib.axes.Axes.pie`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/stats/violin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=============
violinplot(D)
=============
Make a violin plot.

See `~matplotlib.axes.Axes.violinplot`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/unstructured/tricontour.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
===================
tricontour(x, y, z)
===================
Draw contour lines on an unstructured triangular grid.

See `~matplotlib.axes.Axes.tricontour`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/unstructured/tricontourf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
====================
tricontourf(x, y, z)
====================
Draw contour regions on an unstructured triangular grid.

See `~matplotlib.axes.Axes.tricontourf`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/unstructured/tripcolor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==================
tripcolor(x, y, z)
==================
Create a pseudocolor plot of an unstructured triangular grid.

See `~matplotlib.axes.Axes.tripcolor`.
"""
Expand Down
1 change: 1 addition & 0 deletions galleries/plot_types/unstructured/triplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=============
triplot(x, y)
=============
Draw an unstructured triangular grid as lines and/or markers.

See `~matplotlib.axes.Axes.triplot`.
"""
Expand Down
9 changes: 6 additions & 3 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7104,16 +7104,19 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
def stairs(self, values, edges=None, *,
orientation='vertical', baseline=0, fill=False, **kwargs):
"""
A stepwise constant function as a line with bounding edges
or a filled plot.
Draw a stepwise constant function as a line or a filled plot.

*edges* define the x-axis positions of the steps. *values* the function values
between these steps. Depending on *fill*, the function is drawn either as a
continuous line with vertical segments at the edges, or as a filled area.

Parameters
----------
values : array-like
The step heights.

edges : array-like
The edge positions, with ``len(edges) == len(vals) + 1``,
The step positions, with ``len(edges) == len(vals) + 1``,
between which the curve takes on vals values.

orientation : {'vertical', 'horizontal'}, default: 'vertical'
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/quiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def _h_arrows(self, length):


_barbs_doc = r"""
Plot a 2D field of barbs.
Plot a 2D field of wind barbs.

Call signature::

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/stackplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def stackplot(axes, x, *args,
labels=(), colors=None, hatch=None, baseline='zero',
**kwargs):
"""
Draw a stacked area plot.
Draw a stacked area plot or a streamgraph.

Parameters
----------
Expand Down