VerticalSpanDecorator

class qf_lib.plotting.decorators.vertical_span_decorator.VerticalSpanDecorator(x_min: XAxisCoordinate, x_max: XAxisCoordinate, y_min: float = 0, y_max: float = 1, key: str = None, **plot_settings: Any)[source]

Bases: qf_lib.plotting.decorators.chart_decorator.ChartDecorator

Draws a vertical span (rectangle) from x_min to x_max.

Parameters
  • x_min (XAxisCoordinate) – x at which the vertical span should start (expressed in DATA coordinates)

  • x_max (XAxisCoordinate) – x at which the vertical span should end (expressed in DATA coordinates)

  • y_min (float) – y at which the vertical span should start (expressed in AXES coordinates)

  • y_max (float) – y at which the vertical span should end (expressed in AXES coordinates)

  • key (str) – see: ChartDecorator.__init__#key

  • plot_settings – additional arguments which will be passed to the matplotlib plotting function

Methods

decorate(chart)

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

decorate(chart: Chart) → None[source]

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