plopp.scatter#
- plopp.scatter(obj, *, x='x', y='y', pos=None, aspect=None, autoscale=True, cbar=True, clabel=None, cmap='viridis', cmax=None, cmin=None, figsize=None, grid=False, ignore_size=False, legend=True, logc=None, logx=None, logy=None, mask_color='black', nan_color=None, norm=None, scale=None, size=None, title=None, vmax=None, vmin=None, xlabel=None, xmax=None, xmin=None, ylabel=None, ymax=None, ymin=None, **kwargs)[source]#
Make a two-dimensional scatter plot.
Added in version 24.04.0.
- Parameters:
obj (
Variable
|DataArray
|Dataset
|DataGroup
[Any
] |ndarray
|Node
|dict
[str
,Variable
|DataArray
|Dataset
|DataGroup
[Any
] |ndarray
|Node
]) – The object to be plotted.x (
str
, default:'x'
) – The name of the coordinate that is to be used for the X positions.y (
str
, default:'y'
) – The name of the coordinate that is to be used for the Y positions.pos (
str
|None
, default:None
) – The name of the vector coordinate that is to be used for the positions.aspect (
Literal
['auto'
,'equal'
,None
], default:None
) – Aspect ratio for the axes.autoscale (
bool
, default:True
) – Automatically scale the axes/colormap ifTrue
.cbar (
bool
, default:True
) – Show colorbar ifTrue
. Ifcbar
isTrue
, the marker will be colored using the data values in the supplied data array.clabel (
str
|None
, default:None
) – Label for colorscale (only applicable ifcbar
isTrue
).cmap (
str
, default:'viridis'
) – The colormap to be used for the colorscale (only applicable ifcbar
isTrue
).cmax (
Variable
|float
|None
, default:None
) – Upper limit for the colorscale (only applicable ifcbar
isTrue
).cmin (
Variable
|float
|None
, default:None
) – Lower limit for the colorscale (only applicable ifcbar
isTrue
).figsize (
tuple
[float
,float
] |None
, default:None
) – The width and height of the figure, in inches.grid (
bool
, default:False
) – Show grid ifTrue
.ignore_size (
bool
, default:False
) – IfTrue
, skip the check that prevents the rendering of very large data.legend (
bool
|tuple
[float
,float
], default:True
) – Show legend ifTrue
. Iflegend
is a tuple, it should contain the(x, y)
coordinates of the legend’s anchor point in axes coordinates.logc (
bool
|None
, default:None
) – Set toTrue
for a logarithmic colorscale (only applicable ifcbar
isTrue
).logx (
bool
|None
, default:None
) – IfTrue
, use logarithmic scale for x-axis.logy (
bool
|None
, default:None
) – IfTrue
, use logarithmic scale for y-axis.mask_color (
str
, default:'black'
) – Color of markers for masked data.nan_color (
str
|None
, default:None
) – Color to use for NaN values in color mapping (only applicable ifcbar
isTrue
).norm (
Literal
['linear'
,'log'
,None
], default:None
) – Set to'log'
for a logarithmic colorscale (only applicable ifcbar
isTrue
). Legacy, preferlogc
instead.scale (
dict
[str
,str
] |None
, default:None
) – Change axis scaling betweenlog
andlinear
. For example, specifyscale={'time': 'log'}
if you want log-scale for thetime
dimension. Legacy, preferlogx
andlogy
instead.vmin (
Variable
|float
|None
, default:None
) – Lower limit for the colorscale for (only applicable ifcbar
isTrue
). Legacy, prefercmin
instead.vmax (
Variable
|float
|None
, default:None
) – Upper limit for the colorscale for (only applicable ifcbar
isTrue
). Legacy, prefercmax
instead.xmax (
Variable
|float
|None
, default:None
) – Upper limit for x-axis.xmin (
Variable
|float
|None
, default:None
) – Lower limit for x-axis.ymax (
Variable
|float
|None
, default:None
) – Upper limit for y-axis.ymin (
Variable
|float
|None
, default:None
) – Lower limit for y-axis.**kwargs – All other kwargs are forwarded the underlying plotting library.
- Return type:
FigureLike