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
Base class for graph classes that evaluate a mathematical function (e.g. defined as a C-function), using an adaptive plotting algorithm from JKQTPAdaptiveFunctionGraphEvaluator.
More...
in the clean-up step of plot-data creation, a point is removed from the data, if it caused its neighboring line-segments to form an angle less than this value, given in degrees.
in the clean-up step of plot-data creation, a point is removed from the data, if it caused its neighboring line-segments to form an angle less than this value, given in degrees.
tool routine that transforms a QPolygonF according to the parent's transformation rules and returns a (non-closed) path consisting of lines (plot coordinate --> pixels)
this function returns a functor that is used to generate the plot data in coordinate space, based on a range of the dependent variable in coordinate space. In addition it also contains the value range over which to evaluate the functor PlotFunctorSpec::func
ensure that current function parameters for a plot function (which may stem from different sources, as direct data, a datastore column ...) are stored in iparams
tool-function for hitTest(), which formats a default label, taking into account the x- and y-position (both provided) and optionally the errors of these positions.
in the clean-up step of plot-data creation, a point is removed from the data, if it caused its neighboring line-segments to form an angle less than this value, given in degrees.
indicates which coordinate axis to use for coordinate transforms in y-direction
Detailed Description
Base class for graph classes that evaluate a mathematical function (e.g. defined as a C-function), using an adaptive plotting algorithm from JKQTPAdaptiveFunctionGraphEvaluator.
This class always plots a general 2D-graph , which is calculated in dependence of a parameter . This parametrization is general enough to cover the cases of parametric function, as well as x- and y-dependent function graphs:
plot a function i.e. the plot points will be and the value rage will be the x-axis range. This is implemented by e.g. JKQTPXFunctionLineGraph.
plot a function i.e. the plot points will be and the value rage will be the y-axis range. This is implemented by e.g. JKQTPYFunctionLineGraph.
plot a function i.e. the plot points will be and the value rage will be a user-defined range for . This is implemented by e.g. JKQTPXYFunctionLineGraph.
In order to implement a special cas, one has to override/implement buildPlotFunctorSpec(), which returns a functor and a value-range that can represent the cases above.
This class uses the intelligent plotting algorithm for functions, implemented in JKQTPAdaptiveFunctionGraphEvaluator. It starts by sampling the function at minSamples positions. Then each function interval is bisected recursively if necessary. To do so the function is evaluated at the mid point and the slopes and of the two linear segments are compared. the midpoint is added to the graph if
In addition all sampling points except minimum and maximum are beeing shifted by a random fraction their distance to the other points. This helps to prevent beats when sampling periodic functions.
Finally the obtained data is cleaned up to reduce the amount of points, by deleting a point, when it leads to an angle between consecutive line-segments of less than dataCleanupMaxAllowedAngleDegree.
this function returns a functor that is used to generate the plot data in coordinate space, based on a range of the dependent variable in coordinate space. In addition it also contains the value range over which to evaluate the functor PlotFunctorSpec::func
This function has to be overridden by each class. Depending on the way that class defines the actual plot function, this function has to compose its return type in different ways. The three most common ways are:
plot a function i.e. the plot points will be and the value rage will be the x-axis range. This is implemented by e.g. JKQTPXFunctionLineGraph.
plot a function i.e. the plot points will be and the value rage will be the y-axis range. This is implemented by e.g. JKQTPYFunctionLineGraph.
plot a function i.e. the plot points will be and the value rage will be a user-defined range for . This is implemented by e.g. JKQTPXYFunctionLineGraph.
ensure that current function parameters for a plot function (which may stem from different sources, as direct data, a datastore column ...) are stored in iparams
in the clean-up step of plot-data creation, a point is removed from the data, if it caused its neighboring line-segments to form an angle less than this value, given in degrees.
in the clean-up step of plot-data creation, a point is removed from the data, if it caused its neighboring line-segments to form an angle less than this value, given in degrees.
returns true if the given column is used by the graph
This virtual function indicates whether a given column is used by this graph. Override this function in your derived graphs to indicate to JKQTPlotter / JKQTBasePlotter , which columns from the internal JKQTPDatastore are actually used. This information can be used e.g. for graph-specific data-export.
in the clean-up step of plot-data creation, a point is removed from the data, if it caused its neighboring line-segments to form an angle less than this value, given in degrees.