KDEPlot

This class implements the kernel density estimation plot - a visualization of the estimated probability density of one-dimensional numerical data.

Public Methods

void

KDEPlot(const QString &name)

QColor

color() const override

int

dataCount(Dimension) const override

XYCurve*

estimationCurve() const

void

finalizeAdd() override

int

gridPointsCount() const

void

handleAspectUpdated(const QString &aspectPath, const AbstractAspect *element) override

void

handleResize(double horizontalRatio, double verticalRatio, bool pageResize) override

bool

hasData() const override

QIcon

icon() const override

bool

indicesMinMax(const Dimension dim, double v1, double v2, int &start, int &end) const override

bool

load(XmlStreamReader *, bool preview) override

void

loadThemeConfig(const KConfig &) override

double

maximum(CartesianCoordinateSystem::Dimension) const override

bool

minMax(const CartesianCoordinateSystem::Dimension dim, const Range< int > &indexRange, Range< double > &r, bool includeErrorBars=true) const override

double

minimum(CartesianCoordinateSystem::Dimension) const override

void

recalc() override

void

retransform() override

XYCurve*

rugCurve() const

void

save(QXmlStreamWriter *) const override

void

saveThemeConfig(const KConfig &) override

void

setVisible(bool) override

bool

usingColumn(const AbstractColumn *, bool indirect) const override

Detailed Description

class KDEPlot : public Plot

This class implements the kernel density estimation plot - a visualization of the estimated probability density of one-dimensional numerical data.

The estimation can be performed based on one of the supported kernels types (

See also

nsl_kernel_type) and based on the different methods to define the bandwidth (

See also

nsl_kde_bandwidth_type). A rug plot to visualize the provided data points can be enabled additionally to the the visualization of the curve for the estimated dencity.

Public Functions

virtual QIcon icon() const override

Returns an icon to be used in the project explorer.

virtual void save(QXmlStreamWriter*) const override

Save as XML.

virtual bool load(XmlStreamReader*, bool preview) override

Load from XML.

virtual void setVisible(bool) override

Show/hide the element.

int gridPointsCount() const

returns the the number of equally spaced points at which the density is to be evaluated, which also corresponds to the number of data points in the xy-curve used internally.

virtual bool hasData() const override

returns true if a valid data column is set, returns false otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when calculating the data ranges of the plot area.

virtual void handleAspectUpdated(const QString &aspectPath, const AbstractAspect *element) override

handleAspectUpdated in some cases one aspect can depend on another, like a XYCurve on Column or InfoElement on XYCurve. This is a generic function called for all Elements when a new aspect will be added even it is not a child of the current element

Path is explicit specified, so it must not be recalculated every time when iterating over multiple WorksheetElements. The path is the same as aspect->path()

Parameters:

path –