scatter_extras¶
- scatter_extras(self, *args, **kwargs)[source]¶
Support
apply_cmap
features and support keywords that are more consistent withplot
keywords.Important
This function wraps
scatter
.- Parameters
*args (y or x, y) – The input x or x and y coordinates. If only y is provided, x will be inferred from y.
s, size, markersize (float or list of float, optional) – The marker size(s). The units are optionally scaled by
smin
andsmax
.smin, smax (float, optional) – The minimum and maximum marker size in units
points^2
used to scales
. If not provided, the marker sizes are equivalent to the values ins
.c, color, markercolor (color-spec or list thereof, or array, optional) – The marker fill color(s). If this is an array of scalar values, colors will be generated using the colormap
cmap
and normalizernorm
.vmin, vmax (float, optional) – Used to determine level locations if
levels
orvalues
is an integer. Actual levels may not fall exactly onvmin
andvmax
, but the minimum level will be no smaller thanvmin
and the maximum level will be no larger thanvmax
. Ifvmin
orvmax
are not provided, the minimum and maximum data values are used.
- cmapcolormap spec, optional
The colormap specifer, passed to the
Colormap
constructor.- cmap_kwdict-like, optional
Passed to
Colormap
.- normnormalizer spec, optional
The colormap normalizer, used to warp data before passing it to
DiscreteNorm
. This is passed to theNorm
constructor.- norm_kwdict-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.
- N
Shorthand for
levels
.- levelsint or list of float, optional
The number of level edges or a list of level edges. If the former,
locator
is used to generate this many level edges at “nice” intervals. If the latter, the levels should be monotonically increasing or decreasing (note that decreasing levels will only work withpcolor
plots, notcontour
plots). Default isrc[‘image.levels’]
=11
.- valuesint or list of float, optional
The number of level centers or a list of level centers. If the former,
locator
is used to generate this many level centers at “nice” intervals. If the latter, levels are inferred usingedges
. This will override anylevels
input.- discretebool, optional
If
False
, theDiscreteNorm
is not applied to the colormap whenlevels=N
orlevels=array_of_values
are not explicitly requested. Instead, the number of levels in the colormap will be roughly controlled byrc[‘image.lut’]
. This has a similar effect to usinglevels=large_number
but it may improve rendering speed. By default, this isFalse
only forimshow
,matshow
,spy
,hexbin
, andhist2d
plots.- inboundsbool, optional
If
True
(the edefault), when automatically selecting levels in the presence of hard x and y axis limits (i.e., whenset_xlim
orset_ylim
have been called previously), only the in-bounds data is sampled. Default isrc[‘image.inbounds’]
=True
.- locatorlocator-spec, optional
The locator used to determine level locations if
levels
orvalues
is an integer andvmin
andvmax
were not provided. Passed to theLocator
constructor. Default isMaxNLocator
withlevels
integer levels.- locator_kwdict-like, optional
Passed to
Locator
.- symmetricbool, optional
If
True
, automatically generated levels are symmetric about zero.- positivebool, optional
If
True
, automatically generated levels are positive with a minimum at zero.- negativebool, optional
If
True
, automatically generated levels are negative with a maximum at zero.- nozerobool, optional
If
True
,0
is removed from the level list. This is mainly useful forcontour
plots.- lw, linewidth, linewidths, markeredgewidth, markeredgewidthsfloat or list thereof, optional
The marker edge width.
- edgecolors, markeredgecolor, markeredgecolorscolor-spec or list thereof, optional
The marker edge color.
- Other Parameters
**kwargs – Passed to
scatter
.