2019-01-10 04:23:24 +08:00
/*
2022-07-19 19:40:43 +08:00
Copyright ( c ) 2008 - 2022 Jan W . Krieger ( < jan @ jkrieger . de > )
2019-01-10 04:23:24 +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
2019-02-08 00:24:46 +08:00
the Free Software Foundation , either version 2.1 of the License , or
2019-01-10 04:23:24 +08:00
( 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-04-25 04:07:39 +08:00
# ifndef jkqtpgraphsevaluatedfunction_H
# define jkqtpgraphsevaluatedfunction_H
2019-01-10 04:23:24 +08:00
# include <QString>
# include <QPainter>
# include <QPair>
2019-06-20 22:06:31 +08:00
# include "jkqtplotter/graphs/jkqtpscatter.h"
2019-04-22 19:27:50 +08:00
# include "jkqtplotter/jkqtpgraphsbasestylingmixins.h"
2019-06-22 20:21:32 +08:00
# include "jkqtplotter/jkqtplotter_imexport.h"
2020-09-05 18:44:02 +08:00
# include "jkqtcommon/jkqtpgeometrytools.h"
2020-09-05 19:14:46 +08:00
# include "jkqtplotter/graphs/jkqtpevaluatedfunctionbase.h"
2019-01-10 04:23:24 +08:00
# include <functional>
2020-09-08 02:57:25 +08:00
/** \brief This class extends JKQTPEvaluatedFunctionWithErrorsGraphBase with functions to draw the graphs and
* set the drawing style
* \ ingroup jkqtplotter_functiongraphs
*
* \ note Since this class is meant as a base for both f ( x ) - and f ( y ) - functions , it cannot
* implememt JKQTPGraph : : draw ( ) . Therefore it provides two implementations drawXGraph ( )
* and drawYGraph ( ) and the user has to decide in the concrete graph class , which one to call
* ( or whether to do the drawing completely different ) .
*
* \ see e . g . JKQTPXFunctionLineGraph for a concrete implementation
*/
2020-09-19 20:55:46 +08:00
class JKQTPLOTTER_LIB_EXPORT JKQTPEvaluatedFunctionWithErrorsGraphDrawingBase : public JKQTPEvaluatedFunctionWithErrorsGraphBase , public JKQTPGraphLineAndFillStyleMixin {
2020-09-08 02:57:25 +08:00
Q_OBJECT
public :
/** \brief class constructor */
JKQTPEvaluatedFunctionWithErrorsGraphDrawingBase ( JKQTBasePlotter * parent = nullptr ) ;
/** \brief class constructor */
JKQTPEvaluatedFunctionWithErrorsGraphDrawingBase ( JKQTPlotter * parent ) ;
/** \brief class destructor */
virtual ~ JKQTPEvaluatedFunctionWithErrorsGraphDrawingBase ( ) 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 ;
2020-09-08 02:57:25 +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 drawErrorPolygons */
2020-09-08 02:57:25 +08:00
bool getDrawErrorPolygons ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc drawErrorLines */
2020-09-08 02:57:25 +08:00
bool getDrawErrorLines ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorColor */
2020-09-08 02:57:25 +08:00
virtual QColor getErrorLineColor ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorFillColor */
2020-09-08 02:57:25 +08:00
virtual QColor getErrorFillColor ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorFillStyle */
2020-09-08 02:57:25 +08:00
virtual Qt : : BrushStyle getErrorFillStyle ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorStyle */
2020-09-08 02:57:25 +08:00
virtual Qt : : PenStyle getErrorLineStyle ( ) const ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorLineWidth */
2020-09-08 02:57:25 +08:00
virtual double getErrorLineWidth ( ) const ;
2023-07-22 20:26:02 +08:00
public Q_SLOTS :
2020-09-21 19:47:54 +08:00
/** \brief set color, fill color and error color at the same time */
2020-09-08 02:57:25 +08:00
void setColor ( QColor c ) ;
2020-09-19 20:55:46 +08:00
2020-09-21 19:47:54 +08:00
/** \copydoc drawErrorPolygons */
2020-09-08 02:57:25 +08:00
void setDrawErrorPolygons ( bool __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc drawErrorLines */
2020-09-08 02:57:25 +08:00
void setDrawErrorLines ( bool __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorColor */
2020-09-08 02:57:25 +08:00
virtual void setErrorLineColor ( const QColor & __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorFillColor */
2020-09-08 02:57:25 +08:00
virtual void setErrorFillColor ( const QColor & __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorFillStyle */
2020-09-08 02:57:25 +08:00
virtual void setErrorFillStyle ( Qt : : BrushStyle __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorStyle */
2020-09-08 02:57:25 +08:00
virtual void setErrorLineStyle ( Qt : : PenStyle __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorLineWidth */
2020-09-08 02:57:25 +08:00
virtual void setErrorLineWidth ( double __value ) ;
protected :
/** \brief plots the graph to the plotter object specified as parent */
void drawXGraph ( JKQTPEnhancedPainter & painter ) ;
/** \brief plots the graph to the plotter object specified as parent */
void drawYGraph ( JKQTPEnhancedPainter & painter ) ;
/** \brief indicates whether an error polygon should be drawn */
bool drawErrorPolygons ;
/** \brief indicates whether error lines should be drawn */
bool drawErrorLines ;
/** \brief color of the error graph */
QColor errorColor ;
/** \brief color of the error graph fill */
QColor errorFillColor ;
/** \brief linestyle of the error graph lines */
Qt : : PenStyle errorStyle ;
/** \brief width (pixels) of the error graph */
double errorLineWidth ;
/** \brief fill style, if the error curve should be filled */
Qt : : BrushStyle errorFillStyle ;
QBrush getErrorBrush ( JKQTPEnhancedPainter & painter ) const ;
QPen getErrorLinePen ( JKQTPEnhancedPainter & painter ) const ;
} ;
2019-01-10 04:23:24 +08:00
2020-09-05 05:41:23 +08:00
/*! \brief type of functions that may be plotted by JKQTPXFunctionLineGraph and JKQTPYFunctionLineGraph
2019-01-19 16:40:52 +08:00
\ ingroup jkqtplotter_functiongraphs
2019-01-10 04:23:24 +08:00
2019-01-20 17:49:29 +08:00
This is the type of functions \ f $ y = f ( x , \ vec { p } ) \ f $ that may be plottet by JKQTPXFunctionLineGraph
and JKQTPYFunctionLineGraph . It is possible to supply parameters \ f $ \ vec { p } \ f $ to the function that
2019-01-10 04:23:24 +08:00
influence its result . Parameters are given as a pointer to some memory location . The function has to
know on its own how to interpret these .
*/
2020-09-05 19:47:46 +08:00
typedef std : : function < double ( double , const QVector < double > & ) > jkqtpPlotFunctionType ;
2019-01-10 04:23:24 +08:00
2020-09-05 05:41:23 +08:00
/*! \brief simplified type of functions (without parameters) that may be plotted by JKQTPXFunctionLineGraph and JKQTPYFunctionLineGraph
2019-01-19 16:40:52 +08:00
\ ingroup jkqtplotter_functiongraphs
2019-01-10 04:23:24 +08:00
2019-01-20 17:49:29 +08:00
This is the type of functions \ f $ y = f ( x ) \ f $ that may be plottet by JKQTPXFunctionLineGraph
and JKQTPYFunctionLineGraph .
2019-01-10 04:23:24 +08:00
*/
typedef std : : function < double ( double ) > jkqtpSimplePlotFunctionType ;
2020-09-08 02:57:25 +08:00
/** \brief extends JKQTPEvaluatedFunctionWithErrorsGraphDrawingBase with the capabilities to define functions from C++-functors
* of type jkqtpSimplePlotFunctionType or jkqtpPlotFunctionType
* \ ingroup jkqtplotter_functiongraphs
*
* \ see JKQTPXFunctionLineGraph and JKQTPYFunctionLineGraph for a concrete implementation
2019-01-10 04:23:24 +08:00
*/
2020-09-08 02:57:25 +08:00
class JKQTPLOTTER_LIB_EXPORT JKQTPFunctorLineGraphBase : public JKQTPEvaluatedFunctionWithErrorsGraphDrawingBase {
2019-01-10 04:23:24 +08:00
Q_OBJECT
public :
enum SpecialFunction {
Polynomial , /*!< \brief a polynomial \f$ f(x)=p_0+p_1x+p_2x^2+p_3x^3+... \f$ The parameters \a params have to be point to a QVector<double> and contain the parameters \f$ p_0, p_1, ... \f$ */
Line = Polynomial , /*!< \brief a polynomial \f$ f(x)=p_0+p_1x \f$ The parameters \a params have to be point to a QVector<double> and contain the parameters \f$ p_0, p_1, ... \f$ */
Exponential , /*!< \brief an exponential function \f$ f(x)=p_0+p_1\cdot\exp(x/p_2) \f$ or \f$ f(x)=p_0\cdot\exp(x/p_1) \f$ (depending on the number of parameters). The parameters \a params have to be point to a QVector<double> and contain the parameters \f$ p_0, p_1, ... \f$ */
PowerLaw , /*!< \brief an exponential function \f$ f(x)=p_0+p_1\cdot x^{p_3} \f$ or \f$ f(x)=p_0\cdot x^{p_1} \f$ or \f$ f(x)= x^{p_0} \f$ (depending on the number of parameters) The parameters \a params have to be point to a QVector<double> and contain the parameters \f$ p_0, p_1, ... \f$ */
} ;
/** \brief class constructor */
2020-09-08 02:57:25 +08:00
JKQTPFunctorLineGraphBase ( JKQTBasePlotter * parent = nullptr ) ;
2019-01-10 04:23:24 +08:00
/** \brief class constructor */
2020-09-08 02:57:25 +08:00
JKQTPFunctorLineGraphBase ( JKQTPlotter * parent ) ;
2019-05-30 04:40:02 +08:00
/** \brief class constructor */
2020-09-08 02:57:25 +08:00
JKQTPFunctorLineGraphBase ( const jkqtpSimplePlotFunctionType & f , const QString & title , JKQTBasePlotter * parent = nullptr ) ;
2019-05-30 04:40:02 +08:00
/** \brief class constructor */
2020-09-08 02:57:25 +08:00
JKQTPFunctorLineGraphBase ( const jkqtpSimplePlotFunctionType & f , const QString & title , JKQTPlotter * parent ) ;
2019-05-30 04:40:02 +08:00
/** \brief class constructor */
2020-09-08 02:57:25 +08:00
JKQTPFunctorLineGraphBase ( jkqtpSimplePlotFunctionType & & f , const QString & title , JKQTBasePlotter * parent = nullptr ) ;
2019-05-30 04:40:02 +08:00
/** \brief class constructor */
2020-09-08 02:57:25 +08:00
JKQTPFunctorLineGraphBase ( jkqtpSimplePlotFunctionType & & f , const QString & title , JKQTPlotter * parent ) ;
2020-09-05 05:41:23 +08:00
/** \brief class constructor */
2020-09-08 02:57:25 +08:00
JKQTPFunctorLineGraphBase ( SpecialFunction type , const QVector < double > & params , const QString & title , JKQTBasePlotter * parent ) ;
2020-09-05 05:41:23 +08:00
/** \brief class constructor */
2020-09-08 02:57:25 +08:00
JKQTPFunctorLineGraphBase ( SpecialFunction type , const QVector < double > & params , const QString & title , JKQTPlotter * parent ) ;
2019-01-10 04:23:24 +08:00
/** \brief class destructor */
2020-09-08 02:57:25 +08:00
virtual ~ JKQTPFunctorLineGraphBase ( ) override ;
2019-01-10 04:23:24 +08:00
2019-05-30 17:19:56 +08:00
/** \brief sets a functor to be plotted
2019-01-10 04:23:24 +08:00
*
2019-05-30 17:19:56 +08:00
* \ see plotFunction
*/
2019-04-22 19:27:50 +08:00
virtual void setPlotFunctionFunctor ( jkqtpPlotFunctionType & & __value ) ;
2019-05-30 17:19:56 +08:00
/** \brief sets a functor to be plotted
2019-01-10 04:23:24 +08:00
*
2019-05-30 17:19:56 +08:00
* \ see plotFunction
*/
2019-04-22 19:27:50 +08:00
virtual void setPlotFunctionFunctor ( const jkqtpPlotFunctionType & __value ) ;
2019-05-30 17:19:56 +08:00
/** \brief sets a functor to be plotted
2019-01-10 04:23:24 +08:00
*
2019-05-30 17:19:56 +08:00
* \ see simplePlotFunction
*/
2019-04-22 19:27:50 +08:00
virtual void setPlotFunctionFunctor ( jkqtpSimplePlotFunctionType & & __value ) ;
2019-05-30 17:19:56 +08:00
/** \brief sets a functor to be plotted
2019-01-10 04:23:24 +08:00
*
2019-05-30 17:19:56 +08:00
* \ see simplePlotFunction
*/
2019-04-22 19:27:50 +08:00
virtual void setPlotFunctionFunctor ( const jkqtpSimplePlotFunctionType & __value ) ;
2020-09-08 02:57:25 +08:00
/*! \copydoc plotFunction
*
* \ see isSimplePlotFunction ( ) */ \
2019-04-22 19:27:50 +08:00
virtual jkqtpPlotFunctionType getPlotFunctionFunctor ( ) const ;
2020-09-08 02:57:25 +08:00
/*! \copydoc simplePlotFunction
*
* \ see isSimplePlotFunction ( ) */ \
2019-01-26 20:00:40 +08:00
virtual jkqtpSimplePlotFunctionType getSimplePlotFunction ( ) const ;
2019-01-10 04:23:24 +08:00
2020-09-08 02:57:25 +08:00
/** \brief returns whether the plot function was defined as a jkqtpSimpleParametricCurveFunctionType (\c true ) or
* a jkqtpParametricCurveFunctionType ( \ c false ) */
bool isSimplePlotFunction ( ) const ;
2019-01-10 04:23:24 +08:00
2020-09-05 19:14:46 +08:00
2019-05-30 17:19:56 +08:00
/** \brief sets a functor to be used for calculating errors
2019-01-10 04:23:24 +08:00
*
2019-05-30 17:19:56 +08:00
* \ see errorPlotFunction
*/
2019-01-26 20:00:40 +08:00
virtual void setErrorPlotFunction ( jkqtpPlotFunctionType & & __value ) ;
2019-05-30 17:19:56 +08:00
/** \brief sets a functor to be used for calculating errors
2019-01-10 04:23:24 +08:00
*
2019-05-30 17:19:56 +08:00
* \ see errorPlotFunction
*/
2019-01-26 20:00:40 +08:00
virtual void setErrorPlotFunction ( const jkqtpPlotFunctionType & __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorPlotFunction */ \
2019-01-26 20:00:40 +08:00
virtual jkqtpPlotFunctionType getErrorPlotFunction ( ) const ;
2019-05-30 17:19:56 +08:00
/** \brief sets a functor to be used for calculating errors
2019-01-10 04:23:24 +08:00
*
2019-05-30 17:19:56 +08:00
* \ see errorSimplePlotFunction
*/
2019-01-26 20:00:40 +08:00
virtual void setErrorPlotFunction ( jkqtpSimplePlotFunctionType & & __value ) ;
2019-05-30 17:19:56 +08:00
/** \brief sets a functor to be used for calculating errors
2019-01-10 04:23:24 +08:00
*
2019-05-30 17:19:56 +08:00
* \ see errorSimplePlotFunction
*/
2019-01-26 20:00:40 +08:00
virtual void setErrorPlotFunction ( const jkqtpSimplePlotFunctionType & __value ) ;
2020-09-21 19:47:54 +08:00
/** \copydoc errorSimplePlotFunction */ \
2019-01-26 20:00:40 +08:00
virtual jkqtpSimplePlotFunctionType getErrorSimplePlotFunction ( ) const ;
2019-01-10 04:23:24 +08:00
/** \brief sets function to the given special function */
void setSpecialFunction ( SpecialFunction function ) ;
protected :
/** \brief the function to be plotted */
jkqtpPlotFunctionType plotFunction ;
/** \brief a simple function to be plotted, simplified form without parameters */
jkqtpSimplePlotFunctionType simplePlotFunction ;
2020-09-05 19:14:46 +08:00
2019-01-10 04:23:24 +08:00
/** \brief this function calculates the error at a given position */
jkqtpPlotFunctionType errorPlotFunction ;
/** \brief this function calculates the error at a given position, simplified form without parameters */
jkqtpSimplePlotFunctionType errorSimplePlotFunction ;
2020-09-08 02:57:25 +08:00
} ;
2019-04-22 19:27:50 +08:00
2020-09-08 02:57:25 +08:00
/*! \brief This implements line plots where the data is taken from a user supplied function \f$ y=f(x) \f$
\ ingroup jkqtplotter_functiongraphs
2019-01-10 04:23:24 +08:00
2020-09-08 02:57:25 +08:00
This class uses the intelligent plotting algorithm for functions , implemented in JKQTPAdaptiveFunctionGraphEvaluator .
The following image shows some example graphs :
\ image html plot_functionplots . png
2023-08-14 19:51:18 +08:00
\ note Auto - scaling of the plot is deactivated ( by overwriting getXMinMax ( ) and getYMinMax ( ) to return \ c false ) , as it depends on the axes ( hen - egg - problem ! )
Set the plot - ranges by hand ! ! !
2020-09-08 02:57:25 +08:00
\ see \ ref JKQTPlotterFunctionPlots , JKQTPAdaptiveFunctionGraphEvaluator , JKQTPYFunctionLineGraph , JKQTPXYFunctionLineGraph , jkqtpstatAddPolyFit ( ) , jkqtpstatAddWeightedRegression ( ) , jkqtpstatAddRobustIRLSRegression ( ) , jkqtpstatAddRegression ( ) , jkqtpstatAddLinearWeightedRegression ( ) , jkqtpstatAddRobustIRLSLinearRegression ( ) , jkqtpstatAddLinearRegression ( )
*/
class JKQTPLOTTER_LIB_EXPORT JKQTPXFunctionLineGraph : public JKQTPFunctorLineGraphBase {
Q_OBJECT
public :
/** \brief class constructor */
JKQTPXFunctionLineGraph ( JKQTBasePlotter * parent = nullptr ) ;
/** \brief class constructor */
JKQTPXFunctionLineGraph ( JKQTPlotter * parent ) ;
/** \brief class constructor */
JKQTPXFunctionLineGraph ( const jkqtpSimplePlotFunctionType & f , const QString & title , JKQTBasePlotter * parent = nullptr ) ;
/** \brief class constructor */
JKQTPXFunctionLineGraph ( const jkqtpSimplePlotFunctionType & f , const QString & title , JKQTPlotter * parent ) ;
/** \brief class constructor */
JKQTPXFunctionLineGraph ( jkqtpSimplePlotFunctionType & & f , const QString & title , JKQTBasePlotter * parent = nullptr ) ;
/** \brief class constructor */
JKQTPXFunctionLineGraph ( jkqtpSimplePlotFunctionType & & f , const QString & title , JKQTPlotter * parent ) ;
/** \brief class constructor */
JKQTPXFunctionLineGraph ( SpecialFunction type , const QVector < double > & params , const QString & title , JKQTBasePlotter * parent ) ;
/** \brief class constructor */
JKQTPXFunctionLineGraph ( SpecialFunction type , const QVector < double > & params , const QString & title , JKQTPlotter * parent ) ;
/** \brief class destructor */
virtual ~ JKQTPXFunctionLineGraph ( ) override ;
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
protected :
/** \copydoc JKQTPEvaluatedFunctionGraphBase::buildPlotFunctorSpec() */
virtual PlotFunctorSpec buildPlotFunctorSpec ( ) override ;
/** \copydoc JKQTPEvaluatedFunctionWithErrorsGraphBase::buildPlotFunctorSpec() */
virtual std : : function < QPointF ( double ) > buildErrorFunctorSpec ( ) override ;
2019-01-10 04:23:24 +08:00
2023-08-14 19:51:18 +08:00
/** \brief get the maximum and minimum x-value of the graph
*
* This functions returns 0 for both parameters , so that the plotter uses the predefined
* min and max values .
*/
virtual bool getXMinMax ( double & minx , double & maxx , double & smallestGreaterZero ) override ;
/** \brief get the maximum and minimum y-value of the graph
*/
virtual bool getYMinMax ( double & miny , double & maxy , double & smallestGreaterZero ) override ;
2019-01-10 04:23:24 +08:00
} ;
/*! \brief This implements line plots where the data is taken from a user supplied function \f$ x=f(y) \f$
2019-01-19 16:40:52 +08:00
\ ingroup jkqtplotter_functiongraphs
2019-01-10 04:23:24 +08:00
2020-09-05 05:41:23 +08:00
The following image shows some example graphs :
\ image html functionplot_fy . png
2023-08-14 19:51:18 +08:00
\ note Auto - scaling of the plot is deactivated ( by overwriting getXMinMax ( ) and getYMinMax ( ) to return \ c false ) , as it depends on the axes ( hen - egg - problem ! )
Set the plot - ranges by hand ! ! !
2020-09-05 05:41:23 +08:00
\ see \ ref JKQTPlotterFunctionPlots , JKQTPXFunctionLineGraph , JKQTPXYFunctionLineGraph
2019-01-10 04:23:24 +08:00
*/
2020-09-08 02:57:25 +08:00
class JKQTPLOTTER_LIB_EXPORT JKQTPYFunctionLineGraph : public JKQTPFunctorLineGraphBase {
2019-01-10 04:23:24 +08:00
Q_OBJECT
public :
/** \brief class constructor */
2019-01-20 17:49:29 +08:00
JKQTPYFunctionLineGraph ( JKQTBasePlotter * parent = nullptr ) ;
2019-01-10 04:23:24 +08:00
/** \brief class constructor */
2019-01-20 23:15:10 +08:00
JKQTPYFunctionLineGraph ( JKQTPlotter * parent ) ;
2019-05-30 04:40:02 +08:00
/** \brief class constructor */
JKQTPYFunctionLineGraph ( const jkqtpSimplePlotFunctionType & f , const QString & title , JKQTBasePlotter * parent = nullptr ) ;
/** \brief class constructor */
JKQTPYFunctionLineGraph ( const jkqtpSimplePlotFunctionType & f , const QString & title , JKQTPlotter * parent ) ;
/** \brief class constructor */
JKQTPYFunctionLineGraph ( jkqtpSimplePlotFunctionType & & f , const QString & title , JKQTBasePlotter * parent = nullptr ) ;
/** \brief class constructor */
JKQTPYFunctionLineGraph ( jkqtpSimplePlotFunctionType & & f , const QString & title , JKQTPlotter * parent ) ;
2020-09-05 05:41:23 +08:00
/** \brief class constructor */
JKQTPYFunctionLineGraph ( SpecialFunction type , const QVector < double > & params , const QString & title , JKQTBasePlotter * parent ) ;
/** \brief class constructor */
JKQTPYFunctionLineGraph ( SpecialFunction type , const QVector < double > & params , const QString & title , JKQTPlotter * parent ) ;
2019-01-10 04:23:24 +08:00
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
protected :
2020-09-08 02:57:25 +08:00
/** \copydoc JKQTPEvaluatedFunctionGraphBase::buildPlotFunctorSpec() */
virtual PlotFunctorSpec buildPlotFunctorSpec ( ) override ;
/** \copydoc JKQTPEvaluatedFunctionWithErrorsGraphBase::buildPlotFunctorSpec() */
virtual std : : function < QPointF ( double ) > buildErrorFunctorSpec ( ) override ;
2019-01-10 04:23:24 +08:00
2023-08-14 19:51:18 +08:00
/** \brief get the maximum and minimum x-value of the graph
*/
virtual bool getXMinMax ( double & miny , double & maxy , double & smallestGreaterZero ) override ;
/** \brief get the maximum and minimum y-value of the graph
*/
virtual bool getYMinMax ( double & miny , double & maxy , double & smallestGreaterZero ) override ;
2019-01-10 04:23:24 +08:00
} ;
# endif // jkqtpgraphsevaluatedfunction_H