mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 18:15:52 +08:00
ad38ac47f2
added log regression model to statistics library added output of R^2 and chi^2 to regression adaptors (output in graph label) bugfixed some documentation typos
616 lines
25 KiB
Plaintext
616 lines
25 KiB
Plaintext
/*!
|
|
|
|
\defgroup jkqtptools Support Function library (e.g. for JKQTPlotter)
|
|
|
|
This group contains several tool functions and datatypesthat are neccessary for
|
|
JKQTPlotter, JKQTMathtext and the other major classes in this library, but may
|
|
also be used separately. The functions and datatypes are sorted into several
|
|
functionaly groups.
|
|
|
|
|
|
\defgroup jkqtptools_algorithms Diverse Algorithms
|
|
\ingroup jkqtptools
|
|
|
|
\defgroup jkqtptools_math Mathematical Computations & Expression Parsing
|
|
\ingroup jkqtptools
|
|
|
|
\defgroup jkqtptools_math_basic Mathematical Functions & Tools
|
|
\ingroup jkqtptools_math
|
|
|
|
This group assembles a variety of mathematical tool functions that are used in different places.
|
|
|
|
\defgroup jkqtptools_math_array Data Array Tools
|
|
\ingroup jkqtptools_math
|
|
|
|
Functions in this group form the basis for the statistics (\ref jkqtptools_math_statistics ) and linear algebra libraries (\ref jkqtptools_math_linalg ), by providing allocation and freeing of (aligned) memory arrays.
|
|
|
|
\see JKQTPlotterBasicJKQTPDatastoreStatistics
|
|
|
|
\defgroup jkqtptools_math_linalg Linear Algebra Tools
|
|
\ingroup jkqtptools_math
|
|
|
|
This group assembles a basic set of linear algebra methods, including matrix inversion, which are required e.g. by the statistics library (\ref jkqtptools_math_statistics )
|
|
|
|
\defgroup jkqtptools_math_statistics Statistical Computations
|
|
\ingroup jkqtptools_math
|
|
|
|
This group contains a statistics library, which offers several basic methods and is based on an iterator interface:
|
|
- \ref jkqtptools_math_statistics_basic
|
|
- \ref jkqtptools_math_statistics_regression
|
|
- \ref jkqtptools_math_statistics_1dhist
|
|
- \ref jkqtptools_math_statistics_2dhist
|
|
- \ref jkqtptools_math_statistics_1dkde
|
|
- \ref jkqtptools_math_statistics_2dkde
|
|
.
|
|
In addition there is a set of "adaptors" (see \ref jkqtptools_math_statistics_adaptors ) that shortcut the calculation of a statistical property and the subsequent parametrization of a plot with the results. With these adaptors you can add e.g. a boxplot or histogram chart to a plot by calling only one function.
|
|
|
|
|
|
All statistics functions use an iterator-based interface, comparable to the interface of the <a href="http://www.cplusplus.com/reference/algorithm/">algorithms in the C++ standard template library</a>. To this end, the class `JKQTPDatastore` provides an iterator interface to its columns, using the functions `JKQTPDatastore::begin()` and `JKQTPDatastore::end()`. Both functions simply receive the column ID as parameter and exist in a const and a mutable variant. the latter allows to also edit the data. In addition the function `JKQTPDatastore::backInserter()` returns a back-inserter iterator (like generated for STL containers with `std::back_inserter(container)`) that also allows to append to the column.
|
|
|
|
Note that the iterator interface allows to use these functions with any container that provides such iterators (e.g. `std::vector<double>`, `std::list<int>`, `std::set<float>`, `QVector<double>`...).
|
|
|
|
Code using one of these statistics functions therefore may look e.g. like this:
|
|
\code
|
|
// mean of a column in a JKQTPDatastore:
|
|
double mean=jkqtpstatAverage(datastore1->begin(randomdatacol1), datastore1->end(randomdatacol1));
|
|
|
|
// mean of a std::vector
|
|
std::vector<double> data {1,2,4,5,7,8,10,2,1,3,5};
|
|
double meanvec=jkqtpstatAverage(data.begin(), data.end());
|
|
\endcode
|
|
|
|
All statistics functions use all values in the given range and convert each value to a `double`, using `jkqtp_todouble()`. The return values is always a dohble. Therefore you can use these functions to calculate statistics of ranges of any type that can be converted to `double`. Values that do not result in a valid `double`are not used in calculating the statistics. Therefore you can exclude values by setting them `JKQTP_DOUBLE_NAN` (i.e. "not a number").
|
|
|
|
\see see for detailed examples: \ref JKQTPlotterBasicJKQTPDatastoreStatistics
|
|
|
|
\defgroup jkqtptools_math_statistics_basic Basic statistics
|
|
\ingroup jkqtptools_math_statistics
|
|
|
|
\defgroup jkqtptools_math_statistics_regression Regression Analysis
|
|
\ingroup jkqtptools_math_statistics
|
|
|
|
\defgroup jkqtptools_math_statistics_1dhist 1-dimensional Histograms
|
|
\ingroup jkqtptools_math_statistics
|
|
|
|
\defgroup jkqtptools_math_statistics_2dhist 2-dimensional Histograms
|
|
\ingroup jkqtptools_math_statistics
|
|
|
|
\defgroup jkqtptools_math_statistics_1dkde 1-dimensional Kernel Density Estimates
|
|
\ingroup jkqtptools_math_statistics
|
|
|
|
\defgroup jkqtptools_math_statistics_1dkde_kernels Kernels for 1-dimensional Histograms
|
|
\ingroup jkqtptools_math_statistics_1dkde
|
|
|
|
\defgroup jkqtptools_math_statistics_2dkde 2-dimensional Kernel Density Estimates
|
|
\ingroup jkqtptools_math_statistics
|
|
|
|
\defgroup jkqtptools_math_statistics_2dkde_kernels Kernels for 2-dimensional Histograms
|
|
\ingroup jkqtptools_math_statistics_2dkde
|
|
|
|
\defgroup jkqtptools_math_statistics_adaptors Statistics To Plot Adaptors
|
|
\ingroup jkqtptools_math_statistics
|
|
|
|
|
|
|
|
\defgroup jkqtptools_string String/String-Conversion Tool Functions
|
|
\ingroup jkqtptools
|
|
|
|
Offers diverse function to convert different datatypes (e.g. double, int, diverse enums) to and from strings and for string manipulation.
|
|
|
|
\defgroup jkqtptools_qt Additional Tools for Qt
|
|
\ingroup jkqtptools
|
|
|
|
|
|
\defgroup jkqtptools_qtwidgets Additional Widgets for Qt
|
|
\ingroup jkqtptools
|
|
|
|
\defgroup jkqtptools_drawing Drawing & Graphics Tools
|
|
\ingroup jkqtptools
|
|
|
|
Specialized drawing functions used by the plotters and LaTeX renderers.
|
|
|
|
\defgroup jkqtptools_debugging Debugging Tools
|
|
\ingroup jkqtptools
|
|
|
|
Functions that help during debugging (e.g. an assert function/macro).
|
|
|
|
\defgroup jkqtptools_codestructuring Code Structuring Tools
|
|
\ingroup jkqtptools
|
|
|
|
Classes and functions that help to structure the code (e.g. RAII constructs)
|
|
|
|
\defgroup jkqtptools_enums Enums for JKQTPlotter (including String Conversion)
|
|
\ingroup jkqtptools
|
|
|
|
Assembles diverse ENUMs required by JKQTPlotter.
|
|
|
|
|
|
|
|
\defgroup jkqtplotter JKQTPlotter: Qt based Scientific Plotter Class
|
|
|
|
A Qt based plotter for 2D scientific graphs. Main Plotting widget is JKQTPlotter.
|
|
|
|
|
|
\defgroup jkqtpdatastorage Data Storage Classes/System
|
|
\ingroup jkqtplotter
|
|
|
|
The classes in this group implement a data storage system for use with the main plotter class.
|
|
Basically a table of data is generated as a set of logical columns that may be bound to different
|
|
data sources (internal or external memory arrays. Later on it is simply possible to plot graphs
|
|
using the column number and the not a link to the actual data array, as the link is stored in these
|
|
classes.
|
|
|
|
\see \ref JKQTPlotterBasicJKQTPDatastore for a detailed description of how to use this class for data management!
|
|
|
|
\defgroup jkqtpopencvinterface OpenCV Interfaceing Tools
|
|
\ingroup jkqtpdatastorage
|
|
|
|
Classes and functions in this group allow JKQTPlotter to directly work with <a href="https://opencv.org/">OpenCV</a> data structures.
|
|
|
|
Examples:
|
|
- \ref JKQTPlotterImagePlotOpenCV
|
|
- \ref JKQTPlotterImagePlotRGBOpenCV
|
|
.
|
|
|
|
\defgroup jkqtpplottersupprt Support Classes and Functions
|
|
\ingroup jkqtplotter
|
|
|
|
\defgroup jkqtpplotterclasses Plotter Class & Plotter Widget
|
|
\ingroup jkqtplotter
|
|
|
|
This group contains the actual plotter classes, that implement layout management code,
|
|
coordinate system management an actual plotter widget ...
|
|
|
|
There are two main classes:
|
|
- JKQTBasePlotter is a QObject-derived class that implements all the plotting logic and drawing code. It does not implement a Qt widget though.
|
|
- JKQTPlotter is a QWidget-based class that contains a JKQTBasePlotter and uses it to draw plots onto a Qt form.
|
|
.
|
|
|
|
|
|
\defgroup jkqtplotter_elements Plot Elements
|
|
\ingroup jkqtplotter
|
|
|
|
This group assembles all classes that represent different elements of a plot (managed by JKQTBasePlotter/JKQTPlotter).
|
|
There are these major subgroups:
|
|
- \ref jkqtpbaseplotter_elements contains all non-graph objects, i.e. things like coordinate axes and so on
|
|
- \ref jkqtplotter_graphsgroup contains the actual graph classes
|
|
- \ref jkqtplotter_overlays contains classes for overlay elements (lines, marker ...) that can be drawn quickly on top of a plot
|
|
.
|
|
|
|
\defgroup jkqtpbaseplotter_elements Basic (non-graph) Plot Elements (coordinate axes, ...)
|
|
\ingroup jkqtplotter_elements
|
|
|
|
This group contains some tool classes that implement basic elements of the plot (coordinate axes, key, ...).
|
|
These classes are used by JKQTPlotterBase to output the plot.
|
|
|
|
|
|
\defgroup jkqtplotter_graphsgroup Graph Classes
|
|
\ingroup jkqtplotter_elements
|
|
|
|
This group contains all classes in the JKQTPlotter library that may be used to draw a graph (i.e. a curve) onto a plot.
|
|
|
|
\tableofcontents
|
|
|
|
\section jkqtplotter_graphsgroup_classstructure Graph Class Structure
|
|
|
|
\subsection jkqtplotter_graphsgroup_classstructure_basics Graph Classes
|
|
|
|
Each type of graph is represented by another class, which has to be derived from JKQTPPlotElement. This class provides a basic virtual interface
|
|
that allows JKQTPlotter to draw the graphs represented by them. This interface consists of these functions:
|
|
- JKQTPPlotElement::draw() draws the graph onto a given JKQTPEnhancedPainter (derived from <a href="http://doc.qt.io/qt-5/qpainter.html">QPainter</a>)
|
|
- JKQTPPlotElement::drawKeyMarker() draws the small marker image in the plot legend
|
|
- JKQTPPlotElement::getKeyLabelColor() returns a color for the legend entry for the graph
|
|
- JKQTPPlotElement::getXMinMax() returns the extent of the graph in x-direction (e.g. for auto-zooming)
|
|
- JKQTPPlotElement::getYMinMax() returns the extent of the graph in Y-direction (e.g. for auto-zooming)
|
|
.
|
|
In addition to these basic functions, there are additional functions that can be used to draw something outside the actual plot rectangle.
|
|
These are used to e.g. add color-scales to the side of the graph:
|
|
- JKQTPPlotElement::getOutsideSize() returns the amount of space required outside the plot rectangle
|
|
- JKQTPPlotElement::drawOutside() draws the elements outside the plot rectangle
|
|
.
|
|
|
|
Usually if writing a new graph, one would not directly
|
|
derive from JKQTPPlotElement, but from a cass in it's hirarchy of children. These children already provide certain facilities for certain types of graphs.
|
|
|
|
\dotfile jkqtplotter_graphhirarchy.dot
|
|
|
|
\subsection jkqtplotter_graphsgroup_classstructure_mixins Mix-In Classes for Graphs
|
|
|
|
In addition there are mix-in classes that are used via multiple inheritance
|
|
that add additional features and properties to a graph. A prominent example are the classes for \ref jkqtplotter_basegraphserrors "error indicators".
|
|
With these there are usually two variants of one type of graph: One without error indicators and one with error indicators, e.g.:
|
|
- JKQTPXYLineGraph shows lines+symbols graphs made up from x/y-value pairs for each data point.
|
|
- JKQTPXYLineErrorGraph extends JKQTPXYLineGraph with error indicator drawing/properties provided by JKQTPXYGraphErrors
|
|
.
|
|
This approach allows to keep interfaces and appearance recognizeable over different graph classes and locates the source code
|
|
for a feature like error indicators in a single/in few class(es).
|
|
|
|
Another example of such a class is JKQTPColorPaletteStyleAndToolsMixin, which provides functions that allow to use color palettes. It is
|
|
mainly used for the \ref jkqtplotter_imagelots "Image/Matrix graphs", but also by e.g. JKQTPXYParametrizedScatterGraph.
|
|
|
|
|
|
|
|
\defgroup jkqtplotter_basegraphs Baseclasses for Graphs
|
|
\ingroup jkqtplotter_graphsgroup
|
|
|
|
\defgroup jkqtplotter_basegraphserrors Mix-In Classes for Error Indicators
|
|
\ingroup jkqtplotter_basegraphs
|
|
|
|
\defgroup jkqtplotter_basegraphs_stylemixins Mix-In Classes for Plot Styling
|
|
\ingroup jkqtplotter_basegraphs
|
|
|
|
\defgroup jkqtplotter_linesymbolgraphs Line/Symbol Graphs
|
|
\ingroup jkqtplotter_graphsgroup
|
|
|
|
This group assembles graphs that show their data with symbols and optionally with connecting lines in diferent styles:
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html beeswarmplot_small.png
|
|
<td> JKQTPSingleColumnSymbolsGraph
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_symbols_and_styles_small.png
|
|
<td> JKQTPXYLineGraph, JKQTPXYLineErrorGraph
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_paramscatterplot_small.png
|
|
<td> JKQTPXYParametrizedScatterGraph, JKQTPXYParametrizedErrorScatterGraph
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_stepplots_small.png
|
|
<td> JKQTPSpecialLineHorizontalGraph, JKQTPSpecialLineVerticalGraph
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_linesymbolgraphs_simple Basic Line/Scatter Graphs
|
|
\ingroup jkqtplotter_linesymbolgraphs
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html beeswarmplot_small.png
|
|
<td> JKQTPSingleColumnSymbolsGraph
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_symbols_and_styles_small.png
|
|
<td> JKQTPXYLineGraph, JKQTPXYLineErrorGraph
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_stepplots_small.png
|
|
<td> JKQTPSpecialLineHorizontalGraph, JKQTPSpecialLineVerticalGraph
|
|
</table>
|
|
|
|
|
|
\defgroup jkqtplotter_linesymbolgraphs_param Parametrized Line/Scatter Graphs
|
|
\ingroup jkqtplotter_linesymbolgraphs
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_paramscatterplot_small.png
|
|
<td> JKQTPXYParametrizedScatterGraph, JKQTPXYParametrizedErrorScatterGraph
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_filledgraphs Filled Polygon/Area Graphs
|
|
\ingroup jkqtplotter_graphsgroup
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_filledgraphs_small.png
|
|
<td> JKQTPFilledCurveXGraph, JKQTPFilledCurveYGraph
|
|
<tr>
|
|
<td>\image html plot_filledcurvexerrorplots_small.png
|
|
<td> JKQTPFilledCurveXErrorGraph, JKQTPFilledCurveYErrorGraph
|
|
<tr>
|
|
<td>\image html JKQTPfilledVerticalRangeGraph_WithLines_small.png
|
|
<td> JKQTPFilledVerticalRangeGraph
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_functiongraphs Function Graphs
|
|
\ingroup jkqtplotter_linesymbolgraphs
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_functionplot_small.png
|
|
<td> JKQTPXParsedFunctionLineGraph, JKQTPYParsedFunctionLineGraph
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_parsedFgraphs Parsed Function Graphs
|
|
\ingroup jkqtplotter_linesymbolgraphs
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_functionplot_small.png
|
|
<td> JKQTPXFunctionLineGraph, JKQTPYFunctionLineGraph
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_barssticks Barcharts, Impulse-Charts, ...
|
|
\ingroup jkqtplotter_graphsgroup
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_barchart_small.png
|
|
<td> JKQTPBarVerticalGraph, JKQTPBarHorizontalGraph
|
|
<tr>
|
|
<td>\image html barchart_error_small.png
|
|
<td> JKQTPBarVerticalErrorGraph, JKQTPBarHorizontalErrorGraph
|
|
<tr>
|
|
<td>\image html JKQTPbarVerticalGraphStacked_small.png
|
|
<td> JKQTPBarVerticalStackableGraph, JKQTPBarHorizontalStackableGraph
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_impulsesplot_small.png
|
|
<td> JKQTPImpulsesHorizontalGraph, JKQTPImpulsesVerticalGraph
|
|
<tr>
|
|
<td>\image html impulses_errors_small.png
|
|
<td> JKQTPImpulsesHorizontalErrorGraph, JKQTPImpulsesVerticalErrorGraph
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_statgraphs Statistical Graphs (e.g. Boxplots ...)
|
|
\ingroup jkqtplotter_graphsgroup
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_boxplot_small.png
|
|
<td> JKQTPBoxplotVerticalGraph, JKQTPBoxplotHorizontalGraph
|
|
</table>
|
|
|
|
\see \ref jkqtptools_math_statistics_adaptors for shortcuts to calculate statistical properties of data and then adding a plot with the results.
|
|
|
|
\defgroup jkqtplotter_geoplots Geometric Elements (Lines, Rectangles, ...)
|
|
\ingroup jkqtplotter_graphsgroup
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html symbol_symbol_filled_diamond.png
|
|
<td> JKQTPGeoSymbol
|
|
<tr>
|
|
<td>\image html geo_text_small.png
|
|
<td> JKQTPGeoText
|
|
<tr>
|
|
<td>\image html geo_line_small.png
|
|
<td> JKQTPGeoLine, JKQTPGeoInfiniteLine, JKQTPGeoPolyLines
|
|
<tr>
|
|
<td>\image html geo_rect_small.png
|
|
<td> JKQTPGeoRectangle
|
|
<tr>
|
|
<td>\image html geo_polygon_small.png
|
|
<td> JKQTPGeoPolygon
|
|
<tr>
|
|
<td>\image html geo_ellipse_small.png
|
|
<td> JKQTPGeoEllipse
|
|
<tr>
|
|
<td>\image html geo_arc_small.png
|
|
<td> JKQTPGeoArc
|
|
<tr>
|
|
<td>\image html geo_pie_small.png
|
|
<td> JKQTPGeoPie
|
|
<tr>
|
|
<td>\image html geo_chords_small.png
|
|
<td> JKQTPGeoChord
|
|
<tr>
|
|
<td>\image html geo_boxplot_small.png
|
|
<td> JKQTPBoxplotVerticalElement, JKQTPBoxplotHorizontalElement
|
|
</table>
|
|
|
|
Examples:
|
|
- \ref JKQTPlotterGeometricGraphs
|
|
.
|
|
|
|
\defgroup jkqtplotter_diverse Diverse Other Graphs (Ranges, ...)
|
|
\ingroup jkqtplotter_graphsgroup
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html JKQTPHorizontalRange_small.png
|
|
<td> JKQTPHorizontalRange, JKQTPVerticalRange
|
|
<tr>
|
|
<td>\image html JKQTPPeakStreamGraphY_small.png
|
|
<td> JKQTPPeakStreamGraph
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_imagelots Matrix/Image Plotting
|
|
\ingroup jkqtplotter_graphsgroup
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_rgbimageplot_qt_small.png
|
|
<td> JKQTPImage
|
|
<tr>
|
|
<td>\image html JKQTPMathImageBaseModifyNone_small.png
|
|
<td> JKQTPMathImage, JKQTPColumnMathImage
|
|
<tr>
|
|
<td>\image html rgbimageplots_small.png
|
|
<td> JKQTPRGBMathImage, JKQTPColumnRGBMathImage
|
|
<tr>
|
|
<td>\image html overlayimage_small.png
|
|
<td> JKQTPOverlayImage
|
|
<tr>
|
|
<td>\image html overlayimageenhanced_small.png
|
|
<td> JKQTPOverlayImageEnhanced, JKQTPColumnOverlayImageEnhanced
|
|
<tr>
|
|
<td>\image html JKQTPContour_small.png
|
|
<td> JKQTPContourPlot, JKQTPColumnContourPlot
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_imagelots_elements Image Graphs
|
|
\ingroup jkqtplotter_imagelots
|
|
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_rgbimageplot_qt_small.png
|
|
<td> JKQTPImage
|
|
<tr>
|
|
<td>\image html JKQTPMathImageBaseModifyNone_small.png
|
|
<td> JKQTPMathImage, JKQTPColumnMathImage
|
|
<tr>
|
|
<td>\image html jkqtplotter_simpletest_rgbimageplot_opencv_small.png
|
|
<td> JKQTPRGBMathImage, JKQTPColumnRGBMathImage
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_imagelots_overlays Image/Matrix Overlay Graphs
|
|
\ingroup jkqtplotter_imagelots
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html overlayimage_small.png
|
|
<td> JKQTPOverlayImage
|
|
<tr>
|
|
<td>\image html overlayimageenhanced_small.png
|
|
<td> JKQTPOverlayImageEnhanced, JKQTPColumnOverlayImageEnhanced
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_imagelots_tools Tool Functions & Classes for Image Drawing
|
|
\ingroup jkqtplotter_imagelots
|
|
|
|
\defgroup jkqtplotter_imagelots_contour Contour Graphs (based on Image Data)
|
|
\ingroup jkqtplotter_imagelots
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>\image html JKQTPContour_small.png
|
|
<td> JKQTPContourPlot, JKQTPColumnContourPlot
|
|
</table>
|
|
|
|
\defgroup jkqtplotter_overlays Overlay Elements
|
|
\ingroup jkqtplotter_elements
|
|
|
|
<table>
|
|
<tr>
|
|
<th> Screenshot
|
|
<th> Classes
|
|
<tr>
|
|
<td>
|
|
<td> JKQTPOverlayVerticalLine, JKQTPOverlayLine
|
|
<tr>
|
|
<td>
|
|
<td> JKQTPOverlayVerticalRange
|
|
<tr>
|
|
<td>
|
|
<td> JKQTPOverlayRectangle
|
|
</table>
|
|
|
|
|
|
|
|
\defgroup jkqtpplotter_styling JKQTPlotter Styling System
|
|
\ingroup jkqtplotter
|
|
|
|
\image html stylesbanner.png
|
|
|
|
JKQTPlotter (and JKQTBasePlotter) offer a styling system, which allows to easily define and transfer plot styling from one object to another.
|
|
The system is based on a hirarchy of structs, which summarize properties, describing how a plot looks in general. The classes contained in this system are:
|
|
- JKQTPlotterStyle for JKQTPlotter: Defines e.g. basic user-interactions, the display options of the toolbar
|
|
- JKQTBasePlotterStyle for JKQTBasePlotter defines the appearance of the plot itself (colors, axis properties, key properties, default graph colors/styles, ...), contains JKQTPCoordinateAxisStyle instances to configrue the plot's coordinate axes
|
|
- JKQTPCoordinateAxisStyle for JKQTPCoordinateAxis defines the appearance of a coordinate axis (colors, axis properties, ...)
|
|
- JKQTPKeyStyle for the style of the key/legend in a JKQTBasePlotterStyle
|
|
.
|
|
|
|
In addition there are static methods that allow to manage a system-wide (actually program-instance wide) style that is applied to any new instance of JKQTPlotter and JKQTBasePlotter on construction:
|
|
- JKQTPGetSystemDefaultStyle() / JKQTPSetSystemDefaultStyle() allows to access the central instace of JKQTPlotterStyle (mainly properties/style of the GUI-parts and user-action bindings)
|
|
- JKQTPGetSystemDefaultBaseStyle() / JKQTPSetSystemDefaultBaseStyle() accesses the central instance of JKQTBasePlotterStyle (styles the actual plot/graphs with colors, axes styles, ...)
|
|
.
|
|
|
|
You can e.g. use these general methods to alter the styles for all JKQTPlotter instances, created in the future:
|
|
\code{.cpp}
|
|
// load the system-wide default settings from an INI-file:
|
|
QSettings plotSettings("JKQTPlotterSettings.ini", QSettings::IniFormat);;
|
|
JKQTPGetSystemDefaultStyle().loadSettings(plotSettings);
|
|
JKQTPGetSystemDefaultBaseStyle().loadSettings(plotSettings);
|
|
|
|
// alter a system-wide default setting by hand (here: set color of zooming rect to red)
|
|
JKQTPGetSystemDefaultStyle().userActionColor=QColor("red");
|
|
\endcode
|
|
|
|
Several pre-made styles are available in the JKQTPlotter repository (<a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotterressources/styles/">https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotterressources/styles/</a>).
|
|
These are also linked into the JKQTPlotter library as Qt ressource into the subdirectory \c :/JKQTPlotter/styles/ . You can use them as follows:
|
|
|
|
\code{.cpp}
|
|
QSettings plotSettings(":/JKQTPlotter/styles/blackandwhite.ini", QSettings::IniFormat);;
|
|
JKQTPGetSystemDefaultStyle().loadSettings(plotSettings);
|
|
JKQTPGetSystemDefaultBaseStyle().loadSettings(plotSettings);
|
|
\endcode
|
|
|
|
Here is a table with all available ready-made styles:
|
|
<table>
|
|
<tr>
|
|
<th> Style-file
|
|
<th> Screenshot
|
|
<tr>
|
|
<td> <b> The Default Style </b>
|
|
<td> \image html style_default.png
|
|
<tr>
|
|
<td> <a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotterressources/styles/simple_gridandticks.ini"> \c :/JKQTPlotter/styles/simple_gridandticks.ini</a>
|
|
<td> \image html style_simple_axesoffset_plotbox.png
|
|
<tr>
|
|
<td> <a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotterressources/styles/simple_axesoffset.ini"> \c :/JKQTPlotter/styles/simple_axesoffset.ini</a>
|
|
<td> \image html style_simple_axesoffset.png
|
|
<tr>
|
|
<td> <a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotterressources/styles/simple_axesoffset_plotbox.ini"> \c :/JKQTPlotter/styles/simple_axesoffset_plotbox.ini</a>
|
|
<td> \image html style_simple_axesoffset_plotbox.png
|
|
<tr>
|
|
<td> <a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotterressources/styles/dark.ini"> \c :/JKQTPlotter/styles/dark.ini</a>
|
|
<td> \image html style_dark.png
|
|
<tr>
|
|
<td> <a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotterressources/styles/blueprint.ini"> \c :/JKQTPlotter/styles/blueprint.ini</a>
|
|
<td> \image html style_blueprint.png
|
|
<tr>
|
|
<td> <a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotterressources/styles/blackandwhite.ini"> \c :/JKQTPlotter/styles/blackandwhite.ini</a>
|
|
<td> \image html style_blackandwhite.png
|
|
</table>
|
|
|
|
\see For a detailed example, see \ref JKQTPlotterStyling
|
|
|
|
|
|
|
|
\defgroup jkqtpqtwidgetsttools Qt Widgets/Tools to work with JKQTPlotter
|
|
\ingroup jkqtplotter
|
|
|
|
This group assembles several Qt widgets and tool classes that are linked to JKQTPlotter/JKQTBasePlotter and allow to build advanced GUIs for these (e.g. model/view access to internal data ...)
|
|
|
|
\defgroup jkqtpgraphsmodel Qt Data Models to Access Graphs in a JKQTBasePlotter/JKQTPlotter
|
|
\ingroup jkqtpqtwidgetsttools
|
|
|
|
Data models in this group allow to access different internal data from a JKQTBasePlotter/JKQTPlotter and in part to manipulate these.
|
|
|
|
\defgroup jkqtpcomboboxes Comboboxes for Properties of JKQTBasePlotter/JKQTPlotter
|
|
\ingroup jkqtpqtwidgetsttools
|
|
|
|
This group contains several QComboBox-derived classes that can be used to select different enum-values (e.g. with JKQTPMathImageColorPaletteComboBox you can select a color-palette from JKQTPMathImageColorPalette ).
|
|
|
|
|
|
|
|
*/ |