solarwindpy.plotting.scatter

Scatter plot utilities with optional color mapping.

Classes

Scatter(x, y[, z, clip_data])

Create a scatter plot.

class Scatter(x, y, z=None, clip_data=False)[source]

Bases: PlotWithZdata, CbarMaker

Create a scatter plot.

Notes

__init__(x, y, z=None, clip_data=False)[source]

Initialize scatter plot data.

Parameters:
  • x (pd.Series) – Data defining (x, y) coordinates.

  • y (pd.Series) – Data defining (x, y) coordinates.

  • z (pd.Series, optional) – If not None, used to specify the color for each point.

  • clip_data (bool) – If True, remove extreme values at the 0.001 and 0.999 percentitles.

make_plot(ax=None, cbar=True, cbar_kwargs=None, **kwargs)[source]

Make a scatter plot on ax using ax.scatter.

Parameters:
  • ax (mpl.axes.Axes, None) – If None, create an Axes instance from plt.subplots.

  • cbar (bool) – If True, create color bar with labels.z.

  • cbar_kwargs (dict, None) – If not None, kwargs passed to self._make_cbar.

  • kwargs – Passed to ax.pcolormesh.

property clip
property data
property labels
property log
property logger
property path

Path for saving figure.

set_data(x, y, z=None, clip_data=False)
set_labels(**kwargs)

Set or update x, y, or z labels. Any label not specified in kwargs.

is propagated from self.labels.<x, y, or z>.

set_log(x=None, y=None)
set_path(new, add_scale=True)

Build the plot save path.

Parameters:
  • new (str or Path) – If str and == “auto”, then build path from self.labels. Otherwise, assume parameter specifies the desired path and use Path(new).

  • add_scale (bool) – If True, add information about the axis scales to the end of the path.