LineChart
- class qf_lib.plotting.charts.line_chart.LineChart(start_x: any = None, end_x: any = None, upper_y: any = None, lower_y: any = None, log_scale: bool = False, rotate_x_axis=False)[source]
Bases:
ChartSimple line chart. It can plot both QFSeries and DataFrames. By default the
start_xandend_xwill be determined by the series added to the chart. So whatever the earliest data point is will determine thestart_x.- Parameters:
start_x (Any) – if not set to None, the chart x-axis will begin at the specified
start_xvalueend_x (Any) – if not set to None, the chart x-axis will end at the specified
end_xvalue.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.
Methods:
Plots all DataElementDecorators added to a chart.
plot([figsize])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).
- Parameters:
data_element_decorators (List[DataElementDecorator]) – non-empty list of DataElementDecorators that should be plotted on the chart
- plot(figsize: Tuple[float, float] = None) None[source]
Plots the chart. The underlying figure stays hidden until the show() method is called.
- Parameters:
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
plotfunction. The values are expressed in inches.