mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2025-02-19 02:39:26 +08:00
83 lines
10 KiB
Markdown
83 lines
10 KiB
Markdown
# Example (JKQTPlotter): Examples & Tutorials {#exampleProjectsTutorials}
|
|
This section assembles some simple examples of usage.
|
|
You can find more (complex) examples for the classes in this repository in the subfolder "test".
|
|
All test-projects are Qt-projects that use qmake to build. You can load them into QtCreator easily.
|
|
|
|
## Different Plot Data Styles
|
|
|
|
| Screenshot | Description | Notes |
|
|
|:-------------:| ------------- | ------------- |
|
|
| [](./simpletest/README.md) | [Very Basic Example (Line Graph)](./simpletest/README.md) | `JKQTPXYLineGraph` <br> C++-style QVector arrays of data |
|
|
| [](./simpletest_speed) | [Line Graph with Live Data / Speed Test](./simpletest_speed) | `JKQTPXYLineGraph` <br> external `std::array<double,N>` data, not owned by datastore <br> live-data, measure plotting speed <br> tipps to increas plotting speed |
|
|
| [](./simpletest_symbols_and_styles) | [Line Graph with Different Symbols and Line Styles](./simpletest_symbols_and_styles) | `JKQTPXYLineGraph` <br> C++ vector of data <br> setting line styles and symbol styles <br> automatic graph coloring |
|
|
| [](./simpletest_stepplots) | [Step Line Plots in Different Styles](./simpletest_stepplots) | `JKQTPStepHorizontalGraph` (and `JKQTPXYLineGraph`) <br> C++ vector of data <br> different step modes, filled and line-only |
|
|
| [](./simpletest_symbols_and_errors) | [Simple Line/Symbol Graph With Errorbars](./simpletest_symbols_and_errors) | `JKQTPXYLineErrorGraph` <br> C-style arrays of data |
|
|
| [](./simpletest_errorbarstyles) | [Different Types of Error Indicators](./simpletest_errorbarstyles) | `JKQTPXYLineErrorGraph` <br> different styles of error indicators for x- and y-errors <br> C++-style QVector for data <br> styling error indicators <br> moving key and formatting plotter grid |
|
|
| [](./simpletest_barchart) | [Simple Bar Charts](./simpletest_barchart) | `JKQTPBarVerticalGraph` <br> C-style arrays of data |
|
|
| [ <br> ](./simpletest_stackedbars) | [Stacked Bar Charts](./simpletest_stackedbars) | `JKQTPBarVerticalStackableGraph`, `JKQTPBarHorizontalStackableGraph` <br> C++-style vectors of data |
|
|
| [](./simpletest_filledgraphs) | [Filled Curve Plots](./simpletest_filledgraphs) | `JKQTPBarVerticalGraph` <br> setting/altering data in `JKQTPDatstore` directly <br> transparent plots <br> calculating histograms |
|
|
| [](./simpletest_impulsesplot) | [Impulse Plots](./simpletest_impulsesplot) | `JKQTPImpulsesVerticalGraph` and `JKQTPImpulsesHorizontalGraph` <br> C++-style QVector as plot data |
|
|
| [](./simpletest_paramscatterplot) | [Scatter Graph with Parametrized Symbols/Colors](./simpletest_paramscatterplot) | `JKQTPXYParametrizedScatterGraph` <br> C++-style QVector as plot data <br> modify scatter/points/line-graph properties by data |
|
|
| [](./simpletest_paramscatterplot_image) | [Draw an Artistic Image with a Parametrized Scatter Graph](./simpletest_paramscatterplot_image) | `JKQTPXYParametrizedScatterGraph` <br> C++-style QVector as plot data <br> rectangular arrangement of scatters <br> generative computer graphics |
|
|
| [](./simpletest_parametriccurve) | [Plotting Parametric Curves](./simpletest_parametriccurve) | `JKQTPXYLineGraph` and `JKQTPXYParametrizedScatterGraph` <br> C++-style QVector as plot data <br> parametric curve plotting |
|
|
| [](./simpletest_functionplot) | [Plotting Mathematical Functions as Line Graphs](./simpletest_functionplot) | `JKQTPXFunctionLineGraph` <br> diretly plotting C/C++-functions |
|
|
| [](./simpletest_parsedfunctionplot) | [Plotting Parsed Mathematical Functions as Line Graphs](./simpletest_parsedfunctionplot) | `JKQTPXParsedFunctionLineGraph` <br> plotting functions with the internal math equation parser/evaluator |
|
|
| [](./simpletest_geometric) | [Plotting Geometric Objects](./simpletest_geometric) | |
|
|
| [](./simpletest_boxplot) | [Plotting Box Plots](./simpletest_boxplot) | `JKQTPBoxplotVerticalGraph`, `JKQTPBoxplotHorizontalGraph` |
|
|
|
|
## Styling the Plot, Keys, Axes, ...
|
|
|
|
| Screenshot | Description | Notes |
|
|
|:-------------:| ------------- | ------------- |
|
|
| [](./simpletest_logaxes) | [logarithmic axes](./simpletest_logaxes) | `JKQTPXYLineGraph` and `JKQTPGeoText` <br> C++ vector of data <br> logarithmic axes and styling <br> plot line styles <br> internal LaTeX parser <br> add commenting text to a graph |
|
|
| [ <br>  <br> ](./simpletest_dateaxes) | [date/time axes](./simpletest_dateaxes) | `JKQTPXYLineGraph` and `JKQTPFilledVerticalRangeGraph` <br> C++ vector of data <br> date/time axes <br> plot min/max range graph <br> internal LaTeX parser <br> data from CSV files |
|
|
|
|
|
|
## Image data Plots
|
|
|
|
| Screenshot | Description | Notes |
|
|
|:-------------:| ------------- | ------------- |
|
|
| [](./simpletest_rgbimageplot_qt) | [`QImage` as a Graph](./simpletest_rgbimageplot_qt) | `JKQTPImage` <br> `QImage` drawn onto a plot with arbitrary scaling) |
|
|
| [](./simpletest_imageplot) | [Basic 1-channel Raw C Image Plot](./simpletest_imageplot) | `JKQTPColumnMathImage` <br> image data copied from C-style row-major array into a single column of the internal datastore <br> Describes several options of the image plotting classes (different ways of color coding, what to do with data above/below the limits etc.) |
|
|
| [](./simpletest_imageplot_modifier) | [Modifier-Feature of Image Plots](./simpletest_imageplot_modifier) | `JKQTPColumnMathImage` <br> image data copied from C-style row-major array into a single column of the internal datastore <br> Image is modified by a second image to display two data dimensions at the same time |
|
|
| [](./simpletest_imageplot_nodatastore) | [Basic 1-channel Raw C Image Plot <br> without the internal datastore](./simpletest_imageplot_nodatastore) | `JKQTPMathImage` <br> image data in a C-style row-major array, not using internal datastore |
|
|
| [](./simpletest_imageplot_opencv) | [1-channel OpenCV cv::Mat Image Plot](./simpletest_imageplot_opencv) | `JKQTPColumnMathImage` <br> image data copied from OpenCV cv::Mat-structure into a single column of the internal datastore |
|
|
| [](./simpletest_rgbimageplot_opencv) | [RGB OpenCV cv::Mat Image Plot](./simpletest_rgbimageplot_opencv) | `JKQTPColumnRGBMathImage` <br> image data copied from OpenCV cv::Mat-structure into three columns of the internal datastore |
|
|
|
|
|
|
|
|
## GUI Tools
|
|
|
|
| Screenshot | Description | Notes |
|
|
|:-------------:| ------------- | ------------- |
|
|
| [](./simpletest_ui) | [Placing JKQTPlotter into a Qt User-Interface-XML-file (`*.ui`)](./simpletest_ui) | using Qt Form Designer <br> parsed function plots (`JKQTPXParsedFunctionLineGraph`) |
|
|
| [](./test_user_interaction) | [User Interaction](./test_user_interaction) | different possibilities of user-interaction in JKQtPlotter |
|
|
|
|
|
|
|
|
## Plot Layout & Styling
|
|
|
|
| Screenshot | Description | Notes |
|
|
|:-------------:| ------------- | ------------- |
|
|
| [](./test_multiplot) | [Layouting Several Plots](./test_multiplot) | Combining plots in Qt Layouts <br> linking plot axes <br> copy data from a `std::map` int the datastore <br> print plots/print preview |
|
|
|
|
|
|
|
|
## More Complex Examples
|
|
|
|
| Screenshot | Description | Notes |
|
|
|:-------------:| ------------- | ------------- |
|
|
| [](./test_multiplot) | [Layouting Several Plots](./test_multiplot) | Combining plots in Qt Layouts <br> linking plot axes <br> copy data from a `std::map` int the datastore <br> print plots/print preview |
|
|
| [](./test_distributionplot) | [Plotting a Statistical Distribution of Data](./test_distributionplot) | Combines several different graphs to draw random values, their distribution and some statistical properties |
|
|
|
|
|
|
|
|
## Tools and Special Features
|
|
|
|
| Screenshot | Description | Notes |
|
|
|:-------------:| ------------- | ------------- |
|
|
| [](./jkqtmathtext_simpletest) | [JKQTMathText: Simple Demonstration](./jkqtmathtext_simpletest) | |
|
|
| [](./jkqtmathtext_test) | [JKQTMathText: Full Testing Application](./jkqtmathtext_test) | |
|
|
|
|
|