matplotlib 3.5.1

NotesOther ParametersParametersReturns
fill(self, *args, data=None, **kwargs)

Notes

Use fill_between if you would like to fill the region between two curves.

Other Parameters

**kwargs : `~matplotlib.patches.Polygon` properties

Parameters

*args : sequence of x, y, [color]

Each polygon is defined by the lists of x and y positions of its nodes, optionally followed by a color specifier. See matplotlib.colors for supported color specifiers. The standard color cycle is used for polygons without a color specifier.

You can plot multiple polygons by providing multiple x, y, [color] groups.

For example, each of the following is legal:

ax.fill(x, y)                    # a polygon with default color
ax.fill(x, y, "b")               # a blue polygon
ax.fill(x, y, x2, y2)            # two polygons
ax.fill(x, y, "b", x2, y2, "r")  # a blue and a red polygon
data : indexable object, optional

An object with labelled data. If given, provide the label names to plot in x and y, e.g.:

ax.fill("time", "signal",
        data={"time": [0, 1, 2], "signal": [0, 1, 0]})

Returns

list of `~matplotlib.patches.Polygon`

Plot filled polygons.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/axes/_axes.py#5007
type: <class 'function'>
Commit: