class qf_lib.plotting.charts.line_chart.LineChart(start_x: Optional[any] = None, end_x: Optional[any] = None, upper_y: Optional[any] = None, lower_y: Optional[any] = None, log_scale: bool = False, rotate_x_axis=False)[source]

Bases: Chart

Simple line chart. It can plot both QFSeries and DataFrames. By default the start_x and end_x will be determined by the series added to the chart. So whatever the earliest data point is will determine the start_x.

  • start_x (Any) – if not set to None, the chart x-axis will begin at the specified start_x value

  • end_x (Any) – if not set to None, the chart x-axis will end at the specified end_x value.

  • upper_y (Anny) – the upper bound of the y-axis.

  • lower_y (Anny) – the lower bound of the y-axis.

  • log_scale (bool) – use log scale.

  • rotate_x_axis (bool) – rotate the x-axis.



Plots all DataElementDecorators added to a chart.


Plots the chart.

apply_data_element_decorators(data_element_decorators: List[DataElementDecorator])[source]

Plots all DataElementDecorators added to a chart. This function should set legend_artist field in each plotted DataElementDecorator (if applicable).


data_element_decorators (List[DataElementDecorator]) – non-empty list of DataElementDecorators that should be plotted on the chart

plot(figsize: Optional[Tuple[float, float]] = None) None[source]

Plots the chart. The underlying figure stays hidden until the show() method is called.


figsize (Tuple[float, float]) – The figure size to draw the chart at in inches. This is a tuple of (width, height) passed directly to matplotlib’s plot function. The values are expressed in inches.