PlotAxes.parametric¶
- PlotAxes.parametric(x, y, c, *, interp=0, scalex=True, scaley=True, **kwargs)[source]¶
Plot a parametric line.
- Parameters
*args (
yorx,y) – The data passed as positional or keyword arguments. Interpreted as follows:If only
ycoordinates are passed, try to infer thexcoordinates from theSeriesorDataFrameindices or theDataArraycoordinates. Otherwise, thexcoordinates arenp.arange(0, y.shape[0]).If the
ycoordinates are a 2D array, plot each column of data in succession (except where each column of data represents a statistical distribution, as withboxplot,violinplot, or when usingmeans=Trueormedians=True).If any arguments are
pint.Quantity, auto-add the pint unit registry to matplotlib’s unit registry usingsetup_matplotlib. Apint.Quantityembedded in anxarray.DataArrayis also supported.
c, color, colors, values (array-like, optional) – The parametric coordinate. These can be passed as a third positional argument or as a keyword argument. They can also be string labels instead of numbers and the resulting colorbar ticks will be labeled accordingly.
data (dict-like, optional) – A dict-like dataset container (e.g.,
DataFrameorDataArray). If passed, positional arguments can optionally be stringdatakeys and the arrays used for plotting are retrieved withdata[key]. This is a native matplotlib feature.autoformat (
bool, optional) – Whether thexaxis labels,yaxis labels, axis formatters, axes titles, legend titles, and colorbar labels are automatically configured when aSeries,DataFrame,DataArray, orQuantityis passed to the plotting command. Default isrc.autoformat=True.
- Other Parameters
cmap (
colormap spec, optional) – The colormap specifer, passed to theColormapconstructor function.norm (
normalizer spec, optional) – The continuous colormap normalizer, passed to theNormconstructor function. IfdiscreteisTruethis is also used to normalize values passed toDiscreteNormbefore colors is selected.discrete (
bool, optional) – IfFalse, thenDiscreteNormis not applied to the colormap. Instead, for non-contour plots, the number of levels will be roughly controlled byrc['cmap.lut']. This has a similar effect to usinglevels=large_numberbut it may improve rendering speed. Default isFalseforimshow,matshow,spy,hexbin,hist2d, andheatmapplots, butTrueotherwise.sequential (
bool, optional) – Userc['cmap.sequential']='fire'as the default colormap.diverging (
bool, optional) – Userc['cmap.diverging']='negpos'as the default colormap and useDivergingNormas the default continuous normalizer. This will also ensure auto-generated levels include a value at zero.cyclic (
bool, optional) – Userc['cmap.cyclic']='twilight'as the default colormap and modify the default arguments passed toDiscreteNormso that colors on either end are distinct.sequential, diverging, cyclic, qualitative (
bool, optional) – Boolean arguments used ifcmapis not passed. Set these toTrueto use the defaultrc['cmap.sequential'],rc['cmap.diverging'],rc['cmap.cyclic'], andrc['cmap.qualitative']colormaps. The latter three options also change level- and norm-generation behavior.extend (
{{'neither', 'min', 'max', 'both'}}, optional) – Whether to assign unique colors to out-of-bounds data and draw colorbar “extensions” when a colorbar is drawn.vmin, vmax (
float, optional) – Used to determine level locations iflevelsorvaluesis an integer. Actual levels may not fall exactly onvminandvmax, but the minimum level will be no smaller thanvminand the maximum level will be no larger thanvmax. Ifvminorvmaxare not provided, the minimum and maximum data values are used.colorbar (
bool,int, orstr, optional) – If notNone, this is a location specifying where to draw an inset or panel colorbar from the resulting object(s). IfTrue, the defaultrc['colorbar.loc']='right'is used. Valid locations are described incolorbar.colorbar_kw (dict-like, optional) – Extra keyword args for the call to
colorbar.legend (
bool,int, orstr, optional) – If notNone, this is a location specifying where to draw an inset or panel legend from the resulting object(s). IfTrue, the defaultrc['legend.loc']='best'is used. Valid locations are described inlegend.legend_kw (dict-like, optional) – Extra keyword args for the call to
legend.interp (
int, optional) – Interpolate to this many additional points between the parametric coordinates. Default is0. This can be increased to make the color gradations between a small number of coordinates appear “smooth”.scalex, scaley (
bool, optional) – Whether the view limits are adapted to the data limits. The values are passed on toautoscale_view.inbounds (
bool, optional) – Whether to restrict the defaulty(x) axis limits to account for only in-bounds data when thex(y) axis limits have been locked. Default isrc['axes.inbounds']=True. See alsorc['cmap.inbounds'].**kwargs – Valid
LineCollectionproperties.
- Returns
LineCollection– The parametric line. See this matplotlib example.