Plots
These are the plots that can be drawn within a plot area.
-
class BarPlot : public Plot
This class implements the bar plot that is used to visualize categorical data.
The implementation supports the visualization of multiple data sets (column) at the same time with different ways to order them and to modify their properties separately.
Public Functions
-
virtual QIcon icon() const override
Returns an icon to be used in the project explorer.
-
virtual QMenu *createContextMenu() override
Return a new context menu.
The caller takes ownership of the menu.
-
virtual void save(QXmlStreamWriter*) const override
Save as XML.
-
virtual bool load(XmlStreamReader*, bool preview) override
Load from XML.
-
virtual void recalc() override
recalculates the internal structures (additional data containers, drawing primitives, etc.) on data changes in the source data colums. these structures are used in the plot during the actual drawing of the plot on geometry changes.
-
virtual bool hasData() const override
returns
true
if a valid data column is set, returnsfalse
otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when caclulating the data ranges of the plot area.
-
virtual bool usingColumn(const AbstractColumn*, bool indirect) const override
returns
true
if the column is used internally in the plot for the visualisation, returnsfalse
otherwise. Ifindirect
is true it returns true also if a depending curve uses that column
-
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 –
-
virtual QIcon icon() const override
-
class BoxPlot : public Plot
This class implements the box plot that is used to visualize the spread of numerical data with the help of their quartiles.
The implementation supports the visualization of multiple data sets (column) at the same time with different ways to order them and to modify their properties separately. Notches, jittering of the data as well as the rug plot are possible to get more insights into the structure of the visualized data.
Public Functions
-
virtual QIcon icon() const override
Returns an icon to be used in the project explorer.
-
virtual QMenu *createContextMenu() override
Return a new context menu.
The caller takes ownership of the menu.
-
virtual void save(QXmlStreamWriter*) const override
Save as XML.
-
virtual bool load(XmlStreamReader*, bool preview) override
Load from XML.
-
virtual void recalc() override
recalculates the internal structures (additional data containers, drawing primitives, etc.) on data changes in the source data colums. these structures are used in the plot during the actual drawing of the plot on geometry changes.
-
virtual bool hasData() const override
returns
true
if a valid data column is set, returnsfalse
otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when caclulating the data ranges of the plot area.
-
virtual bool usingColumn(const AbstractColumn*, bool indirect) const override
returns
true
if the column is used internally in the plot for the visualisation, returnsfalse
otherwise. Ifindirect
is true it returns true also if a depending curve uses that column
Public Slots
-
void createDataSpreadsheet()
creates a new spreadsheet having the data with the positions and the values of the bins. the new spreadsheet is added to the current folder.
-
virtual QIcon icon() const override
-
class Histogram : public Plot
This class implements the histogram - a visualization of the distribution of numerical data.
Ordinary, cumulative and average shifted histograms are supported as well as different normalization and binning methods.
Public Functions
-
virtual QIcon icon() const override
Returns an icon to be used in the project explorer.
-
virtual QMenu *createContextMenu() override
Return a new context menu.
The caller takes ownership of the menu.
-
virtual void save(QXmlStreamWriter*) const override
Save as XML.
-
virtual bool load(XmlStreamReader*, bool preview) override
Load from XML.
-
virtual void recalc() override
recalculates the internal structures (additional data containers, drawing primitives, etc.) on data changes in the source data colums. these structures are used in the plot during the actual drawing of the plot on geometry changes.
-
virtual bool hasData() const override
returns
true
if a valid data column is set, returnsfalse
otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when caclulating the data ranges of the plot area.
-
virtual bool usingColumn(const AbstractColumn*, bool indirect) const override
returns
true
if the column is used internally in the plot for the visualisation, returnsfalse
otherwise. Ifindirect
is true it returns true also if a depending curve uses that column
Public Slots
-
void createDataSpreadsheet()
creates a new spreadsheet having the data with the positions and the values of the bins. the new spreadsheet is added to the current folder.
-
virtual QIcon icon() const override
-
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 recalc() override
recalculates the internal structures (additional data containers, drawing primitives, etc.) on data changes in the source data colums. these structures are used in the plot during the actual drawing of the plot on geometry changes.
-
virtual void setVisible(bool) override
Show/hide the element.
-
int gridPointsCount() const
returns the the number of equaly 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, returnsfalse
otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when caclulating the data ranges of the plot area.
-
virtual bool usingColumn(const AbstractColumn*, bool indirect) const override
returns
true
if the column is used internally in the plot for the visualisation, returnsfalse
otherwise. Ifindirect
is true it returns true also if a depending curve uses that column
-
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 –
-
virtual QIcon icon() const override
-
class LollipopPlot : public Plot
This class implements the lollipop plot that is used to visualize categorical data.
This visualization type is very similar to the bar plot with the difference that lines and symbols instead of baras are used. The implementation supports the visualization of multiple data sets (column) at the same time with different ways to order them and to modify their properties separately.
Public Functions
-
virtual QIcon icon() const override
Returns an icon to be used in the project explorer.
-
virtual QMenu *createContextMenu() override
Return a new context menu.
The caller takes ownership of the menu.
-
virtual void save(QXmlStreamWriter*) const override
Save as XML.
-
virtual bool load(XmlStreamReader*, bool preview) override
Load from XML.
-
virtual void recalc() override
recalculates the internal structures (additional data containers, drawing primitives, etc.) on data changes in the source data colums. these structures are used in the plot during the actual drawing of the plot on geometry changes.
-
virtual bool hasData() const override
returns
true
if a valid data column is set, returnsfalse
otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when caclulating the data ranges of the plot area.
-
virtual bool usingColumn(const AbstractColumn*, bool indirect) const override
returns
true
if the column is used internally in the plot for the visualisation, returnsfalse
otherwise. Ifindirect
is true it returns true also if a depending curve uses that column
-
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 –
-
virtual QIcon icon() const override
-
class ProcessBehaviorChart : public Plot
This class implements the process behavior chart.
The sub-types XmR, mR, XbarR, R, XbarS, S, P, NP, C, U are implemented and the implementation follows the conventions used in the book “Making Sense of Data”, Donald J. Wheeler. The visual properties of the plotted line for the controll limits and for the actual data can be modified independently of each other.
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 recalc() override
recalculates the internal structures (additional data containers, drawing primitives, etc.) on data changes in the source data colums. these structures are used in the plot during the actual drawing of the plot on geometry changes.
-
virtual void setVisible(bool) override
Show/hide the element.
-
int xIndexCount() const
returns the number of index values used for x.
-
virtual bool hasData() const override
returns
true
if a valid data column is set, returnsfalse
otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when caclulating the data ranges of the plot area.
-
virtual bool usingColumn(const AbstractColumn*, bool indirect) const override
returns
true
if the column is used internally in the plot for the visualisation, returnsfalse
otherwise. Ifindirect
is true it returns true also if a depending curve uses that column
-
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 –
-
virtual QIcon icon() const override
-
class QQPlot : public Plot
This class implements the Q-Q plot - a visualization of that is used to compare two probability distributions by plotting their quantiles against each other.
The provided data set can be compared with one of the distributions implemented in
NSL
. The visual properties of the plotted reference line and the percentile values can be modified independently of each other.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 recalc() override
recalculates the internal structures (additional data containers, drawing primitives, etc.) on data changes in the source data colums. these structures are used in the plot during the actual drawing of the plot on geometry changes.
-
virtual void setVisible(bool) override
Show/hide the element.
-
virtual bool hasData() const override
returns
true
if a valid data column is set, returnsfalse
otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when caclulating the data ranges of the plot area.
-
virtual bool usingColumn(const AbstractColumn*, bool indirect) const override
returns
true
if the column is used internally in the plot for the visualisation, returnsfalse
otherwise. Ifindirect
is true it returns true also if a depending curve uses that column
-
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 –
-
virtual QIcon icon() const override
-
class RunChart : public Plot
This class implements the run chart (or run sequency plot) - a visualization showing the provided data points together with the median/average of the data, commonly used to identify trends or changes in the observation.
To define the reference and to compare with, either median or the average values can be used. The visual properties of the plotted line for the reference value and for the actual data can be modified independently of each other.
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 recalc() override
recalculates the internal structures (additional data containers, drawing primitives, etc.) on data changes in the source data colums. these structures are used in the plot during the actual drawing of the plot on geometry changes.
-
virtual void setVisible(bool) override
Show/hide the element.
-
int xIndexCount() const
returns the number of index values used for x.
-
virtual bool hasData() const override
returns
true
if a valid data column is set, returnsfalse
otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when caclulating the data ranges of the plot area.
-
virtual bool usingColumn(const AbstractColumn*, bool indirect) const override
returns
true
if the column is used internally in the plot for the visualisation, returnsfalse
otherwise. Ifindirect
is true it returns true also if a depending curve uses that column
-
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 –
-
virtual QIcon icon() const override
-
class XYConvolutionCurve : public XYAnalysisCurve
A xy-curve defined by a convolution.
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.
-
struct ConvolutionData
-
virtual QIcon icon() const override
-
class XYCorrelationCurve : public XYAnalysisCurve
A xy-curve defined by a correlation.
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.
-
struct CorrelationData
-
virtual QIcon icon() const override
-
class XYCurve : public Plot
This class implements the visualization of a 2D/xy curve.
The visualization of the curve can be parametrized via varios parameters and can be used to achieve the visualizations that are commonly named as line plot, scatter plot, error bar plot, line+symbol plot, rug plot, etc. or any combinations of them.
Subclassed by XYAnalysisCurve, XYEquationCurve
Public Functions
-
virtual QIcon icon() const override
Returns an icon to be used in the project explorer.
-
virtual QMenu *createContextMenu() override
Return a new context menu.
The caller takes ownership of the menu.
-
virtual void save(QXmlStreamWriter*) const override
Save as XML.
-
virtual bool load(XmlStreamReader*, bool preview) override
Load from XML.
-
double y(double x, bool &valueFound) const
Find y value which corresponds to a
x
.valueFound
indicates, if value was found. When monotonic increasing or decreasing a different algorithm will be used, which needs less steps (mean) (log_2(rowCount)) to find the value.- Parameters:
x –
valueFound –
- Returns:
-
QDateTime yDateTime(double x, bool &valueFound) const
Find y DateTime which corresponds to a
x
.valueFound
indicates, if value was found. When monotonic increasing or decreasing a different algorithm will be used, which needs less steps (mean) (log_2(rowCount)) to find the value.- Parameters:
x –
valueFound –
- Returns:
Return found value
-
virtual bool hasData() const override
returns
true
if a valid data column is set, returnsfalse
otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when caclulating the data ranges of the plot area.
-
virtual bool usingColumn(const AbstractColumn*, bool indirect) const override
returns
true
if the column is used internally in the plot for the visualisation, returnsfalse
otherwise. Ifindirect
is true it returns true also if a depending curve uses that column
-
bool isSourceDataChangedSinceLastRecalc() const
return
true
if the data in the source columns (x, y) used in the analysis curves,false
otherwise
-
virtual void recalc() override
recalculates the internal structures (additional data containers, drawing primitives, etc.) on data changes in the source data colums. these structures are used in the plot during the actual drawing of the plot on geometry changes.
-
void enableLineOptimization(bool)
if
enable
is set to true, enables the line optimization to reduce the total number of lines to be drawn, disables it otherwise. On default, the line optimization is activated. Used when exporting/printing the parent worksheet to disable the line optimization to get better result.
-
double y(double x, double &x_new, bool &valueFound) const
- Parameters:
x – :value for which y should be found
valueFound – returns true if y value found, otherwise false
x_new – exact x value where y value is
- Returns:
y value from x value
-
int getNextValue(double xpos, int index, double &x, double &y, bool &valueFound) const
Find nearest x value from a value xpos and his y value
- Parameters:
xpos – position for which the next index xpos should be found
offset – Offset from the index where xpos is. Positive is after the found index, negative is before the found index
x – x value at the found index
y – y value at the found index
valueFound – True when value found, otherwise false
-
virtual QIcon icon() const override
-
class XYDataReductionCurve : public XYAnalysisCurve
A xy-curve defined by a data reduction.
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.
Signals
-
void completed(int)
int ranging from 0 to 100 notifies about the status of the analysis process
-
struct DataReductionData
-
struct DataReductionResult : public XYAnalysisCurve::Result
-
virtual QIcon icon() const override
-
class XYDifferentiationCurve : public XYAnalysisCurve
A xy-curve defined by a differentiation.
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.
-
struct DifferentiationData
-
virtual QIcon icon() const override
-
class XYEquationCurve : public XYCurve
A xy-curve defined by a mathematical equation.
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.
Public Slots
-
void createDataSpreadsheet()
creates a new spreadsheet having the data with the results of the calculation. the new spreadsheet is added to the current folder.
-
struct EquationData
-
virtual QIcon icon() const override
-
class XYFitCurve : public XYAnalysisCurve
A xy-curve defined by a fit model.
Public Functions
-
void initFitData(XYAnalysisCurve::AnalysisAction)
sets the parameter names for given model category, model type and degree in
fitData
for given action
-
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.
Public Static Functions
-
static void initFitData(XYFitCurve::FitData&)
sets the model expression and the parameter names for given model category, model type and degree in
fitData
-
struct FitData
-
struct FitResult : public XYAnalysisCurve::Result
-
void initFitData(XYAnalysisCurve::AnalysisAction)
-
class XYFourierFilterCurve : public XYAnalysisCurve
A xy-curve defined by a Fourier filter.
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.
-
struct FilterData
-
struct FilterResult : public XYAnalysisCurve::Result
-
virtual QIcon icon() const override
-
class XYFourierTransformCurve : public XYAnalysisCurve
A xy-curve defined by a Fourier transform.
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.
-
struct TransformData
-
virtual QIcon icon() const override
-
class XYFunctionCurve : public XYAnalysisCurve
A xy-curve that is calculated as a function of other curves.
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.
-
void clearFunction()
Clears the function used to generate column values.
-
struct FunctionData
-
virtual QIcon icon() const override
-
class XYHilbertTransformCurve : public XYAnalysisCurve
A xy-curve defined by a Hilbert transform.
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.
-
struct TransformData
-
virtual QIcon icon() const override
-
class XYIntegrationCurve : public XYAnalysisCurve
A xy-curve defined by an integration.
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.
-
struct IntegrationData
-
struct IntegrationResult : public XYAnalysisCurve::Result
-
virtual QIcon icon() const override
-
class XYInterpolationCurve : public XYAnalysisCurve
A xy-curve defined by an interpolation.
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.
-
struct InterpolationData
-
virtual QIcon icon() const override
-
class XYSmoothCurve : public XYAnalysisCurve
A xy-curve defined by a smooth.
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.
-
struct SmoothData
-
virtual QIcon icon() const override