8000 improve Axes.fill docstring · matplotlib/matplotlib@51d3796 · GitHub
[go: up one dir, main page]

Skip to content

Commit 51d3796

Browse files
committed
improve Axes.fill docstring
1 parent 37978a8 commit 51d3796

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4695,34 +4695,35 @@ def fill(self, *args, **kwargs):
46954695
46964696
Parameters
46974697
----------
4698-
args : a variable length argument
4699-
It allowing for multiple
4700-
*x*, *y* pairs with an optional color format string; see
4701-
:func:`~matplotlib.pyplot.plot` for details on the argument
4702-
parsing. For example, each of the following is legal::
4698+
args : sequence of x, y, [color]
4699+
Each polygon is defined by the lists of *x* and *y* positions of
4700+
its nodes, optionally followed by by a *color* specifier. See
4701+
:mod:`matplotlib.colors` for supported color specifiers. The
4702+
standard color cycle is used for polygons without a color
4703+
specifier.
47034704
4704-
ax.fill(x, y)
4705-
ax.fill(x, y, "b")
4706-
ax.fill(x, y, "b", x, y, "r")
4705+
You can plot multiple polygons by providing multiple *x*, *y*,
4706+
*[color]* groups.
47074707
4708-
An arbitrary number of *x*, *y*, *color* groups can be specified::
4709-
ax.fill(x1, y1, 'g', x2, y2, 'r')
4708+
For example, each of the following is legal::
4709+
4710+
ax.fill(x, y) # a polygon with default color
4711+
ax.fill(x, y, "b") # a blue polygon
4712+
ax.fill(x, y, x2, y2) # two polygons
4713+
ax.fill(x, y, "b", x2, y2, "r") # a blue and a red polygon
47104714
47114715
Returns
47124716
-------
4713-
a list of :class:`~matplotlib.patches.Patch`
4717+
a list of :class:`~matplotlib.patches.Polygon`
47144718
47154719
Other Parameters
47164720
----------------
47174721
**kwargs : :class:`~matplotlib.patches.Polygon` properties
47184722
47194723
Notes
47204724
-----
4721-
The same color strings that :func:`~matplotlib.pyplot.plot`
4722-
supports are supported by the fill format string.
4723-
4724-
If you would like to fill below a curve, e.g., shade a region
4725-
between 0 and *y* along *x*, use :meth:`fill_between`
4725+
Use :meth:`fill_between` if you would like to fill the region between
4726+
two curves.
47264727
47274728
47284729
"""

0 commit comments

Comments
 (0)
0