plopp.scatter3d#

plopp.scatter3d(obj, *, x='x', y='y', z='z', pos=None, figsize=(600, 400), norm='linear', title=None, vmin=None, vmax=None, cbar=False, cmap='viridis', camera=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 the pos parameter to specify the name of the coordinate).

  • three coordinates from the data array, whose names are specified using the x, y, and z arguments.

Note that if pos is used, x, y, and z must all be None.

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 (Optional[str], default: None) – The name of the vector coordinate that is to be used for the positions.

  • norm (Literal['linear', 'log'], default: 'linear') – Set to 'log' for a logarithmic colorscale.

  • figsize (tuple[int, int], default: (600, 400)) – The size of the 3d rendering area, in pixels: (width, height).

  • title (Optional[str], default: None) – The figure title.

  • vmin (Union[Variable, float, None], default: None) – Lower bound for the colorscale.

  • vmax (Union[Variable, float, None], default: None) – Upper bound for the colorscale.

  • cmap (str, default: 'viridis') – The name of the colormap.

  • camera (Optional[Camera], default: None) – Initial camera configuration (position, target).

Returns:

FigureLike – A three-dimensional interactive scatter plot.