PointEmphasisDecorator
- class qf_lib.plotting.decorators.point_emphasis_decorator.PointEmphasisDecorator(series_data_element: DataElementDecorator, coordinates: Tuple[Any, Any], color: Optional[str] = None, decimal_points: int = 2, label_format: str = ' {:.4g}', key: Optional[str] = None, use_secondary_axes: bool = False, move_point: bool = True, font_size: int = 15)[source]
Bases:
ChartDecorator
,SimpleLegendItem
Creates a new marker for series_data_element for x=series_index. For a timeseries, you can specify the time that you wish to be emphasised.
- Parameters:
series_data_element (DataElementDecorator) – The DataElementDecorator which should be decorated with an emphasised point.
coordinates (Tuple[Any, Any]) – The x and y coordinate of the point that should be emphasised. The x and y coordinates should be expressed in data coordinates (e.g. the x coordinate should be a date if x-axis contains dates).
color (str) – color of the marker; by default it will be the same as the decorated line
decimal_points (int) – number of decimal points that should be shown in the point’s label
label_format (str) – A format string specifying how the label should be displayed. Takes two parameters: the index and value. useful values: ‘ {:0.1E}’, ‘ {:0.1f}’
key (str) – see: ChartDecorator.__init__#key
use_secondary_axes (bool) – determines whether this PointEmphasis belongs on the secondary axis.
move_point (bool) –
font_size (int) – size of font
Methods:
decorate
(chart)Modifies the axes object taken from the chart (e.g.