JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches
jkqtpgraphsbaseerrors.h
1/*
2 Copyright (c) 2008-2024 Jan W. Krieger (<jan@jkrieger.de>)
3
4
5
6 This software is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License (LGPL) as published by
8 the Free Software Foundation, either version 2.1 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License (LGPL) for more details.
15
16 You should have received a copy of the GNU Lesser General Public License (LGPL)
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef JKQTPGRAPHSBASEERROR_H
21#define JKQTPGRAPHSBASEERROR_H
22
23
24#include <QString>
25#include <QPainter>
26#include <QPair>
27#include "jkqtplotter/jkqtpbaseelements.h"
28#include "jkqtplotter/jkqtpbaseplotter.h"
29#include "jkqtplotter/jkqtpgraphsbase.h"
30#include "jkqtplotter/jkqtptools.h"
31#include "jkqtplotter/jkqtplotter_imexport.h"
32#include "jkqtplotter/jkqtpimagetools.h"
33#include "jkqtplotter/jkqtplotter_configmacros.h"
34
35
36/*! \brief This mix-in class assembles all styling properties applicable to error indicators
37 \ingroup jkqtplotter_basegraphserrors
38 \ingroup jkqtplotter_basegraphs_stylemixins
39
40 \image html errorbarstyles.png "line-graphs with different types of error indicators"
41
42 \see \ref jkqtplotter_graphsgroup_classstructure_mixins
43
44 */
46#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
47 Q_GADGET
48#endif
49 public:
50 /** \brief class contructor */
52 virtual ~JKQTPGraphErrorStyleMixin()=default;
53
54 /** \brief initiaize the error indicator style (from the parent plotter) */
55 void initErrorStyle(JKQTBasePlotter* parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default);
56
57
58
59 /** \copydoc m_errorBarCapSize */
60 void setErrorBarCapSize(double __value);
61 /** \copydoc m_errorBarCapSize */
62 double getErrorBarCapSize() const;
63
64
65
66 /** \brief derive the properties of the error indicators from \a pen */
68
69 /** \brief derive the colors of the error indicators from a given \a color */
70 void setErrorColorFromGraphColor(QColor graphColor);
71
72
73
74 /** \brief set the color of the error indicator (out)lines */
75 void setErrorLineColor(const QColor & __value);
76 /** \brief get the color of the error indicator (out)lines */
77 QColor getErrorLineColor() const;
78 /** \brief set the style of the error indicator (out)lines */
79 void setErrorLineStyle(Qt::PenStyle __value);
80 /** \brief get the style of the error indicator (out)lines */
81 Qt::PenStyle getErrorLineStyle() const;
82 /** \brief set the width [pt] of the error indicator (out)lines */
83 void setErrorLineWidth(double __value);
84 /** \brief get the width [pt] of the error indicator (out)lines */
85 double getErrorLineWidth() const;
86 /** \brief sets the dash offset for a custom dash style of the error indicator (out)lines
87 * \see https://doc.qt.io/qt-5/qpen.html#setDashOffset
88 */
89 void setErrorLineDashOffset(qreal offset);
90 /** \brief returns the dash offset for a custom dash style of the error indicator (out)lines
91 * \see https://doc.qt.io/qt-5/qpen.html#setDashOffset
92 */
94 /** \brief sets the dash pattern for a custom dash style of the error indicator (out)lines
95 * \see https://doc.qt.io/qt-5/qpen.html#setDashPattern
96 */
97 void setErrorLineDashPattern(const QVector<qreal> &pattern);
98 /** \brief gets the dash pattern for a custom dash style of the error indicator (out)lines
99 * \see https://doc.qt.io/qt-5/qpen.html#setDashPattern
100 */
101 QVector<qreal> getErrorLineDashPattern() const;
102 /** \brief sets the join style of the error indicator (out)lines
103 * \see https://doc.qt.io/qt-5/qpen.html#setJoinStyle
104 */
105 void setErrorLineJoinStyle(Qt::PenJoinStyle style);
106 /** \brief returns the join style of the error indicator (out)lines
107 * \see https://doc.qt.io/qt-5/qpen.html#setJoinStyle
108 */
109 Qt::PenJoinStyle getErrorLineJoinStyle() const;
110 /** \brief sets the cap style of the error indicator (out)lines
111 * \see https://doc.qt.io/qt-5/qpen.html#setCapStyle
112 */
113 void setErrorLineCapStyle(Qt::PenCapStyle style);
114 /** \brief gets the cap style of the error indicator (out)lines
115 * \see https://doc.qt.io/qt-5/qpen.html#setCapStyle
116 */
117 Qt::PenCapStyle getErrorLineCapStyle() const;
118 /** \brief sets the brush used to fill the line area of the error indicator (out)lines
119 * \see https://doc.qt.io/qt-5/qpen.html#setBrush
120 */
121 void setErrorLineBrush(const QBrush& style);
122 /** \brief gets the brush used to fill the line area of the error indicator (out)lines
123 * \see https://doc.qt.io/qt-5/qpen.html#setBrush
124 */
125 QBrush getErrorLineBrush() const;
126
127
128 /** \brief set the fill color of the error indicators */
129 void setErrorFillColor(const QColor & __value);
130 /** \brief get the fill color of the error indicators */
131 QColor getErrorFillColor() const;
132 /** \brief set the fill style of the error indicators */
133 void setErrorFillStyle(Qt::BrushStyle __value);
134 /** \brief get the fill style of the error indicators */
135 Qt::BrushStyle getErrorFillStyle() const;
136 /** \brief set the color of the error indicator filling and sets fill style to Qt::TexturePattern */
137 void setErrorFillTexture(const QPixmap & __value);
138 /** \brief set the color of the error indicator filling and sets fill style to Qt::TexturePattern */
139 void setErrorFillTexture(const QImage & __value);
140 /** \brief set the color of the error indicator filling */
141 QPixmap getErrorFillTexture() const;
142 /** \brief set the color of the error indicator filling */
144
145 /** \brief set the filling of the error indicators to a gradient and sets fill style to a gradient setting */
146 void setErrorFillGradient(const QGradient & __value);
147 /** \brief get the gradient object of the error indicator filling */
148 const QGradient *getErrorFillGradient() const;
149
150 /** \brief sets an error indicator fill brush (overwrites all internal properties!) */
151 void setErrorFillBrush(const QBrush& b);
152 /** \brief sets an error indicator fill transformation */
153 void setErrorFillTransform(const QTransform& b);
154
155
156
157 protected:
158 /** \brief error indicator line pen */
160 /** \brief width of the error indicators' lines, given in pt */
162
163
164 /** \brief fill brush for the error indicators */
166 /** \brief fill color for the error indicators */
168
169
170 /** \brief size of the error bar end markers [pt] */
172
173
174 /** \brief constructs a QPen from the error indicator line styling properties */
175 QPen getErrorLinePen(JKQTPEnhancedPainter &painter, const JKQTBasePlotter* parent) const;
176 /** \brief constructs a QPen from the error indicator line styling properties, suitable for drawing rectangles with sharp edges */
178
179 /** \brief constructs a QBrush from the error indicator fill styling properties */
180 QBrush getErrorFillBrush(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent) const;
181
182 /** \brief draw error indicators with the parameters defined in this class. The position of the datapoints is
183 * given by the \a xColumn and \a yColumn. It is also possible to specify a datarange. */
184 void intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, const JKQTBasePlotter *parent, const JKQTPGraph* parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int xErrorColumnLower=-1, int yErrorColumnLower=-1, bool xErrorSymmetric=true, bool yErrorSymmetric=true, double xrelshift=0, double yrelshift=0.0, const QVector<int> *dataorder=nullptr) const;
185 /** \brief this function can be used to set the color of the error indicators automatically
186 *
187 * return \c true and the colors to use, if applicable, the default implementation returns false */
188 virtual bool intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter& painter, const JKQTBasePlotter* parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int index, QColor& errorLineColor, QColor& errorFillColor) const;
189};
190
191
192
193/*! \brief This class adds data fields for error indicators in x direction
194 \ingroup jkqtplotter_basegraphserrors
195 \see JKQTPYGraphErrorData, \ref jkqtplotter_graphsgroup_classstructure_mixins
196 */
198#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
199 Q_GADGET
200#endif
201 public:
202 /** \brief class contructor */
204 virtual ~JKQTPXGraphErrorData()=default;
205
206 /** \copydoc xErrorSymmetric */
207 void setXErrorSymmetric(bool __value);
208 /** \copydoc xErrorSymmetric */
209 bool getXErrorSymmetric() const;
210 /** \copydoc xErrorColumnLower */
212 /** \copydoc xErrorColumn */
213 int getXErrorColumn() const;
214 /** \copydoc xErrorStyle */
216 /** \copydoc xErrorStyle */
218 /** \copydoc xErrorColumn */
219 void setXErrorColumn(int __value);
220 /** \copydoc xErrorColumnLower */
221 void setXErrorColumnLower(int __value);
222
223
224 protected:
225 /** \brief the column that contains the error of the x-component of the datapoints */
227 /** \brief the column that contains the error of the x-component of the datapoints. This is used as the lower error length, if xErrorSymmetric \c ==false. */
229 /** \brief indicates whether the x-errors are symmetric (from one column only) */
231 /** \brief how to draw the errors (if available) of the x-value */
233
234 /** \brief returns the upper x-error for the i-th datapoint, read from datastore \a ds */
235 virtual double getXErrorU(int i, const JKQTPDatastore* ds) const;
236 /** \brief returns the lower x-error for the i-th datapoint, read from datastore \a ds */
237 virtual double getXErrorL(int i, const JKQTPDatastore *ds) const;
238
239};
240
241
242
243
244
245/*! \brief This class adds data fields for error indicators in y direction
246 \ingroup jkqtplotter_basegraphserrors
247 \see JKQTPXGraphErrorData \ref jkqtplotter_graphsgroup_classstructure_mixins
248 */
250#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
251 Q_GADGET
252#endif
253 public:
254 /** \brief class contructor */
256 virtual ~JKQTPYGraphErrorData()=default;
257
258 /** \copydoc yErrorSymmetric */
259 void setYErrorSymmetric(bool __value);
260 /** \copydoc yErrorSymmetric */
261 bool getYErrorSymmetric() const;
262 /** \copydoc yErrorColumnLower */
264 /** \copydoc yErrorColumn */
265 int getYErrorColumn() const;
266 /** \copydoc yErrorStyle */
268 /** \copydoc yErrorStyle */
270 /** \copydoc yErrorColumn */
271 void setYErrorColumn(int __value);
272 /** \copydoc yErrorColumnLower */
273 void setYErrorColumnLower(int __value);
274
275
276 protected:
277 /** \brief the column that contains the error of the x-component of the datapoints */
279 /** \brief the column that contains the error of the x-component of the datapoints. This is used as the lower error length, if yErrorSymmetric \c ==false. */
281 /** \brief indicates whether the x-errors are symmetric (from one column only) */
283 /** \brief how to draw the errors (if available) of the x-value */
285
286 /** \brief returns the upper y-error for the i-th datapoint, read from datastore \a ds */
287 virtual double getYErrorU(int i, const JKQTPDatastore* ds) const;
288 /** \brief returns the lower y-error for the i-th datapoint, read from datastore \a ds */
289 virtual double getYErrorL(int i, const JKQTPDatastore* ds) const;
290
291};
292
293
294
295/*! \brief This class is the base class for graphs that only display error indicators in x-direction
296 \ingroup jkqtplotter_basegraphserrors
297 \see JKQTPXGraphErrorData, JKQTPGraphErrorStyleMixin, \ref jkqtplotter_graphsgroup_classstructure_mixins
298 */
300#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
301 Q_GADGET
302#endif
303 public:
304 /** \brief class contructor */
306 virtual ~JKQTPXGraphErrors()=default;
307
308 /** \brief returns true, if the error plots use the given column */
309 virtual bool errorUsesColumn(int c) const ;
310
311 protected:
312 /** \brief draws the error indicators */
313 virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, const JKQTBasePlotter* parent, const JKQTPGraph* parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector<int> *dataorder=nullptr) const ;
314
315};
316
317
318
319/*! \brief This class is the base class for graphs that only display error indicators in y-direction
320 \ingroup jkqtplotter_basegraphserrors
321 \see JKQTPYGraphErrorData, JKQTPGraphErrorStyleMixin, \ref jkqtplotter_graphsgroup_classstructure_mixins
322 */
324#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
325 Q_GADGET
326#endif
327 public:
328 /** \brief class contructor */
330 virtual ~JKQTPYGraphErrors()=default;
331
332 /** \brief returns true, if the error plots use the given column */
333 virtual bool errorUsesColumn(int c) const ;
334
335 protected:
336 /** \brief draws the error indicators */
337 virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, const JKQTBasePlotter* parent, const JKQTPGraph* parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector<int> *dataorder=nullptr) const ;
338
339};
340
341
342
343
344
345/*! \brief This class is the base class for graphs that only display error indicators in x- and y-direction
346 \ingroup jkqtplotter_basegraphserrors
347 \see JKQTPXGraphErrorData, JKQTPYGraphErrorData, JKQTPGraphErrorStyleMixin, \ref jkqtplotter_graphsgroup_classstructure_mixins
348 */
350#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
351 Q_GADGET
352#endif
353 public:
354 /** \brief class contructor */
356 virtual ~JKQTPXYGraphErrors()=default;
357
358 /** \brief returns true, if the error plots use the given column */
359 virtual bool errorUsesColumn(int c) const ;
360
361 protected:
362 /** \brief draws the error indicators */
363 virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, const JKQTBasePlotter* parent, const JKQTPGraph* parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector<int> *dataorder=nullptr) const ;
364
365};
366
367
368
369
370
371
372
373
374
375#endif // JKQTPGRAPHSBASEERROR_H
represents a pen, when plotting in JKQTPlotter/JKQTBasePlotter
Definition jkqtpbaseplotter.h:764
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
This class manages data columns (with entries of type double ), used by JKQTPlotter/JKQTBasePlotter t...
Definition jkqtpdatastorage.h:282
this class extends the QPainter
Definition jkqtpenhancedpainter.h:33
This mix-in class assembles all styling properties applicable to error indicators.
Definition jkqtpgraphsbaseerrors.h:45
void setErrorFillTexture(const QImage &__value)
set the color of the error indicator filling and sets fill style to Qt::TexturePattern
QBrush m_errorFillBrush
fill brush for the error indicators
Definition jkqtpgraphsbaseerrors.h:165
void setErrorLineBrush(const QBrush &style)
sets the brush used to fill the line area of the error indicator (out)lines
void setErrorFillStyle(Qt::BrushStyle __value)
set the fill style of the error indicators
void setErrorFillBrush(const QBrush &b)
sets an error indicator fill brush (overwrites all internal properties!)
QColor getErrorFillColor() const
get the fill color of the error indicators
QBrush getErrorFillBrush(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent) const
constructs a QBrush from the error indicator fill styling properties
double m_errorBarCapSize
size of the error bar end markers [pt]
Definition jkqtpgraphsbaseerrors.h:171
QVector< qreal > getErrorLineDashPattern() const
gets the dash pattern for a custom dash style of the error indicator (out)lines
QColor getErrorLineColor() const
get the color of the error indicator (out)lines
double m_errorLineWidth
width of the error indicators' lines, given in pt
Definition jkqtpgraphsbaseerrors.h:161
const QGradient * getErrorFillGradient() const
get the gradient object of the error indicator filling
Qt::PenJoinStyle getErrorLineJoinStyle() const
returns the join style of the error indicator (out)lines
QPen m_errorLinePen
error indicator line pen
Definition jkqtpgraphsbaseerrors.h:159
QPixmap getErrorFillTexture() const
set the color of the error indicator filling
QBrush getErrorLineBrush() const
gets the brush used to fill the line area of the error indicator (out)lines
void setErrorLineStyle(Qt::PenStyle __value)
set the style of the error indicator (out)lines
void setErrorLineColor(const QColor &__value)
set the color of the error indicator (out)lines
JKQTPGraphErrorStyleMixin()
class contructor
Qt::PenStyle getErrorLineStyle() const
get the style of the error indicator (out)lines
double getErrorBarCapSize() const
size of the error bar end markers [pt]
void setErrorLineDashOffset(qreal offset)
sets the dash offset for a custom dash style of the error indicator (out)lines
virtual ~JKQTPGraphErrorStyleMixin()=default
void setErrorLineCapStyle(Qt::PenCapStyle style)
sets the cap style of the error indicator (out)lines
QPen getErrorLinePenForRects(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent) const
constructs a QPen from the error indicator line styling properties, suitable for drawing rectangles w...
void setErrorFillTransform(const QTransform &b)
sets an error indicator fill transformation
void setErrorLineJoinStyle(Qt::PenJoinStyle style)
sets the join style of the error indicator (out)lines
QColor m_errorFillColor
fill color for the error indicators
Definition jkqtpgraphsbaseerrors.h:167
void setErrorBarCapSize(double __value)
size of the error bar end markers [pt]
QPen getErrorLinePen(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent) const
constructs a QPen from the error indicator line styling properties
void initErrorStyle(JKQTBasePlotter *parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default)
initiaize the error indicator style (from the parent plotter)
double getErrorLineWidth() const
get the width [pt] of the error indicator (out)lines
void setErrorLineDashPattern(const QVector< qreal > &pattern)
sets the dash pattern for a custom dash style of the error indicator (out)lines
void setErrorLineWidth(double __value)
set the width [pt] of the error indicator (out)lines
void setErrorFillColor(const QColor &__value)
set the fill color of the error indicators
QImage getErrorFillTextureImage() const
set the color of the error indicator filling
virtual bool intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int index, QColor &errorLineColor, QColor &errorFillColor) const
this function can be used to set the color of the error indicators automatically
qreal getErrorLineDashOffset() const
returns the dash offset for a custom dash style of the error indicator (out)lines
void setErrorStyleFromPen(const JKQTBasePlotter::JKQTPPen &pen)
derive the properties of the error indicators from pen
void setErrorFillTexture(const QPixmap &__value)
set the color of the error indicator filling and sets fill style to Qt::TexturePattern
Qt::BrushStyle getErrorFillStyle() const
get the fill style of the error indicators
Qt::PenCapStyle getErrorLineCapStyle() const
gets the cap style of the error indicator (out)lines
void setErrorFillGradient(const QGradient &__value)
set the filling of the error indicators to a gradient and sets fill style to a gradient setting
void intPlotXYErrorIndicators(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int xErrorColumnLower=-1, int yErrorColumnLower=-1, bool xErrorSymmetric=true, bool yErrorSymmetric=true, double xrelshift=0, double yrelshift=0.0, const QVector< int > *dataorder=nullptr) const
draw error indicators with the parameters defined in this class. The position of the datapoints is gi...
void setErrorColorFromGraphColor(QColor graphColor)
derive the colors of the error indicators from a given color
this virtual base class of the (data-column based) graphs, which are part of a JKQTPlotter plot and w...
Definition jkqtpgraphsbase.h:429
This class adds data fields for error indicators in x direction.
Definition jkqtpgraphsbaseerrors.h:197
void setXErrorSymmetric(bool __value)
indicates whether the x-errors are symmetric (from one column only)
int xErrorColumn
the column that contains the error of the x-component of the datapoints
Definition jkqtpgraphsbaseerrors.h:226
JKQTPErrorPlotstyle getXErrorStyle() const
how to draw the errors (if available) of the x-value
void setXErrorColumn(int __value)
the column that contains the error of the x-component of the datapoints
JKQTPErrorPlotstyle xErrorStyle
how to draw the errors (if available) of the x-value
Definition jkqtpgraphsbaseerrors.h:232
bool getXErrorSymmetric() const
indicates whether the x-errors are symmetric (from one column only)
int xErrorColumnLower
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
Definition jkqtpgraphsbaseerrors.h:228
void setXErrorStyle(JKQTPErrorPlotstyle __value)
how to draw the errors (if available) of the x-value
virtual double getXErrorU(int i, const JKQTPDatastore *ds) const
returns the upper x-error for the i-th datapoint, read from datastore ds
virtual double getXErrorL(int i, const JKQTPDatastore *ds) const
returns the lower x-error for the i-th datapoint, read from datastore ds
bool xErrorSymmetric
indicates whether the x-errors are symmetric (from one column only)
Definition jkqtpgraphsbaseerrors.h:230
JKQTPXGraphErrorData()
class contructor
int getXErrorColumnLower() const
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
int getXErrorColumn() const
the column that contains the error of the x-component of the datapoints
void setXErrorColumnLower(int __value)
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
virtual ~JKQTPXGraphErrorData()=default
This class is the base class for graphs that only display error indicators in x-direction.
Definition jkqtpgraphsbaseerrors.h:299
virtual void plotErrorIndicators(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector< int > *dataorder=nullptr) const
draws the error indicators
virtual bool errorUsesColumn(int c) const
returns true, if the error plots use the given column
JKQTPXGraphErrors()
class contructor
virtual ~JKQTPXGraphErrors()=default
This class is the base class for graphs that only display error indicators in x- and y-direction.
Definition jkqtpgraphsbaseerrors.h:349
virtual ~JKQTPXYGraphErrors()=default
JKQTPXYGraphErrors()
class contructor
virtual bool errorUsesColumn(int c) const
returns true, if the error plots use the given column
virtual void plotErrorIndicators(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector< int > *dataorder=nullptr) const
draws the error indicators
This class adds data fields for error indicators in y direction.
Definition jkqtpgraphsbaseerrors.h:249
virtual ~JKQTPYGraphErrorData()=default
bool getYErrorSymmetric() const
indicates whether the x-errors are symmetric (from one column only)
void setYErrorColumn(int __value)
the column that contains the error of the x-component of the datapoints
JKQTPErrorPlotstyle yErrorStyle
how to draw the errors (if available) of the x-value
Definition jkqtpgraphsbaseerrors.h:284
void setYErrorStyle(JKQTPErrorPlotstyle __value)
how to draw the errors (if available) of the x-value
JKQTPErrorPlotstyle getYErrorStyle() const
how to draw the errors (if available) of the x-value
void setYErrorColumnLower(int __value)
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
int getYErrorColumn() const
the column that contains the error of the x-component of the datapoints
int yErrorColumn
the column that contains the error of the x-component of the datapoints
Definition jkqtpgraphsbaseerrors.h:278
int getYErrorColumnLower() const
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
void setYErrorSymmetric(bool __value)
indicates whether the x-errors are symmetric (from one column only)
bool yErrorSymmetric
indicates whether the x-errors are symmetric (from one column only)
Definition jkqtpgraphsbaseerrors.h:282
virtual double getYErrorU(int i, const JKQTPDatastore *ds) const
returns the upper y-error for the i-th datapoint, read from datastore ds
JKQTPYGraphErrorData()
class contructor
virtual double getYErrorL(int i, const JKQTPDatastore *ds) const
returns the lower y-error for the i-th datapoint, read from datastore ds
int yErrorColumnLower
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
Definition jkqtpgraphsbaseerrors.h:280
This class is the base class for graphs that only display error indicators in y-direction.
Definition jkqtpgraphsbaseerrors.h:323
JKQTPYGraphErrors()
class contructor
virtual bool errorUsesColumn(int c) const
returns true, if the error plots use the given column
virtual void plotErrorIndicators(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector< int > *dataorder=nullptr) const
draws the error indicators
virtual ~JKQTPYGraphErrors()=default
QFlags< JKQTPErrorPlotstyleElements > JKQTPErrorPlotstyle
specifies the plot styles for the error information, e.g. error bars, boxes, lines ....
Definition jkqtptools.h:728
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89
JKQTPPlotStyleType
used to specify teh type of graph when calling getPlotStyle()
Definition jkqtptools.h:68