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 if True.

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

  • clabel (str | None, default: None) – Label for colorscale (only applicable if cbar is True).

  • cmap (str, default: 'viridis') – The colormap to be used for the colorscale (only applicable if cbar is True).

  • cmax (Variable | float | None, default: None) – Upper limit for the colorscale (only applicable if cbar is True).

  • cmin (Variable | float | None, default: None) – Lower limit for the colorscale (only applicable if cbar is True).

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

  • grid (bool, default: False) – Show grid if True.

  • ignore_size (bool, default: False) – If True, skip the check that prevents the rendering of very large data.

  • 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.

  • logc (bool | None, default: None) – Set to True for a logarithmic colorscale (only applicable if cbar is True).

  • logx (bool | None, default: None) – If True, use logarithmic scale for x-axis.

  • logy (bool | None, default: None) – If True, 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 if cbar is True).

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

  • scale (dict[str, str] | None, default: None) – Change axis scaling between log and linear. For example, specify scale={'time': 'log'} if you want log-scale for the time dimension. Legacy, prefer logx and logy instead.

  • title (str | None, default: None) – The figure title.

  • vmin (Variable | float | None, default: None) – Lower limit for the colorscale for (only applicable if cbar is True). Legacy, prefer cmin instead.

  • vmax (Variable | float | None, default: None) – Upper limit for the colorscale for (only applicable if cbar is True). Legacy, prefer cmax instead.

  • xlabel (str | None, default: None) – Label for x-axis.

  • xmax (Variable | float | None, default: None) – Upper limit for x-axis.

  • xmin (Variable | float | None, default: None) – Lower limit for x-axis.

  • ylabel (str | None, default: None) – Label for y-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