KDEChart

class qf_lib.plotting.charts.kde_chart.KDEChart[source]

Bases: Chart

Fits and plots a univariate (bivariate to be implemented) kernel density estimate using Seaborn’s kdeplot function.

For more details see: https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.kdeplot.html

Methods:

apply_data_element_decorators(...)

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)[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.