ScatterDecorator

class qf_lib.plotting.decorators.scatter_decorator.ScatterDecorator(x_data: collections.abc.Sequence, y_data: collections.abc.Sequence, size: int = 40, color=None, key: str = None, **plot_settings: Any)[source]

Bases: qf_lib.plotting.decorators.chart_decorator.ChartDecorator, qf_lib.plotting.decorators.simple_legend_item.SimpleLegendItem

Creates a scatter plot based on the data specified.

Parameters
  • x_data (Sequence) – values of x coordinate

  • y_data (Sequence) – values of y coordinate

  • size (int) – size in points^2; scalar or an array of the same length as x_data and y_data

  • colorc can be a single color format string, or a sequence of color specifications of length x_data and y_data, or a sequence of x_data and y_data numbers to be mapped to colors using the cmap and norm specified via kwargs (see below). Note that color should not be a single numeric RGB or RGBA sequence because that is indistinguishable from an array of values to be colormapped. color can be a 2-D array in which the rows are RGB or RGBA, however, including the case of a single row to specify the same color for all points.

  • plot_settings – other settings like for example: alpha, linewidths, verts, edgecolors

Methods

decorate(chart)

Modifies the axes object taken from the chart (e.g.

decorate(chart: qf_lib.plotting.charts.chart.Chart)[source]

Modifies the axes object taken from the chart (e.g. adds legend, draws cone, etc.).