Axes.parametric¶
- Axes.parametric(*args, 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
valuesusing the input colormapcmap. Invoked when you pass thecmapkeyword argument toplot.- Parameters
*args ((y,), (x, y), or (x, y, values)) – The coordinates. If
xis not provided, it is inferred fromy.values (list of float) – The parametric values used to map points on the line to colors in the colormap. This can also be passed as a third positional argument.
cmap (colormap spec, optional) – The colormap specifier, passed to
Colormap.cmap_kw (dict, optional) – Keyword arguments passed to
Colormap.norm (normalizer spec, optional) – The normalizer, passed to
Norm.norm_kw (dict, optional) – Keyword arguments passed to
Norm.interp (int, optional) – If greater than
0, we interpolate to additional points between thevaluescoordinates. 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
LineCollectionproperties.- Returns
LineCollection– The parametric line. See this matplotlib example.