Axes.parametric¶
- Axes.parametric(x, y, values=None, cmap=None, norm=None, *, interp=0, scalex=True, scaley=True, **kwargs)[source]¶
Draw a line whose color changes as a function of the parametric coordinate
values
using the input colormapcmap
. Invoked when you pass thecmap
keyword argument toplot
.- Parameters
*args ((y,), (x, y), or (x, y, values)) – The coordinates. If
x
is not provided, it is inferred fromy
. The parametric coordinate can be indicated as a third positional argument or with thevalues
orlevels
keywords.cmap (colormap spec, optional) – The colormap specifer, passed to the
Colormap
constructor.cmap_kw (dict-like, optional) – Passed to
Colormap
.norm (normalizer spec, optional) – The colormap normalizer, used to warp data before passing it to
DiscreteNorm
. This is passed to theNorm
constructor.norm_kw (dict-like, optional) – Passed to
Norm
.extend ({{‘neither’, ‘min’, ‘max’, ‘both’}}, optional) – Whether to assign unique colors to out-of-bounds data and draw “extensions” (triangles, by default) on the colorbar.
interp (int, optional) – If greater than
0
, we interpolate to additional points between thevalues
coordinates. The number corresponds to the number of additional color levels between the line joints and the halfway points between line joints.scalex, scaley (bool, optional) – Whether the view limits are adapted to the data limits. The values are passed on to
autoscale_view
.
- Other Parameters
**kwargs – Valid
LineCollection
properties.- Returns
LineCollection
– The parametric line. See this matplotlib example.