plopp.scatter#

plopp.scatter(obj, *, x='x', y='y', size=None, figsize=None, norm='linear', title=None, vmin=None, vmax=None, cbar=False, cmap='viridis', legend=True, **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.

  • size (Union[str, float, None], default: None) – The size of the marker. If a float is supplied, all markers will have the same size. If a string is supplied, it will be the name of the coordinate that is to be used for the size of the markers.

  • figsize (Optional[tuple[float, float]], default: None) – The width and height of the figure, in inches.

  • norm (Literal['linear', 'log'], default: 'linear') – Set to 'log' for a logarithmic colorscale (only applicable if cbar is True).

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

  • vmin (Union[Variable, float, None], default: None) – Lower bound for the colorscale for (only applicable if cbar is True).

  • vmax (Union[Variable, float, None], default: None) – Upper bound for the colorscale for (only applicable if cbar is True).

  • cbar (bool, default: False) – Show colorbar if True. If cbar is True, the marker will be colored using the data values in the supplied data array.

  • cmap (str, default: 'viridis') – The colormap to be used for the colorscale.

  • legend (bool | tuple[float, float], default: True) – Show legend if True. If legend is a tuple, it should contain the (x, y) coordinates of the legend’s anchor point in axes coordinates.

  • **kwargs – All other kwargs are forwarded the underlying plotting library.

Return type:

FigureLike