plopp.graphics.Scatter3dView#

class plopp.graphics.Scatter3dView(*nodes, x='x', y='y', z='z', cmap='viridis', mask_cmap='gray', norm='linear', vmin=None, vmax=None, figsize=(600, 400), title=None, camera=None, **kwargs)[source]#

View that makes a visual representation of three-dimensional scatter data. It has a Canvas, a ColorMapper and a specialized update function that generates PointCloud artists.

Parameters:
  • *nodes – The nodes that are attached to the view.

  • x (str, default: 'x') – The name of the coordinate to use for the X positions of the scatter points.

  • y (str, default: 'y') – The name of the coordinate to use for the Y positions of the scatter points.

  • z (str, default: 'z') – The name of the coordinate to use for the Z positions of the scatter points.

  • cmap (str, default: 'viridis') – The name of the colormap for the data (see https://matplotlib.org/stable/tutorials/colors/colormaps.html). In addition to the Matplotlib docs, if the name is just a single html color, a colormap with that single color will be used.

  • mask_cmap (str, default: 'gray') – The name of the colormap for masked data.

  • norm (Literal['linear', 'log'], default: 'linear') – Control the scaling on the vertical axis.

  • vmin (Union[Variable, int, float, None], default: None) – Lower bound for the colorbar. If a number (without a unit) is supplied, it is assumed that the unit is the same as the data unit.

  • vmax (Union[Variable, int, float, None], default: None) – Upper bound for the colorbar. If a number (without a unit) is supplied, it is assumed that the unit is the same as the data unit.

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

  • figsize (Tuple[int, int], default: (600, 400)) – The width and height of the figure, in pixels.

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

  • **kwargs – All other kwargs are forwarded to the PointCloud artist.

__init__(*nodes, x='x', y='y', z='z', cmap='viridis', mask_cmap='gray', norm='linear', vmin=None, vmax=None, figsize=(600, 400), title=None, camera=None, **kwargs)[source]#

Methods

__init__(*nodes[, x, y, z, cmap, mask_cmap, ...])

get_limits()

Get global limits for all the point clouds in the scene.

notify_view(message)

When a notification is received, request data from the corresponding parent node and update the relevant artist.

remove(key)

Remove an object from the scene.

render()

At the end of figure creation, this function is called to request data from all parent nodes and draw the figure.

set_opacity(alpha)

Update the opacity of the original children (not the cuts).

update(*args, **kwargs)

Update the view with new point clouds by either supplying a dictionary of new data or by keyword arguments.

Attributes

id

The unique id of the view.