LineChart
- 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
andend_x
will 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_x
valueend_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.
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: Optional[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
plot
function. The values are expressed in inches.