2019-04-22 19:27:50 +08:00
/*
2024-02-06 21:50:49 +08:00
Copyright ( c ) 2008 - 2024 Jan W . Krieger ( < jan @ jkrieger . de > )
2019-04-22 19:27:50 +08:00
This software is free software : you can redistribute it and / or modify
it under the terms of the GNU Lesser General Public License ( LGPL ) as published by
the Free Software Foundation , either version 2.1 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU Lesser General Public License ( LGPL ) for more details .
You should have received a copy of the GNU Lesser General Public License ( LGPL )
along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
2022-08-26 04:41:41 +08:00
# ifndef jkqtpscatter_H
# define jkqtpscatter_H
2022-04-25 04:07:39 +08:00
2019-04-22 19:27:50 +08:00
# include <QString>
# include <QPainter>
# include <QPair>
# include <functional>
2019-05-30 04:40:02 +08:00
# include "jkqtplotter/jkqtptools.h"
2019-06-22 20:21:32 +08:00
# include "jkqtplotter/jkqtplotter_imexport.h"
2019-05-30 04:40:02 +08:00
# include "jkqtcommon/jkqtpdrawingtools.h"
2019-04-22 19:27:50 +08:00
# include "jkqtplotter/jkqtpgraphsbase.h"
2019-05-30 04:40:02 +08:00
# include "jkqtcommon/jkqtpenhancedpainter.h"
2019-04-22 19:27:50 +08:00
# include "jkqtplotter/jkqtpgraphsbaseerrors.h"
2019-06-20 22:06:31 +08:00
# include "jkqtplotter/graphs/jkqtprange.h"
2022-08-26 04:41:41 +08:00
# include "jkqtplotter/graphs/jkqtplines.h"
2019-04-22 19:27:50 +08:00
# include "jkqtplotter/jkqtpgraphsbasestylingmixins.h"
// forward declarations
class JKQTBasePlotter ;
class JKQTPlotter ;
class JKQTPCoordinateAxis ;
class JKQTPDatastore ;
2019-05-30 04:40:02 +08:00
//class JKQTPColorPaletteStyleAndToolsMixin;
2019-04-22 19:27:50 +08:00
2022-08-26 18:41:42 +08:00
/*! \brief This implements xy scatter plots. This also alows to draw symbols at the data points.
2022-10-23 03:07:14 +08:00
\ ingroup jkqtplotter_linesymbolgraphs_scatter
2019-04-22 19:27:50 +08:00
2022-08-29 04:48:14 +08:00
\ image html JKQTPXYScatterGraph . png
2019-04-22 19:27:50 +08:00
2022-08-26 18:41:42 +08:00
\ note This classes can ( and does by default ) apply a line - compression strategy that improves plotting speed
but reduces accuracy a bit . See JKQTPGraphLinesCompressionMixin for details .
\ see JKQTPXYScatterErrorGraph for a version with error indicators and JKQTPXYParametrizedScatterGraph for a more feature - rich version
that allows to also change the color / size of the symbols from data
*/
class JKQTPLOTTER_LIB_EXPORT JKQTPXYScatterGraph : public JKQTPXYGraph , public JKQTPGraphSymbolStyleMixin {
Q_OBJECT
public :
/** \brief class constructor */
explicit JKQTPXYScatterGraph ( JKQTBasePlotter * parent = nullptr ) ;
/** \brief class constructor */
JKQTPXYScatterGraph ( JKQTPlotter * parent ) ;
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
/** \brief plots a key marker inside the specified rectangle \a rect */
2023-12-19 05:24:59 +08:00
virtual void drawKeyMarker ( JKQTPEnhancedPainter & painter , const QRectF & rect ) override ;
2022-08-26 18:41:42 +08:00
/** \brief returns the color to be used for the key label */
virtual QColor getKeyLabelColor ( ) const override ;
/** \brief set color of line and symbol */
void setColor ( QColor c ) ;
protected :
} ;
/*! \brief This implements xy scatter plots with x and y error indicators.
2022-10-23 03:07:14 +08:00
\ ingroup jkqtplotter_linesymbolgraphs_scatter
2022-08-26 18:41:42 +08:00
2022-08-30 03:46:38 +08:00
\ image html JKQTPXYScatterErrorGraph . png
2022-08-26 18:41:42 +08:00
\ see JKQTPXYScatterGraph , JKQTPXYGraphErrors
*/
class JKQTPLOTTER_LIB_EXPORT JKQTPXYScatterErrorGraph : public JKQTPXYScatterGraph , public JKQTPXYGraphErrors {
Q_OBJECT
public :
/** \brief class constructor */
JKQTPXYScatterErrorGraph ( JKQTBasePlotter * parent = nullptr ) ;
/** \brief class constructor */
JKQTPXYScatterErrorGraph ( JKQTPlotter * parent ) ;
2024-02-05 05:06:09 +08:00
/** \copydoc JKQTPPlotElement::getXMinMax() */
2022-08-26 18:41:42 +08:00
virtual bool getXMinMax ( double & minx , double & maxx , double & smallestGreaterZero ) override ;
2024-02-05 05:06:09 +08:00
/** \copydoc JKQTPPlotElement::getYMinMax() */
2022-08-26 18:41:42 +08:00
virtual bool getYMinMax ( double & miny , double & maxy , double & smallestGreaterZero ) override ;
/** \copydoc JKQTPGraph::usesColumn() */
virtual bool usesColumn ( int c ) const override ;
protected :
/** \brief this function is used to plot error inidcators before plotting the graphs. */
virtual void drawErrorsBefore ( JKQTPEnhancedPainter & painter ) override ;
} ;
/*! \brief This implements xy scatter plots (like JKQTPXYScatterGraph), but the color and size of the symbols may be taken from a column.
2019-04-22 19:27:50 +08:00
\ ingroup jkqtplotter_linesymbolgraphs_param
set the properties sizeColumn and / or colorColumn to change the size and / or color of the symbols according to the values in the column .
2019-06-21 04:24:47 +08:00
\ image html paramscatterplot . png " Different Styles of Parametrized Scatter/Line Graphs "
2019-04-22 19:27:50 +08:00
2022-08-25 21:17:50 +08:00
\ note This classes is meant for cases where you want to change the color / size / . . . of single symbols , in dependence
2022-08-26 18:41:42 +08:00
of data . If you are looking for a simple scatter - plot without data - dependent properties , use JKQTPXYScatterGraph
2022-08-25 21:17:50 +08:00
instead , which is faster .
2019-04-22 19:27:50 +08:00
\ note For the size , line width and symbol type columns , you can also set a functor , which converts the column value ( optionally based
also on the x - and y - location of the data point ) into the local symbol size , symbol type or line width . Use the functions
setLinewidthColumnFunctor ( ) , setSymbolColumnFunctor ( ) and setSizeColumnFunctor ( ) to set these functors . This feature gives you
even more control over the modification of the plot elements . Initially all functors are set to default values , that do not add
any additional transformations .
\ image html JKQTPXYParametrizedScatterGraph_LinewidthFunctor . png
\ image html JKQTPXYParametrizedScatterGraph_SymbolFunctor . png
2022-08-25 21:17:50 +08:00
\ image html paramscatterplot_image_star . png " JKQTPXYParametrizedScatterGraph with symbols organized in a grid "
2019-04-22 19:27:50 +08:00
2019-06-13 16:27:06 +08:00
\ see JKQTPXYParametrizedErrorScatterGraph , \ ref JKQTPlotterParamScatter , \ ref JKQTPlotterParamScatterImage , \ ref JKQTPlotterParametricCurves
2019-04-22 19:27:50 +08:00
*/
2022-08-25 23:34:12 +08:00
class JKQTPLOTTER_LIB_EXPORT JKQTPXYParametrizedScatterGraph : public JKQTPXYGraph , public JKQTPGraphLineStyleMixin , public JKQTPGraphSymbolStyleMixin , public JKQTPColorPaletteStyleAndToolsMixin {
2019-04-22 19:27:50 +08:00
Q_OBJECT
public :
/** \brief functor, which converts the value of the symbol column (at a location x,y) into a JKQTPGraphSymbols */
typedef std : : function < JKQTPGraphSymbols ( double x , double y , double symcolumn ) > FunctorToSymbol ;
/** \brief functor, which converts the value of the line width column (at a location x,y) into a line width (in pt) */
typedef std : : function < double ( double x , double y , double widcolumn ) > FunctorToWidth ;
/** \brief functor, which converts the value of the line size column (at a location x,y) into a symbol size (in pt) */
typedef std : : function < double ( double x , double y , double sizecolumn ) > FunctorToSize ;
/** \brief class constructor */
JKQTPXYParametrizedScatterGraph ( JKQTBasePlotter * parent = nullptr ) ;
/** \brief class constructor */
JKQTPXYParametrizedScatterGraph ( JKQTPlotter * parent ) ;
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
/** \brief plots a key marker inside the specified rectangle \a rect */
2023-12-19 05:24:59 +08:00
virtual void drawKeyMarker ( JKQTPEnhancedPainter & painter , const QRectF & rect ) override ;
2019-04-22 19:27:50 +08:00
/** \brief returns the color to be used for the key label */
virtual QColor getKeyLabelColor ( ) const override ;
2020-09-21 19:47:54 +08:00
/** \copydoc sizeColumn */
2019-04-22 19:27:50 +08:00
void setSizeColumn ( int __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc sizeColumn */
2019-04-22 19:27:50 +08:00
void setSizeColumn ( size_t __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc sizeColumn */
2019-04-22 19:27:50 +08:00
int getSizeColumn ( ) const ;
/** \brief defines a functor, which converts a value from the sizeColumn into an actual symbol size in pt
*
* \ code
* graph6 - > setSizeColumnFunctor ( [ ] ( double x , double y , double w ) {
* return fabs ( sin ( w / 3.0 ) * 25.0 ) ;
* } ) ;
* \ endcode
*
* \ see setSizeColumnFunctor ( ) , clearSizeColumnFunctor ( ) and getSizeColumnFunctor ( )
*/
void setSizeColumnFunctor ( FunctorToSize ff ) ;
/** \brief defines a standard (1:1) functor, which converts a value from the sizeColumn into an actual symbol size in pt
* \ see setSizeColumnFunctor ( ) , clearSizeColumnFunctor ( ) and getSizeColumnFunctor ( )
*/
void clearSizeColumnFunctor ( ) ;
/** \brief returns the current functor, which converts a value from the sizeColumn into an actual symbol size in pt
* \ see setSizeColumnFunctor ( ) , clearSizeColumnFunctor ( ) and getSizeColumnFunctor ( )
*/
FunctorToSize getSizeColumnFunctor ( ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc colorColumn */
2019-04-22 19:27:50 +08:00
void setColorColumn ( int __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc colorColumn */
2019-04-22 19:27:50 +08:00
int getColorColumn ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc colorColumn */
2019-04-22 19:27:50 +08:00
void setColorColumn ( size_t __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc symbolColumn */
2019-04-22 19:27:50 +08:00
void setSymbolColumn ( int __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc symbolColumn */
2019-04-22 19:27:50 +08:00
int getSymbolColumn ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc symbolColumn */
2019-04-22 19:27:50 +08:00
void setSymbolColumn ( size_t __value ) ;
/** \brief defines a functor, which converts a value from the symbolColumn into an actual symbol type
*
* \ code
* graph1 - > setSymbolColumnFunctor ( [ ] ( double x , double y , double sym ) - > JKQTPGraphSymbols {
* if ( sym < Ndata / 2 ) {
* return JKQTPGraphSymbols : : JKQTPCircle ;
* } else if ( sym > Ndata / 2 ) {
* return JKQTPGraphSymbols : : JKQTPFilledCircle ;
* } else {
* return JKQTPGraphSymbols : : JKQTPPlus ;
* }
* } ) ;
* \ endcode
*
* \ image html JKQTPXYParametrizedScatterGraph_SymbolFunctor . png
* \ see setSymbolColumnFunctor ( ) , clearSymbolColumnFunctor ( ) and getSymbolColumnFunctor ( ) , setMappedSymbolColumnFunctor ( ) , \ ref JKQTPlotterParamScatter
*/
void setSymbolColumnFunctor ( FunctorToSymbol ff ) ;
/** \brief defines a standard (1:1) functor, which converts a value from the symbolColumn into an actual symbol type
* \ image html JKQTPXYParametrizedScatterGraph_SymbolFunctor . png
* \ see setSymbolColumnFunctor ( ) , clearSymbolColumnFunctor ( ) and getSymbolColumnFunctor ( ) , setMappedSymbolColumnFunctor ( ) , \ ref JKQTPlotterParamScatter
*/
void clearSymbolColumnFunctor ( ) ;
/** \brief defines a special functor, which converts a value from the symbolColumn into an actual symbol type,
* where the relation between value and symbol is defined by a map double - > symbol
*
* This generates a special functor , which will convert values to symbols by using the values from the given map
* and these rules :
* - everything below the smallest value is mapped to the smallest value ' s symbol
* - everything abive the largest value is mapped to the largest value ' s symbol
* - everything in between is mapped to the symbol of the value closest to the actual value
* .
*
* \ code
* QMap < double , JKQTPGraphSymbols > mapped ;
* mapped [ 0 ] = JKQTPGraphSymbols : : JKQTPCircle ;
* mapped [ 5 ] = JKQTPGraphSymbols : : JKQTPFilledCircle ;
* mapped [ 10 ] = JKQTPGraphSymbols : : JKQTPPlus ;
* graph1 - > setMappedSymbolColumnFunctor ( mapped ) ;
* \ endcode
*
* \ see setSymbolColumnFunctor ( ) , clearSymbolColumnFunctor ( ) and getSymbolColumnFunctor ( ) , setMappedSymbolColumnFunctor ( ) , \ ref JKQTPlotterParamScatter
*/
void setMappedSymbolColumnFunctor ( const QMap < double , JKQTPGraphSymbols > & symmap ) ;
/** \brief returns the current functor, which converts a value from the symbolColumn into an actual symbol type
* \ see setSymbolColumnFunctor ( ) , clearSymbolColumnFunctor ( ) and getSymbolColumnFunctor ( ) , setMappedSymbolColumnFunctor ( ) , \ ref JKQTPlotterParamScatter
*/
FunctorToSymbol getSymbolColumnFunctor ( ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc linewidthColumn */
2019-04-22 19:27:50 +08:00
void setLinewidthColumn ( int __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc linewidthColumn */
2019-04-22 19:27:50 +08:00
int getLinewidthColumn ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc linewidthColumn */
2019-04-22 19:27:50 +08:00
void setLinewidthColumn ( size_t __value ) ;
/** \brief defines a functor, which converts a value from the symbolColumn into an actual line width in pt
*
* \ code
* graph6 - > setLinewidthColumnFunctor ( [ ] ( double x , double y , double w ) {
* return fabs ( sin ( w / 3.0 ) * 25.0 ) ;
* } ) ;
* \ endcode
*
* \ image html JKQTPXYParametrizedScatterGraph_LinewidthFunctor . png
*
* \ see setLinewidthColumnFunctor ( ) , clearLinewidthColumnFunctor ( ) and getLinewidthColumnFunctor ( ) , \ ref JKQTPlotterParamScatter
*/
void setLinewidthColumnFunctor ( FunctorToWidth ff ) ;
/** \brief defines a standard (1:1) functor, which converts a value from the symbolColumn into an actual line width in pt
*
* \ image html JKQTPXYParametrizedScatterGraph_LinewidthFunctor . png
*
* \ see setLinewidthColumnFunctor ( ) , clearLinewidthColumnFunctor ( ) and getLinewidthColumnFunctor ( ) , \ ref JKQTPlotterParamScatter
*/
void clearLinewidthColumnFunctor ( ) ;
/** \brief returns the current functor, which converts a value from the symbolColumn into an actual line width in pt
* \ see setLinewidthColumnFunctor ( ) , clearLinewidthColumnFunctor ( ) and getLinewidthColumnFunctor ( ) , \ ref JKQTPlotterParamScatter
*/
FunctorToWidth getLinewidthColumnFunctor ( ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc colorColumnContainsRGB */
2019-04-22 19:27:50 +08:00
void setColorColumnContainsRGB ( bool __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc colorColumnContainsRGB */
2019-04-22 19:27:50 +08:00
bool getColorColumnContainsRGB ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc gridModeForSymbolSize */
2019-04-22 19:27:50 +08:00
void setGridModeForSymbolSize ( bool __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc gridModeForSymbolSize */
2019-04-22 19:27:50 +08:00
bool getGridModeForSymbolSize ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc gridDeltaX */
2019-04-22 19:27:50 +08:00
void setGridDeltaX ( double __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc gridDeltaX */
2019-04-22 19:27:50 +08:00
double getGridDeltaX ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc gridDeltaY */
2019-04-22 19:27:50 +08:00
void setGridDeltaY ( double __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc gridDeltaY */
2019-04-22 19:27:50 +08:00
double getGridDeltaY ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc gridSymbolFractionSize */
2019-04-22 19:27:50 +08:00
void setGridSymbolFractionSize ( double __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc gridSymbolFractionSize */
2019-04-22 19:27:50 +08:00
double getGridSymbolFractionSize ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc symbolFillDerivationMode */
2019-04-22 19:27:50 +08:00
JKQTPColorDerivationMode getSymbolFillDerivationMode ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc symbolFillDerivationMode */
2019-04-22 19:27:50 +08:00
void setSymbolFillDerivationMode ( JKQTPColorDerivationMode m ) ;
/** \copydoc JKQTPGraph::setParent() */
virtual void setParent ( JKQTBasePlotter * parent ) override ;
/** \copydoc JKQTPGraph::getOutsideSize() */
virtual void getOutsideSize ( JKQTPEnhancedPainter & painter , int & leftSpace , int & rightSpace , int & topSpace , int & bottomSpace ) override ;
/** \copydoc JKQTPGraph::drawOutside() */
virtual void drawOutside ( JKQTPEnhancedPainter & painter , QRect leftSpace , QRect rightSpace , QRect topSpace , QRect bottomSpace ) override ;
/** \brief determine min/max data value of the image */
virtual void cbGetDataMinMax ( double & imin , double & imax ) override ;
/** \copydoc JKQTPGraph::usesColumn() */
virtual bool usesColumn ( int c ) const override ;
2022-08-25 23:34:12 +08:00
/** \copydoc drawLine */
void setDrawLine ( bool __value ) ;
/** \copydoc drawLine */
bool getDrawLine ( ) const ;
2022-09-08 03:12:26 +08:00
/** \copydoc drawLineInForeground */
void setDrawLineInForeground ( bool __value ) ;
/** \copydoc drawLineInForeground */
bool getDrawLineInForeground ( ) const ;
2022-08-25 23:34:12 +08:00
/** \brief set color of line and symbol */
void setColor ( QColor c ) ;
2019-04-22 19:27:50 +08:00
protected :
2022-08-25 23:34:12 +08:00
/** \brief indicates whether to draw a line or not */
bool drawLine ;
2022-09-08 03:12:26 +08:00
/** \brief indicates whether to draw the line behind or above the symbols */
bool drawLineInForeground ;
2019-04-22 19:27:50 +08:00
/** \brief this column contains the symbol size in pt */
int sizeColumn ;
/** \brief this column contains the symbol color */
int colorColumn ;
/** \brief this column contains the symbol type */
int symbolColumn ;
/** \brief this column contains the line width */
int linewidthColumn ;
/** \brief if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ordered in a grid. It the uses the given griDeltaX and gridDeltaY to calculate the symbol size, so they fill the available space to a fraction gridSymbolFractionSize. */
bool gridModeForSymbolSize ;
/** \brief if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ordered in a grid. It the uses the given griDeltaX and gridDeltaY to calculate the symbol size, so they fill the available space to a fraction gridSymbolFractionSize. */
double gridDeltaX ;
/** \brief if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ordered in a grid. It the uses the given griDeltaX and gridDeltaY to calculate the symbol size, so they fill the available space to a fraction gridSymbolFractionSize. */
double gridDeltaY ;
/** \brief if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ordered in a grid. It the uses the given griDeltaX and gridDeltaY to calculate the symbol size, so they fill the available space to a fraction gridSymbolFractionSize. */
double gridSymbolFractionSize ;
/** \brief if this is true, the value in the colorColumn is converted to an integer, representing a color in ARGB format (as in QRgb) */
bool colorColumnContainsRGB ;
/** \brief retrns the local line width for the i-th datapoint */
double getLocalLineWidth ( int i ) ;
/** \brief retrns the local symbol size for the i-th datapoint */
double getLocalSymbolSize ( int i ) ;
/** \brief retrns the local color for the i-th datapoint */
QColor getLocalColor ( int i ) const ;
/** \brief retrns the local symbol type for the i-th datapoint */
JKQTPGraphSymbols getLocalSymbolType ( int i ) ;
/** \brief internally used to store the range of the color column */
double intColMin ;
/** \brief internally used to store the range of the color column */
double intColMax ;
/** \brief specifies how to derive the symbol fill color from the symbol/line color */
JKQTPColorDerivationMode symbolFillDerivationMode ;
/** \brief functor, which converts the value of the symbol column (at a location x,y) into a JKQTPGraphSymbols */
FunctorToSymbol m_toSymbolFunctor ;
/** \brief functor, which converts the value of the line width column (at a location x,y) into a line width (in pt) */
FunctorToWidth m_toWidthPtFunctor ;
/** \brief functor, which converts the value of the line size column (at a location x,y) into a symbol size (in pt) */
FunctorToSize m_toSizePtFunctor ;
/** \brief helper class for setMappedSymbolColumnFunctor() */
struct MappedSymbolFunctor {
QMap < double , JKQTPGraphSymbols > mapping ;
JKQTPXYParametrizedScatterGraph * parent ;
MappedSymbolFunctor ( const QMap < double , JKQTPGraphSymbols > & mapping_ , JKQTPXYParametrizedScatterGraph * graph ) ;
JKQTPGraphSymbols operator ( ) ( double x , double y , double symcolumn ) const ;
} ;
2022-09-08 03:12:26 +08:00
/** \brief helper struct, which describes a single symbol */
struct SymbolDescription {
double x ;
double y ;
JKQTPGraphSymbols type ;
double size ;
QColor color ;
QColor fillColor ;
} ;
2019-04-22 19:27:50 +08:00
} ;
2022-08-26 18:41:42 +08:00
/*! \brief This implements xy scatter plots (like JKQTPXYScatterGraph), but the color and size of the symbols may be taken from a column. with errorbars
2019-04-22 19:27:50 +08:00
\ ingroup jkqtplotter_linesymbolgraphs_param
set the properties sizeColumn and / or colorColumn to change the size and / or color of the symbols according to the values in the column .
\ image html screen_parmetrizedplots_datatable . png
2019-06-13 16:27:06 +08:00
\ see JKQTPXYParametrizedScatterGraph , \ ref JKQTPlotterParamScatter , jkqtpstatAddXErrorParametrizedScatterGraph ( ) , jkqtpstatAddYErrorParametrizedScatterGraph ( )
2019-04-22 19:27:50 +08:00
*/
2019-06-22 20:21:32 +08:00
class JKQTPLOTTER_LIB_EXPORT JKQTPXYParametrizedErrorScatterGraph : public JKQTPXYParametrizedScatterGraph , public JKQTPXYGraphErrors {
2019-04-22 19:27:50 +08:00
Q_OBJECT
public :
JKQTPXYParametrizedErrorScatterGraph ( JKQTBasePlotter * parent = nullptr ) ;
JKQTPXYParametrizedErrorScatterGraph ( JKQTPlotter * parent ) ;
2024-02-05 05:06:09 +08:00
/** \copydoc JKQTPPlotElement::getXMinMax() */
2019-04-22 19:27:50 +08:00
virtual bool getXMinMax ( double & minx , double & maxx , double & smallestGreaterZero ) override ;
2024-02-05 05:06:09 +08:00
/** \copydoc JKQTPPlotElement::getYMinMax() */
2019-04-22 19:27:50 +08:00
virtual bool getYMinMax ( double & miny , double & maxy , double & smallestGreaterZero ) override ;
/** \copydoc JKQTPGraph::usesColumn() */
virtual bool usesColumn ( int c ) const override ;
protected :
/** \brief this function is used to plot error inidcators before plotting the graphs. */
virtual void drawErrorsBefore ( JKQTPEnhancedPainter & painter ) override ;
/** \brief this function can be used to set the color of the error indicators automatically
*
* return \ c true and the colors to use , if applicable , the default implementation returns false */
2020-09-19 04:03:12 +08:00
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 override ;
2019-04-22 19:27:50 +08:00
} ;
2022-08-26 04:41:41 +08:00
# endif // jkqtpscatter_H