plopp.scatter3d#
- plopp.scatter3d(obj, *, x='x', y='y', z='z', pos=None, autoscale=True, camera=None, cbar=False, clabel=None, cmap='viridis', cmax=None, cmin=None, figsize=(600, 400), logc=None, nan_color=None, norm=None, title=None, vmax=None, vmin=None, **kwargs)[source]#
Make a three-dimensional scatter plot.
To specify the positions of the scatter points, you can use:
a single coordinate inside the supplied data array that has dtype
vector3
(use thepos
parameter to specify the name of the coordinate).three coordinates from the data array, whose names are specified using the
x
,y
, andz
arguments.
Note that if
pos
is used,x
,y
, andz
must all beNone
.- Parameters:
obj (
Variable
|DataArray
|Dataset
|DataGroup
[Any
] |ndarray
|Node
|dict
[str
,Variable
|DataArray
|Dataset
|DataGroup
[Any
] |ndarray
|Node
]) – The data array containing the data and the coordinates.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.z (
str
, default:'z'
) – The name of the coordinate that is to be used for the Z positions.pos (
str
|None
, default:None
) – The name of the vector coordinate that is to be used for the positions.autoscale (
bool
, default:True
) – Automatically scale the colormap on updates ifTrue
.camera (
Camera
|None
, default:None
) – Initial camera configuration (position, target).cbar (
bool
, default:False
) – 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
, default:None
) – Upper limit for the colorscale (only applicable ifcbar
isTrue
).cmin (
Variable
|float
, default:None
) – Lower limit for the colorscale (only applicable ifcbar
isTrue
).figsize (
tuple
[int
,int
], default:(600, 400)
) – The size of the 3d rendering area, in pixels:(width, height)
.logc (
bool
|None
, default:None
) – Set toTrue
for a logarithmic colorscale (only applicable ifcbar
isTrue
).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.vmin (
Variable
|float
, default:None
) – Lower limit for the colorscale for (only applicable ifcbar
isTrue
). Legacy, prefercmin
instead.vmax (
Variable
|float
, default:None
) – Upper limit for the colorscale for (only applicable ifcbar
isTrue
). Legacy, prefercmax
instead.**kwargs – All other kwargs are forwarded the underlying plotting library.
- Returns:
FigureLike
– A three-dimensional interactive scatter plot.