diff --git a/JKQtPlotterBuildAllExamples.pro b/JKQtPlotterBuildAllExamples.pro index ae549b9569..746ba921e0 100644 --- a/JKQtPlotterBuildAllExamples.pro +++ b/JKQtPlotterBuildAllExamples.pro @@ -1,6 +1,7 @@ TEMPLATE = subdirs SUBDIRS += jkqtplotterlib \ + jkqtplotterlib_sharedlib \ jkqtmathtext_simpletest \ jkqtplot_test \ jkqtplotter_simpletest \ @@ -8,31 +9,33 @@ SUBDIRS += jkqtplotterlib \ jkqtfastplotter_test -jkqtplotterlib.file = lib/jkqtplotterlib.pro +jkqtplotterlib.file = staticlib/jkqtplotterlib.pro -jkqtmathtext_simpletest.subdir = test/jkqtmathtext_simpletest +jkqtplotterlib_sharedlib.file = sharedlib/jkqtplotterlib_sharedlib.pro + +jkqtmathtext_simpletest.subdir = examples/jkqtmathtext_simpletest jkqtmathtext_simpletest.depends = jkqtplotterlib -jkqtmathtext_test.subdir = test/jkqtmathtext_test +jkqtmathtext_test.subdir = examples/jkqtmathtext_test jkqtmathtext_test.depends = jkqtplotterlib -jkqtplot_test.subdir = test/jkqtplot_test +jkqtplot_test.subdir = examples/jkqtplot_test jkqtplot_test.depends = jkqtplotterlib -jkqtplotter_simpletest.file = test/simpletest/jkqtplotter_simpletest.pro +jkqtplotter_simpletest.file = examples/simpletest/jkqtplotter_simpletest.pro jkqtplotter_simpletest.depends = jkqtplotterlib -test_multiplot.file = test/test_multiplot/test_multiplot.pro +test_multiplot.file = examples/test_multiplot/test_multiplot.pro test_multiplot.depends = jkqtplotterlib -jkqtfastplotter_test.file = $$PWD/test/jkqtfastplotter_test/jkqtfastplotter_test.pro +jkqtfastplotter_test.file = $$PWD/examples/jkqtfastplotter_test/jkqtfastplotter_test.pro jkqtfastplotter_test.depends = jkqtplotterlib defineTest(addSimpleTest) { test_name = $$1 SUBDIRS += jkqtplotter_simpletest_$${test_name} - jkqtplotter_simpletest_$${test_name}.file = test/simpletest_$${test_name}/jkqtplotter_simpletest_$${test_name}.pro + jkqtplotter_simpletest_$${test_name}.file = examples/simpletest_$${test_name}/jkqtplotter_simpletest_$${test_name}.pro jkqtplotter_simpletest_$${test_name}.depends = jkqtplotterlib export (jkqtplotter_simpletest_$${test_name}.file) diff --git a/README.md b/README.md index acef83d6c3..16f9733880 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # JKQtPlotter This is an extensive library of function/data plotter classes for Qt (>= 4.7, tested with Qt up to 5.11). -This software is licensed under the term of the GNU Lesser General Public License 2.1 -(LGPL 2.1) or above. +This software is licensed under the term of the [GNU Lesser General Public License 2.1 +(LGPL 2.1)](https://github.com/jkriege2/JKQtPlotter/blob/master/LICENSE) or above. ## Continuous Integration Status [![Build status](https://ci.appveyor.com/api/projects/status/vq2o9pfi97isxm2a/branch/master?svg=true)](https://ci.appveyor.com/project/jkriege2/jkqtplotter/branch/master) @@ -11,6 +11,11 @@ This software is licensed under the term of the GNU Lesser General Public Licens ## Screenshots [Screenshots directory](https://github.com/jkriege2/JKQtPlotter/tree/master/screenshots) +## Building +Building instructions can be found here: +- include necessary files into QMake project: [`./lib/*.pri`](https://github.com/jkriege2/JKQtPlotter/tree/master/lib) +- build a static library: [`./staticlib/*.pro`](https://github.com/jkriege2/JKQtPlotter/tree/master/staticlib) +- build a shared library (DLL): [`./sharedlib/*.pro`](https://github.com/jkriege2/JKQtPlotter/tree/master/sharedlib) ## Examples This section assembles some simple examples of usage. @@ -21,49 +26,49 @@ All test-projects are Qt-projects that use qmake to build. You can load them int | Screenshot | Description | Notes | |:-------------:| ------------- | ------------- | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest1_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest) | [Very Basic Example (Line Graph)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest) | `JKQTPxyLineGraph`
C++-style QVector arrays of data | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_speed_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_speed) | [Line Graph with Live Data / Speed Test](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_speed) | `JKQTPxyLineGraph`
external `std::array` data, not owned by datastore
live-data, measure plotting speed
tipps to increas plotting speed | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_symbols_and_styles_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_symbols_and_styles) | [Line Graph with Different Symbols and Line Styles](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_symbols_and_styles) | `JKQTPxyLineGraph`
C++ vector of data
setting line styles and symbol styles
automatic graph coloring | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_stepplots_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_stepplots) | [Step Line Plots in Different Styles](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_stepplots) | `JKQTPstepHorizontalGraph` (and `JKQTPxyLineGraph`)
C++ vector of data
different step modes, filled and line-only | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_symbols_and_errors_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_symbols_and_errors) | [Simple Line/Symbol Graph With Errorbars](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_symbols_and_errors) | `JKQTPxyLineErrorGraph`
C-style arrays of data | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_errorbarstyles) | [Different Types of Error Indicators](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_errorbarstyles) | `JKQTPxyLineErrorGraph`
different styles of error indicators for x- and y-errors
C++-style QVector for data
styling error indicators
moving key and formatting plotter grid | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_barchart_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_barchart) | [Simple Bar Charts](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_barchart) | `JKQTPbarVerticalGraph`
C-style arrays of data | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/JKQTPbarVerticalGraphStacked_small.png)
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/JKQTPbarHorizontalGraphStacked_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_stackedbars) | [Stacked Bar Charts](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_stackedbars) | `JKQTPbarVerticalStackableGraph`, `JKQTPbarHorizontalStackableGraph`
C++-style vectors of data | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_filledgraphs_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_filledgraphs) | [Filled Curve Plots](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_filledgraphs) | `JKQTPbarVerticalGraph`
setting/altering data in `JKQTPdatstore` directly
transparent plots
calculating histograms | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_impulsesplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_impulsesplot) | [Impulse Plots](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_impulsesplot) | `JKQTPimpulsesVerticalGraph` and `JKQTPimpulsesHorizontalGraph`
C++-style QVector as plot data | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_paramscatterplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_paramscatterplot) | [Scatter Graph with Parametrized Symbols/Colors](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_paramscatterplot) | `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
modify scatter/points/line-graph properties by data | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_paramscatterplot_image_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_paramscatterplot_image) | [Draw an Artistic Image with a Parametrized Scatter Graph](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_paramscatterplot_image) | `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
rectangular arrangement of scatters
generative computer graphics | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_parametriccurve_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_parametriccurve) | [Plotting Parametric Curves](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_parametriccurve) | `JKQTPxyLineGraph` and `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
parametric curve plotting | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_functionplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_functionplot) | [Plotting Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_functionplot) | `JKQTPxFunctionLineGraph`
diretly plotting C/C++-functions | -[![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_parsedfunctionplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_parsedfunctionplot) | [Plotting Parsed Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_parsedfunctionplot) | `JKQTPxParsedFunctionLineGraph`
plotting functions with the internal math equation parser/evaluator | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest1_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest) | [Very Basic Example (Line Graph)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest) | `JKQTPxyLineGraph`
C++-style QVector arrays of data | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_speed_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_speed) | [Line Graph with Live Data / Speed Test](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_speed) | `JKQTPxyLineGraph`
external `std::array` data, not owned by datastore
live-data, measure plotting speed
tipps to increas plotting speed | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_symbols_and_styles_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_symbols_and_styles) | [Line Graph with Different Symbols and Line Styles](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_symbols_and_styles) | `JKQTPxyLineGraph`
C++ vector of data
setting line styles and symbol styles
automatic graph coloring | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_stepplots_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_stepplots) | [Step Line Plots in Different Styles](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_stepplots) | `JKQTPstepHorizontalGraph` (and `JKQTPxyLineGraph`)
C++ vector of data
different step modes, filled and line-only | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_symbols_and_errors_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_symbols_and_errors) | [Simple Line/Symbol Graph With Errorbars](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_symbols_and_errors) | `JKQTPxyLineErrorGraph`
C-style arrays of data | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_errorbarstyles) | [Different Types of Error Indicators](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_errorbarstyles) | `JKQTPxyLineErrorGraph`
different styles of error indicators for x- and y-errors
C++-style QVector for data
styling error indicators
moving key and formatting plotter grid | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_barchart_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_barchart) | [Simple Bar Charts](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_barchart) | `JKQTPbarVerticalGraph`
C-style arrays of data | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/JKQTPbarVerticalGraphStacked_small.png)
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/JKQTPbarHorizontalGraphStacked_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_stackedbars) | [Stacked Bar Charts](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_stackedbars) | `JKQTPbarVerticalStackableGraph`, `JKQTPbarHorizontalStackableGraph`
C++-style vectors of data | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_filledgraphs_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_filledgraphs) | [Filled Curve Plots](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_filledgraphs) | `JKQTPbarVerticalGraph`
setting/altering data in `JKQTPdatstore` directly
transparent plots
calculating histograms | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_impulsesplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_impulsesplot) | [Impulse Plots](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_impulsesplot) | `JKQTPimpulsesVerticalGraph` and `JKQTPimpulsesHorizontalGraph`
C++-style QVector as plot data | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_paramscatterplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_paramscatterplot) | [Scatter Graph with Parametrized Symbols/Colors](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_paramscatterplot) | `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
modify scatter/points/line-graph properties by data | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_paramscatterplot_image_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_paramscatterplot_image) | [Draw an Artistic Image with a Parametrized Scatter Graph](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_paramscatterplot_image) | `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
rectangular arrangement of scatters
generative computer graphics | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_parametriccurve_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_parametriccurve) | [Plotting Parametric Curves](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_parametriccurve) | `JKQTPxyLineGraph` and `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
parametric curve plotting | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_functionplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_functionplot) | [Plotting Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_functionplot) | `JKQTPxFunctionLineGraph`
diretly plotting C/C++-functions | +[![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_parsedfunctionplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_parsedfunctionplot) | [Plotting Parsed Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_parsedfunctionplot) | `JKQTPxParsedFunctionLineGraph`
plotting functions with the internal math equation parser/evaluator | ### Styling the Plot, Keys, Axes, ... | Screenshot | Description | Notes | |:-------------:| ------------- | ------------- | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_logaxes) | [logarithmic axes](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_logaxes) | `JKQTPxyLineGraph` and `JKQTPgeoText`
C++ vector of data
logarithmic axes and styling
plot line styles
internal LaTeX parser
add commenting text to a graph | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes_small.png)
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes_dates_small.png)
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes_timeaxis_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_dateaxes) | [date/time axes](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_dateaxes) | `JKQTPxyLineGraph` and `JKQTPfilledVerticalRangeGraph`
C++ vector of data
date/time axes
plot min/max range graph
internal LaTeX parser
data from CSV files | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_logaxes) | [logarithmic axes](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_logaxes) | `JKQTPxyLineGraph` and `JKQTPgeoText`
C++ vector of data
logarithmic axes and styling
plot line styles
internal LaTeX parser
add commenting text to a graph | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes_small.png)
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes_dates_small.png)
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes_timeaxis_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_dateaxes) | [date/time axes](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_dateaxes) | `JKQTPxyLineGraph` and `JKQTPfilledVerticalRangeGraph`
C++ vector of data
date/time axes
plot min/max range graph
internal LaTeX parser
data from CSV files | ### Image data Plots | Screenshot | Description | Notes | |:-------------:| ------------- | ------------- | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_qt_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_rgbimageplot_qt) | [`QImage` as a Graph](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_rgbimageplot_qt) | `JKQTPImage`
`QImage` drawn onto a plot with arbitrary scaling) | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot) | [Basic 1-channel Raw C Image Plot](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot) | `JKQTPColumnMathImage`
image data copied from C-style row-major array into a single column of the internal datastore
Describes several options of the image plotting classes (different ways of color coding, what to do with data above/below the limits etc.) | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_modifier_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot_modifier) | [Modifier-Feature of Image Plots](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot_modifier) | `JKQTPColumnMathImage`
image data copied from C-style row-major array into a single column of the internal datastore
Image is modified by a second image to display two data dimensions at the same time | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_nodatastore_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot_nodatastore) | [Basic 1-channel Raw C Image Plot
without the internal datastore](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot_nodatastore) | `JKQTPMathImage`
image data in a C-style row-major array, not using internal datastore | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_opencv_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot_opencv) | [1-channel OpenCV cv::Mat Image Plot](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot_opencv) | `JKQTPColumnMathImage`
image data copied from OpenCV cv::Mat-structure into a single column of the internal datastore | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_opencv_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_rgbimageplot_opencv) | [RGB OpenCV cv::Mat Image Plot](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_rgbimageplot_opencv) | `JKQTPColumnRGBMathImage`
image data copied from OpenCV cv::Mat-structure into three columns of the internal datastore | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_qt_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_rgbimageplot_qt) | [`QImage` as a Graph](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_rgbimageplot_qt) | `JKQTPImage`
`QImage` drawn onto a plot with arbitrary scaling) | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot) | [Basic 1-channel Raw C Image Plot](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot) | `JKQTPColumnMathImage`
image data copied from C-style row-major array into a single column of the internal datastore
Describes several options of the image plotting classes (different ways of color coding, what to do with data above/below the limits etc.) | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_modifier_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot_modifier) | [Modifier-Feature of Image Plots](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot_modifier) | `JKQTPColumnMathImage`
image data copied from C-style row-major array into a single column of the internal datastore
Image is modified by a second image to display two data dimensions at the same time | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_nodatastore_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot_nodatastore) | [Basic 1-channel Raw C Image Plot
without the internal datastore](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot_nodatastore) | `JKQTPMathImage`
image data in a C-style row-major array, not using internal datastore | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_opencv_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot_opencv) | [1-channel OpenCV cv::Mat Image Plot](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot_opencv) | `JKQTPColumnMathImage`
image data copied from OpenCV cv::Mat-structure into a single column of the internal datastore | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_opencv_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_rgbimageplot_opencv) | [RGB OpenCV cv::Mat Image Plot](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_rgbimageplot_opencv) | `JKQTPColumnRGBMathImage`
image data copied from OpenCV cv::Mat-structure into three columns of the internal datastore | ### GUI Tools and Plot Layout | Screenshot | Description | Notes | |:-------------:| ------------- | ------------- | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/test_multiplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/test_multiplot) | [Layouting Several Plots](https://github.com/jkriege2/JKQtPlotter/tree/master/test/test_multiplot) | Combining plots in Qt Layouts
linking plot axes
copy data from a `std::map` int the datastore
print plots/print preview | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/test_multiplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/test_multiplot) | [Layouting Several Plots](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/test_multiplot) | Combining plots in Qt Layouts
linking plot axes
copy data from a `std::map` int the datastore
print plots/print preview | ### Tools and Special Features | Screenshot | Description | Notes | |:-------------:| ------------- | ------------- | -| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtmathtext_simpletest_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/test/jkqtmathtext_simpletest) | [JKQTMathText: LaTeX Renderer](https://github.com/jkriege2/JKQtPlotter/tree/master/test/jkqtmathtext_simpletest) | | +| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtmathtext_simpletest_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/jkqtmathtext_simpletest) | [JKQTMathText: LaTeX Renderer](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/jkqtmathtext_simpletest) | | diff --git a/appveyor.yml b/appveyor.yml index 715a0b9556..3b4b4d4a2c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -31,7 +31,7 @@ build: configuration: - release -# - debug + - debug install: - IF %VSVER% GTR 14 ( diff --git a/test/jkqtfastplotter_test/jkqtfastplotter_test.cpp b/examples/jkqtfastplotter_test/jkqtfastplotter_test.cpp similarity index 94% rename from test/jkqtfastplotter_test/jkqtfastplotter_test.cpp rename to examples/jkqtfastplotter_test/jkqtfastplotter_test.cpp index 346b2321df..b6deb00562 100644 --- a/test/jkqtfastplotter_test/jkqtfastplotter_test.cpp +++ b/examples/jkqtfastplotter_test/jkqtfastplotter_test.cpp @@ -1,9 +1,9 @@ -#include -#include "testmain.h" - -int main(int argc, char *argv[]) { - QApplication a(argc, argv); - TestMain w; - w.show(); - return a.exec(); -} +#include +#include "testmain.h" + +int main(int argc, char *argv[]) { + QApplication a(argc, argv); + TestMain w; + w.show(); + return a.exec(); +} diff --git a/test/jkqtfastplotter_test/jkqtfastplotter_test.pro b/examples/jkqtfastplotter_test/jkqtfastplotter_test.pro similarity index 76% rename from test/jkqtfastplotter_test/jkqtfastplotter_test.pro rename to examples/jkqtfastplotter_test/jkqtfastplotter_test.pro index bf29b2ff0f..b734a41400 100644 --- a/test/jkqtfastplotter_test/jkqtfastplotter_test.pro +++ b/examples/jkqtfastplotter_test/jkqtfastplotter_test.pro @@ -1,35 +1,39 @@ -# ------------------------------------------------- -# Project created by QtCreator 2010-06-13T12:40:50 -# ------------------------------------------------- -TARGET = JKQTFastPlotter_test - -TEMPLATE = app - -SOURCES += jkqtfastplotter_test.cpp \ - testmain.cpp - -HEADERS += testmain.h - -RCC_DIR = .rccs - -CONFIG += qt windows - -QT += core gui opengl - -UI_DIR = .uics - -OBJECTS_DIR = .objs - -MOC_DIR = .mocs - -DESTDIR = ./ - -DEFINES += DEBUG_TIMING - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# include JKQtPlotter library -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib +# ------------------------------------------------- +# Project created by QtCreator 2010-06-13T12:40:50 +# ------------------------------------------------- +TARGET = JKQTFastPlotter_test + +TEMPLATE = app + +SOURCES += jkqtfastplotter_test.cpp \ + testmain.cpp + +HEADERS += testmain.h + +RCC_DIR = .rccs + +CONFIG += qt windows + +QT += core gui opengl + +UI_DIR = .uics + +OBJECTS_DIR = .objs + +MOC_DIR = .mocs + +DESTDIR = ./ + +DEFINES += DEBUG_TIMING + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# include JKQtPlotter library +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") diff --git a/test/jkqtfastplotter_test/jkqtfastplotter_test_and_lib.pro b/examples/jkqtfastplotter_test/jkqtfastplotter_test_and_lib.pro similarity index 100% rename from test/jkqtfastplotter_test/jkqtfastplotter_test_and_lib.pro rename to examples/jkqtfastplotter_test/jkqtfastplotter_test_and_lib.pro diff --git a/test/jkqtfastplotter_test/lena.jpg b/examples/jkqtfastplotter_test/lena.jpg similarity index 100% rename from test/jkqtfastplotter_test/lena.jpg rename to examples/jkqtfastplotter_test/lena.jpg diff --git a/test/jkqtfastplotter_test/lena.png b/examples/jkqtfastplotter_test/lena.png similarity index 100% rename from test/jkqtfastplotter_test/lena.png rename to examples/jkqtfastplotter_test/lena.png diff --git a/test/jkqtfastplotter_test/testmain.cpp b/examples/jkqtfastplotter_test/testmain.cpp similarity index 96% rename from test/jkqtfastplotter_test/testmain.cpp rename to examples/jkqtfastplotter_test/testmain.cpp index b9e7381f05..244a60f8e2 100644 --- a/test/jkqtfastplotter_test/testmain.cpp +++ b/examples/jkqtfastplotter_test/testmain.cpp @@ -1,186 +1,186 @@ -#include "testmain.h" -#include -#include - -TestMain::TestMain(QWidget *parent) : - QWidget(parent) -{ - - - imageRed=(double*)calloc(IMAGE_N*IMAGE_N, sizeof(double)); - imageGreen=(double*)calloc(IMAGE_N*IMAGE_N, sizeof(double)); - imageBlue=(double*)calloc(IMAGE_N*IMAGE_N, sizeof(double)); - image=(double*)calloc(IMAGE_N*IMAGE_N, sizeof(double)); - ovrl=(bool*)calloc(IMAGE_N*IMAGE_N, sizeof(bool)); - x=(double*)calloc(N1, sizeof(double)); - y1=(double*)calloc(N1, sizeof(double)); - y2=(double*)calloc(N1, sizeof(double)); - y3=(double*)calloc(N1, sizeof(double)); - - - QGridLayout* gl=new QGridLayout(this); - setLayout(gl); - QTabWidget* t=new QTabWidget(this); - gl->addWidget(t,0,0); - - QWidget* w=new QWidget(this); - gl=new QGridLayout(w); - w->setLayout(gl); - - JKQTFastPlotter* pl1=new JKQTFastPlotter(w); - pl1->set_maintainAspectRatio(true); - gl->addWidget(pl1, 0, 0); - JKQTFastPlotter* pl2=new JKQTFastPlotter(w); - pl2->setMaximumWidth(100); - pl2->set_synchronizeY(pl1); - pl2->set_yAxisLabelVisible(false); - pl2->set_plotBorderLeft(10); - pl2->set_plotBorderRight(2); - w->connect(pl1, SIGNAL(replotting()), pl2, SLOT(update_plot())); - gl->addWidget(pl2, 0, 1); - JKQTFastPlotter* pl3=new JKQTFastPlotter(w); - pl3->set_synchronizeX(pl1); - w->connect(pl1, SIGNAL(replotting()), pl3, SLOT(update_plot())); - gl->addWidget(pl3, 1, 0); - - - xx.clear(); - yy.clear(); - for (int i=0; i50 && y>50) image[y*IMAGE_N+x]=0; - if (x<50 && y<50) image[y*IMAGE_N+x]=50; - if (abs(x-(IMAGE_N-y))<4) ovrl[y*IMAGE_N+x]=true; else ovrl[y*IMAGE_N+x]=false; - } - } - - JKQTFPimagePlot* p5=new JKQTFPimagePlot(pl3, image, JKQTFP_double, IMAGE_N, IMAGE_N, 0, 10, 0, 10, JKQTFP_GRAY); - QColor col=QColor("red"); - col.setAlpha(127); - JKQTFPimageOverlayPlot* p5o=new JKQTFPimageOverlayPlot(pl3, ovrl, IMAGE_N, IMAGE_N, 0, 10, 0, 10, col); - JKQTFPXRangePlot* p6=new JKQTFPXRangePlot(pl1, 2.25, 7.75); - p6->set_fillStyle(Qt::SolidPattern); - JKQTFPQScaleBarXPlot* sb=new JKQTFPQScaleBarXPlot(pl1, 1, QString("%1 mm")); - - pl1->addPlot(p6); - pl1->addPlot(p1); - pl1->addPlot(p2); - pl1->addPlot(p3); - pl1->addPlot(pv); - pl1->addPlot(sb); - - pl2->addPlot(p4); - - pl3->addPlot(p5); - pl3->addPlot(p5o); - pl3->setObjectName("pl3"); - - QComboBox* spin=new QComboBox(w); - spin->addItems(JKQTFPimagePlot_getPalettes()); - gl->addWidget(spin, 2,0); - connect(spin, SIGNAL(currentIndexChanged(int)), p5, SLOT(set_palette(int))); - QComboBox* scale=new QComboBox(w); - scale->addItem("TopLeft"); - scale->addItem("TopRight"); - scale->addItem("BottomLeft"); - scale->addItem("BottomRight"); - gl->addWidget(scale, 3,0); - connect(scale, SIGNAL(currentIndexChanged(int)), sb, SLOT(set_position(int))); - - t->addTab(w, tr("Basic Test")); - - - w=new QWidget(this); - gl=new QGridLayout(w); - w->setLayout(gl); - JKQTFastPlotter* p21=new JKQTFastPlotter(w); - gl->addWidget(p21, 0, 0, 1, 3); - for (int x=0; xset_image(imageRed, JKQTFP_double, imageGreen, JKQTFP_double, imageBlue, JKQTFP_double, IMAGE_N, IMAGE_N,0,10,0,10); - p21->addPlot(prgb); - - QCheckBox* c=new QCheckBox(tr("red channel"), w); - c->setChecked(true); - connect(c, SIGNAL(toggled(bool)), this, SLOT(enableRed(bool))); - gl->addWidget(c, 1,0); - - c=new QCheckBox(tr("green channel"), w); - c->setChecked(true); - connect(c, SIGNAL(toggled(bool)), this, SLOT(enableGreen(bool))); - gl->addWidget(c, 1,1); - - c=new QCheckBox(tr("blue channel"), w); - c->setChecked(true); - connect(c, SIGNAL(toggled(bool)), this, SLOT(enableBlue(bool))); - gl->addWidget(c, 1,2); - - - t->addTab(w, tr("Overlay Test")); - t->setCurrentIndex(1); - - resize(500,400); - -} - -TestMain::~TestMain() { - free(imageRed); - free(imageGreen); - free(imageBlue); - free(image); - free(ovrl); - free(x); - free(y1); - free(y2); - free(y3); - -} - -void TestMain::enableRed(bool enabled) { - if (enabled) { - prgb->set_imageRed(imageRed, JKQTFP_double); - } else { - prgb->set_imageRed(NULL, JKQTFP_double); - } -} - -void TestMain::enableGreen(bool enabled) { - if (enabled) { - prgb->set_imageGreen(imageGreen, JKQTFP_double); - } else { - prgb->set_imageGreen(NULL, JKQTFP_double); - } -} - -void TestMain::enableBlue(bool enabled) { - if (enabled) { - prgb->set_imageBlue(imageBlue, JKQTFP_double); - } else { - prgb->set_imageBlue(NULL, JKQTFP_double); - } -} +#include "testmain.h" +#include +#include + +TestMain::TestMain(QWidget *parent) : + QWidget(parent) +{ + + + imageRed=(double*)calloc(IMAGE_N*IMAGE_N, sizeof(double)); + imageGreen=(double*)calloc(IMAGE_N*IMAGE_N, sizeof(double)); + imageBlue=(double*)calloc(IMAGE_N*IMAGE_N, sizeof(double)); + image=(double*)calloc(IMAGE_N*IMAGE_N, sizeof(double)); + ovrl=(bool*)calloc(IMAGE_N*IMAGE_N, sizeof(bool)); + x=(double*)calloc(N1, sizeof(double)); + y1=(double*)calloc(N1, sizeof(double)); + y2=(double*)calloc(N1, sizeof(double)); + y3=(double*)calloc(N1, sizeof(double)); + + + QGridLayout* gl=new QGridLayout(this); + setLayout(gl); + QTabWidget* t=new QTabWidget(this); + gl->addWidget(t,0,0); + + QWidget* w=new QWidget(this); + gl=new QGridLayout(w); + w->setLayout(gl); + + JKQTFastPlotter* pl1=new JKQTFastPlotter(w); + pl1->set_maintainAspectRatio(true); + gl->addWidget(pl1, 0, 0); + JKQTFastPlotter* pl2=new JKQTFastPlotter(w); + pl2->setMaximumWidth(100); + pl2->set_synchronizeY(pl1); + pl2->set_yAxisLabelVisible(false); + pl2->set_plotBorderLeft(10); + pl2->set_plotBorderRight(2); + w->connect(pl1, SIGNAL(replotting()), pl2, SLOT(update_plot())); + gl->addWidget(pl2, 0, 1); + JKQTFastPlotter* pl3=new JKQTFastPlotter(w); + pl3->set_synchronizeX(pl1); + w->connect(pl1, SIGNAL(replotting()), pl3, SLOT(update_plot())); + gl->addWidget(pl3, 1, 0); + + + xx.clear(); + yy.clear(); + for (int i=0; i50 && y>50) image[y*IMAGE_N+x]=0; + if (x<50 && y<50) image[y*IMAGE_N+x]=50; + if (abs(x-(IMAGE_N-y))<4) ovrl[y*IMAGE_N+x]=true; else ovrl[y*IMAGE_N+x]=false; + } + } + + JKQTFPimagePlot* p5=new JKQTFPimagePlot(pl3, image, JKQTFP_double, IMAGE_N, IMAGE_N, 0, 10, 0, 10, JKQTFP_GRAY); + QColor col=QColor("red"); + col.setAlpha(127); + JKQTFPimageOverlayPlot* p5o=new JKQTFPimageOverlayPlot(pl3, ovrl, IMAGE_N, IMAGE_N, 0, 10, 0, 10, col); + JKQTFPXRangePlot* p6=new JKQTFPXRangePlot(pl1, 2.25, 7.75); + p6->set_fillStyle(Qt::SolidPattern); + JKQTFPQScaleBarXPlot* sb=new JKQTFPQScaleBarXPlot(pl1, 1, QString("%1 mm")); + + pl1->addPlot(p6); + pl1->addPlot(p1); + pl1->addPlot(p2); + pl1->addPlot(p3); + pl1->addPlot(pv); + pl1->addPlot(sb); + + pl2->addPlot(p4); + + pl3->addPlot(p5); + pl3->addPlot(p5o); + pl3->setObjectName("pl3"); + + QComboBox* spin=new QComboBox(w); + spin->addItems(JKQTFPimagePlot_getPalettes()); + gl->addWidget(spin, 2,0); + connect(spin, SIGNAL(currentIndexChanged(int)), p5, SLOT(set_palette(int))); + QComboBox* scale=new QComboBox(w); + scale->addItem("TopLeft"); + scale->addItem("TopRight"); + scale->addItem("BottomLeft"); + scale->addItem("BottomRight"); + gl->addWidget(scale, 3,0); + connect(scale, SIGNAL(currentIndexChanged(int)), sb, SLOT(set_position(int))); + + t->addTab(w, tr("Basic Test")); + + + w=new QWidget(this); + gl=new QGridLayout(w); + w->setLayout(gl); + JKQTFastPlotter* p21=new JKQTFastPlotter(w); + gl->addWidget(p21, 0, 0, 1, 3); + for (int x=0; xset_image(imageRed, JKQTFP_double, imageGreen, JKQTFP_double, imageBlue, JKQTFP_double, IMAGE_N, IMAGE_N,0,10,0,10); + p21->addPlot(prgb); + + QCheckBox* c=new QCheckBox(tr("red channel"), w); + c->setChecked(true); + connect(c, SIGNAL(toggled(bool)), this, SLOT(enableRed(bool))); + gl->addWidget(c, 1,0); + + c=new QCheckBox(tr("green channel"), w); + c->setChecked(true); + connect(c, SIGNAL(toggled(bool)), this, SLOT(enableGreen(bool))); + gl->addWidget(c, 1,1); + + c=new QCheckBox(tr("blue channel"), w); + c->setChecked(true); + connect(c, SIGNAL(toggled(bool)), this, SLOT(enableBlue(bool))); + gl->addWidget(c, 1,2); + + + t->addTab(w, tr("Overlay Test")); + t->setCurrentIndex(1); + + resize(500,400); + +} + +TestMain::~TestMain() { + free(imageRed); + free(imageGreen); + free(imageBlue); + free(image); + free(ovrl); + free(x); + free(y1); + free(y2); + free(y3); + +} + +void TestMain::enableRed(bool enabled) { + if (enabled) { + prgb->set_imageRed(imageRed, JKQTFP_double); + } else { + prgb->set_imageRed(NULL, JKQTFP_double); + } +} + +void TestMain::enableGreen(bool enabled) { + if (enabled) { + prgb->set_imageGreen(imageGreen, JKQTFP_double); + } else { + prgb->set_imageGreen(NULL, JKQTFP_double); + } +} + +void TestMain::enableBlue(bool enabled) { + if (enabled) { + prgb->set_imageBlue(imageBlue, JKQTFP_double); + } else { + prgb->set_imageBlue(NULL, JKQTFP_double); + } +} diff --git a/test/jkqtfastplotter_test/testmain.h b/examples/jkqtfastplotter_test/testmain.h similarity index 95% rename from test/jkqtfastplotter_test/testmain.h rename to examples/jkqtfastplotter_test/testmain.h index 878f1dbd4c..d04b204d50 100644 --- a/test/jkqtfastplotter_test/testmain.h +++ b/examples/jkqtfastplotter_test/testmain.h @@ -1,44 +1,44 @@ -#ifndef TESTMAIN_H -#define TESTMAIN_H - -#include -#include -#include "jkqtfastplotter/jkqtfastplotter.h" -#include - -#define N1 20 -#define XMAX 10.0 -#define IMAGE_N 300 - - -class TestMain : public QWidget { - Q_OBJECT - public: - explicit TestMain(QWidget *parent = 0); - virtual ~TestMain(); - - signals: - - public slots: - void enableRed(bool enabled); - void enableGreen(bool enabled); - void enableBlue(bool enabled); - - protected: - double* x; - double* y1; - double* y2; - double* y3; - QVector xx; - QVector yy; - QImage img; - double* image; - bool* ovrl; - - double* imageRed; - double* imageGreen; - double* imageBlue; - JKQTFPRGBImageOverlayPlot* prgb; -}; - -#endif // TESTMAIN_H +#ifndef TESTMAIN_H +#define TESTMAIN_H + +#include +#include +#include "jkqtfastplotter/jkqtfastplotter.h" +#include + +#define N1 20 +#define XMAX 10.0 +#define IMAGE_N 300 + + +class TestMain : public QWidget { + Q_OBJECT + public: + explicit TestMain(QWidget *parent = 0); + virtual ~TestMain(); + + signals: + + public slots: + void enableRed(bool enabled); + void enableGreen(bool enabled); + void enableBlue(bool enabled); + + protected: + double* x; + double* y1; + double* y2; + double* y3; + QVector xx; + QVector yy; + QImage img; + double* image; + bool* ovrl; + + double* imageRed; + double* imageGreen; + double* imageBlue; + JKQTFPRGBImageOverlayPlot* prgb; +}; + +#endif // TESTMAIN_H diff --git a/test/jkqtmathtext_simpletest/README.md b/examples/jkqtmathtext_simpletest/README.md similarity index 84% rename from test/jkqtmathtext_simpletest/README.md rename to examples/jkqtmathtext_simpletest/README.md index 6d68cab7e3..6ad6edda05 100644 --- a/test/jkqtmathtext_simpletest/README.md +++ b/examples/jkqtmathtext_simpletest/README.md @@ -1,72 +1,72 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## JKQTmathText -JKQTmathText is a hand-written LaTeX-renderer for Qt (implemented in native C++, using Qt). It supports a large set of standard LaTeX markup and can render it to a QPainter. -## A simple usage example -This project (see `./test/jkqtmathtext_simpletest/`) simply creates a QLabel (as a new window) that displays a rendered LaTeX equation (here the time-dependent Schrödinger equation). -The QMake project looks like this (see [`jkqtmathtext_simpletest.pro`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro): -```qmake -# include JKQTmathText source-code, including the open-source XITS fonts -include(../../lib/jkqtmathtext_with_xits.pri) -SOURCES += jkqtmathtext_simpletest.cpp - -# if you don't want to use the XITS fonts, use this line (and uncomment the -# last two line!): -#include(../../lib/jkqtmathtext.pri) - -CONFIG += qt -QT += core gui -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -TARGET = jkqtmathtext_simpletest -``` -And the soruce code of the main application is (see [`jkqtmathtext_simpletest.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp): -```c++ -#include -#include -#include -#include "jkqtmathtext/jkqtmathtext.h" - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // we use a simple label to display the math text - QLabel lab; - - // 1. we will paint into a QPixmap - QPixmap pix(600,400); - pix.fill(QColor("white")); - QPainter painter; - - // 2. now we create a JKQTmathText object. - // Also we configure the JKQTmathText to use the XITS fonts that - // were included in the *.pro-file - JKQTmathText mathText; - mathText.useXITS(); - mathText.set_fontSize(20); - - // 3. now we parse some LaTeX code (the Schroedinger's equation), so - // we can draw it onto the QPixmap in the next step - mathText.parse("$\\left[-\\frac{\\hbar^2}{2m}\\frac{\\partial^2}{\\partial x^2}+V(x)\\right]\\Psi(x)=\\mathrm{i}\\hbar\\frac{\\partial}{\\partial t}\\Psi(x)$"); - - // 3. here we do the painting - painter.begin(&pix); - mathText.draw(painter, Qt::AlignCenter, QRectF(0,0,pix.width(), pix.height()), false); - painter.end(); - - // now we display and resize the label as a window - lab.setPixmap(pix); - lab.show(); - lab.resize(600,400); - - return app.exec(); -} -``` -The result looks like this: - -![jkqtmathtext_simpletest](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtmathtext_simpletest.png) - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## JKQTmathText +JKQTmathText is a hand-written LaTeX-renderer for Qt (implemented in native C++, using Qt). It supports a large set of standard LaTeX markup and can render it to a QPainter. +## A simple usage example +This project (see `./examples/jkqtmathtext_simpletest/`) simply creates a QLabel (as a new window) that displays a rendered LaTeX equation (here the time-dependent Schrödinger equation). +The QMake project looks like this (see [`jkqtmathtext_simpletest.pro`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro): +```qmake +# include JKQTmathText source-code, including the open-source XITS fonts +include(../../lib/jkqtmathtext_with_xits.pri) +SOURCES += jkqtmathtext_simpletest.cpp + +# if you don't want to use the XITS fonts, use this line (and uncomment the +# last two line!): +#include(../../lib/jkqtmathtext.pri) + +CONFIG += qt +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +TARGET = jkqtmathtext_simpletest +``` +And the soruce code of the main application is (see [`jkqtmathtext_simpletest.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp): +```c++ +#include +#include +#include +#include "jkqtmathtext/jkqtmathtext.h" + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // we use a simple label to display the math text + QLabel lab; + + // 1. we will paint into a QPixmap + QPixmap pix(600,400); + pix.fill(QColor("white")); + QPainter painter; + + // 2. now we create a JKQTmathText object. + // Also we configure the JKQTmathText to use the XITS fonts that + // were included in the *.pro-file + JKQTmathText mathText; + mathText.useXITS(); + mathText.set_fontSize(20); + + // 3. now we parse some LaTeX code (the Schroedinger's equation), so + // we can draw it onto the QPixmap in the next step + mathText.parse("$\\left[-\\frac{\\hbar^2}{2m}\\frac{\\partial^2}{\\partial x^2}+V(x)\\right]\\Psi(x)=\\mathrm{i}\\hbar\\frac{\\partial}{\\partial t}\\Psi(x)$"); + + // 3. here we do the painting + painter.begin(&pix); + mathText.draw(painter, Qt::AlignCenter, QRectF(0,0,pix.width(), pix.height()), false); + painter.end(); + + // now we display and resize the label as a window + lab.setPixmap(pix); + lab.show(); + lab.resize(600,400); + + return app.exec(); +} +``` +The result looks like this: + +![jkqtmathtext_simpletest](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtmathtext_simpletest.png) + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp similarity index 96% rename from test/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp rename to examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp index 189e4366b2..84041eadbf 100644 --- a/test/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp +++ b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp @@ -1,40 +1,40 @@ -#include -#include -#include -#include "jkqtmathtext/jkqtmathtext.h" - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // we use a simple label to display the math text - QLabel lab; - - // 1. we will paint into a QPixmap - QPixmap pix(600,400); - pix.fill(QColor("white")); - QPainter painter; - - // 2. now we create a JKQTmathText object. - // Also we configure the JKQTmathText to use the XITS fonts that - // were included in the *.pro-file - JKQTmathText mathText; - mathText.useXITS(); - mathText.set_fontSize(20); - - // 3. now we parse some LaTeX code (the Schroedinger's equation), so - // we can draw it onto the QPixmap in the next step - mathText.parse("$\\left[-\\frac{\\hbar^2}{2m}\\frac{\\partial^2}{\\partial x^2}+V(x)\\right]\\Psi(x)=\\mathrm{i}\\hbar\\frac{\\partial}{\\partial t}\\Psi(x)$"); - - // 3. here we do the painting - painter.begin(&pix); - mathText.draw(painter, Qt::AlignCenter, QRectF(0,0,pix.width(), pix.height()), false); - painter.end(); - - // now we display and resize the label as a window - lab.setPixmap(pix); - lab.show(); - lab.resize(600,400); - - return app.exec(); -} +#include +#include +#include +#include "jkqtmathtext/jkqtmathtext.h" + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // we use a simple label to display the math text + QLabel lab; + + // 1. we will paint into a QPixmap + QPixmap pix(600,400); + pix.fill(QColor("white")); + QPainter painter; + + // 2. now we create a JKQTmathText object. + // Also we configure the JKQTmathText to use the XITS fonts that + // were included in the *.pro-file + JKQTmathText mathText; + mathText.useXITS(); + mathText.set_fontSize(20); + + // 3. now we parse some LaTeX code (the Schroedinger's equation), so + // we can draw it onto the QPixmap in the next step + mathText.parse("$\\left[-\\frac{\\hbar^2}{2m}\\frac{\\partial^2}{\\partial x^2}+V(x)\\right]\\Psi(x)=\\mathrm{i}\\hbar\\frac{\\partial}{\\partial t}\\Psi(x)$"); + + // 3. here we do the painting + painter.begin(&pix); + mathText.draw(painter, Qt::AlignCenter, QRectF(0,0,pix.width(), pix.height()), false); + painter.end(); + + // now we display and resize the label as a window + lab.setPixmap(pix); + lab.show(); + lab.resize(600,400); + + return app.exec(); +} diff --git a/test/jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro similarity index 56% rename from test/jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro rename to examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro index 16ecebb56c..377019957a 100644 --- a/test/jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro +++ b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro @@ -1,14 +1,18 @@ -TARGET = jkqtmathtext_simpletest -TEMPLATE = app - -SOURCES += jkqtmathtext_simpletest.cpp - -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - - -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib +TARGET = jkqtmathtext_simpletest +TEMPLATE = app + +SOURCES += jkqtmathtext_simpletest.cpp + +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + + +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") diff --git a/test/jkqtmathtext_simpletest/jkqtmathtext_simpletest_and_lib.pro b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest_and_lib.pro similarity index 96% rename from test/jkqtmathtext_simpletest/jkqtmathtext_simpletest_and_lib.pro rename to examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest_and_lib.pro index 6116bb0143..4796840fd9 100644 --- a/test/jkqtmathtext_simpletest/jkqtmathtext_simpletest_and_lib.pro +++ b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtmathtext_simpletest - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtmathtext_simpletest.file=$$PWD/jkqtmathtext_simpletest.pro -jkqtmathtext_simpletest.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtmathtext_simpletest + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtmathtext_simpletest.file=$$PWD/jkqtmathtext_simpletest.pro +jkqtmathtext_simpletest.depends = jkqtplotterlib diff --git a/test/jkqtmathtext_test/asana.pri b/examples/jkqtmathtext_test/asana.pri similarity index 95% rename from test/jkqtmathtext_test/asana.pri rename to examples/jkqtmathtext_test/asana.pri index 64bc7d53f3..28146b3242 100644 --- a/test/jkqtmathtext_test/asana.pri +++ b/examples/jkqtmathtext_test/asana.pri @@ -1 +1 @@ -RESOURCES += asana.qrc +RESOURCES += asana.qrc diff --git a/test/jkqtmathtext_test/asana.qrc b/examples/jkqtmathtext_test/asana.qrc similarity index 100% rename from test/jkqtmathtext_test/asana.qrc rename to examples/jkqtmathtext_test/asana.qrc diff --git a/test/jkqtmathtext_test/asana/Asana-Math.otf b/examples/jkqtmathtext_test/asana/Asana-Math.otf similarity index 100% rename from test/jkqtmathtext_test/asana/Asana-Math.otf rename to examples/jkqtmathtext_test/asana/Asana-Math.otf diff --git a/test/jkqtmathtext_test/asana/Asana-Math.ttf b/examples/jkqtmathtext_test/asana/Asana-Math.ttf similarity index 100% rename from test/jkqtmathtext_test/asana/Asana-Math.ttf rename to examples/jkqtmathtext_test/asana/Asana-Math.ttf diff --git a/test/jkqtmathtext_test/asana/README.txt b/examples/jkqtmathtext_test/asana/README.txt similarity index 100% rename from test/jkqtmathtext_test/asana/README.txt rename to examples/jkqtmathtext_test/asana/README.txt diff --git a/test/jkqtmathtext_test/jkqtmathtext_test.cpp b/examples/jkqtmathtext_test/jkqtmathtext_test.cpp similarity index 97% rename from test/jkqtmathtext_test/jkqtmathtext_test.cpp rename to examples/jkqtmathtext_test/jkqtmathtext_test.cpp index 02e67a7225..b735b15edd 100644 --- a/test/jkqtmathtext_test/jkqtmathtext_test.cpp +++ b/examples/jkqtmathtext_test/jkqtmathtext_test.cpp @@ -1,275 +1,275 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtmathtext/jkqtmathtext.h" -#include "jkqtplottertools/jkqtphighrestimer.h" -#include "testform.h" - - -#define W 2000 -#define H 3000 -#define X1 15 -#define Y1 50 - -/* -HighResTimer ht; - - -double draw(QPainter& painter, double X, double YY, JKQTmathText& mt, QString name) { - double Y=YY; - painter.save(); - ht.start(); - QSizeF s=mt.getSize(painter); - Y=Y+mt.getAscent(painter); - std::cout<<" sizing in "<"+mt.toHtml(&okh)+"


"); - qDebug()<<"HTML1: ---------------------------------------------\n"<"+mt.toHtml(&okh)+"


"); - qDebug()<<"HTML2: ---------------------------------------------\n"<"+mt.toHtml(&okh)+"


"); - qDebug()<<"HTML2: ---------------------------------------------\n"< +#include +#include +#include +#include +#include +#include +#include +#include "jkqtmathtext/jkqtmathtext.h" +#include "jkqtplottertools/jkqtphighrestimer.h" +#include "testform.h" + + +#define W 2000 +#define H 3000 +#define X1 15 +#define Y1 50 + +/* +HighResTimer ht; + + +double draw(QPainter& painter, double X, double YY, JKQTmathText& mt, QString name) { + double Y=YY; + painter.save(); + ht.start(); + QSizeF s=mt.getSize(painter); + Y=Y+mt.getAscent(painter); + std::cout<<" sizing in "<"+mt.toHtml(&okh)+"


"); + qDebug()<<"HTML1: ---------------------------------------------\n"<"+mt.toHtml(&okh)+"


"); + qDebug()<<"HTML2: ---------------------------------------------\n"<"+mt.toHtml(&okh)+"


"); + qDebug()<<"HTML2: ---------------------------------------------\n"< \alpha\beta\gamma\delta\epsilon\Gamma\Delta\Theta\Omega \left\lfloor \left\lceil \cbrt{\hbar\omega}\right\rceil\right\rfloor $ - \item\textbf{chi2 test:} \[\vec{p}^\ast=\argmax\limits_{\vec{p}}\chi^2=\argmax\limits_{\vec{p}}\sum\limits_{i=1}^N\left|\frac{\hat{f}_i-f(x_i;\vec{p})}{\sigma_i}\right|^2\] - \item\textbf{upper/lower parantheses test:} \[ \text{bblabla} \frac{1}{2}\cdot\left(\frac{1}{\mathrm{e}^x+\mathrm{e}^{-x}}\right)\cdot\left(\frac{1}{\frac{1+2}{5+x}}\right)\cdot\left(\frac{1}{\exp\left[-\frac{y^2}{\sqrt{x}}\right]\cdot\exp\left[-\frac{1}{\frac{1}{2}}\right]}\right) \] - \item\textbf{ACF test:} \[g_{rg}^{ab}(\tau)=\frac{1}{N}\cdot\left(1+\frac{2}{3}\frac{\langle r^2(\tau)\rangle}{w_{xy}^2}\right)^{-1}\cdot\left(1+\frac{2}{3}\frac{\langle r^2(\tau)\rangle}{w_{xy}^2}\right)^{-\frac{1}{2}} \] - \item\textbf{MSD test:} \[\mathrm{MSD}(\tau)\equiv\langle r^2(\tau)\rangle=\left\langle (\vec{r}(t)-\vec{r}(t+\tau) )^2\right\rangle=2n\cdot\frac{K_\alpha}{\Gamma(1+\alpha)}\cdot\tau^\alpha \] - \item\textbf{math: blackboard:} \[\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ120} \] - \item\textbf{math: bf:} \[\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ120} \] - \item\textbf{math: rm:} \[\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ120} \] - \item\textbf{math: cal:} \[\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ120} \] - \item\textbf{subscript test:} \[r_{123}\ \ r_{\frac{1}{2}} \] - \item\textbf{subscript0 test:} \[r_{123} \] - \item\textbf{subscript1 test:} \[r_{123}\ \] - \item\textbf{subscript2 test:} \[r_{123}\ \ \] - \item\textbf{subscript3 test:} \[r_{123}r_{\frac{1}{2}} \] - \item\textbf{superscript test:} \[r^{123}\ \ r^{\frac{1}{2}} \] - \item\textbf{superscript0 test:} \[r^{123} \] - \item\textbf{superscript1 test:} \[r^{123}\ \] - \item\textbf{superscript2 test:} \[r^{123}\ \ \] - \item\textbf{superscript3 test:} \[r^{123}r^{\frac{1}{2}} \] - \item\textbf{asuperscript test:} \[a^{123}\ \ a^{\frac{1}{2}} \] - \item\textbf{asuperscript0 test:} \[a^{123} \] - \item\textbf{gsuperscript1 test:} \[g^{123}\ \] - \item\textbf{gsuperscript2 test:} \[g^{123}\ \ \] - \item\textbf{gsuperscript3 test:} \[g^{123}g^{\frac{1}{2}} \] - \item\textbf{frac test:} \[\frac{a}{b}+\frac{g}{a}-\frac{a^2}{b^2}\cdot\frac{a^2}{b^{\frac{1}{2}}} \] - \item\textbf{tfrac test:} \[\tfrac{a}{b}+\tfrac{g}{a}-\tfrac{a^2}{b^2}\cdot\tfrac{a^2}{b^{\tfrac{1}{2}}} \] - \item\textbf{dfrac test:} \[\dfrac{a}{b}+\dfrac{g}{a}-\dfrac{a^2}{b^2}\cdot\dfrac{a^2}{b^{\dfrac{1}{2}}} \] - \item\textbf{stackrel test:} \[\stackrel{a}{b}+\stackrel{g}{a}-\stackrel{a^2}{b^2}\cdot\stackrel{a^2}{b^{\stackrel{1}{2}}} \] - \item\textbf{brace5 test: ( )} \[\left(\left(\left( r^{123}\right)\right)\right) -- \left(\left(\left( r^{123}\right)\right)\right) \] - \item\textbf{brace6 test: [ ]} \[\left[\left[\left[ r^{123}\right]\right]\right] -- \left[\left[\left[ r^{123}\right]\right]\right] \] - \item\textbf{brace7 test: { }} \[\left\{\left\{\left\{ r^{123}\right\}\right\}\right\} -- \left\{\left\{\left\{ r^{123}\right\}\right\}\right\} \] - \item\textbf{brace8 test: || ||} \[\left\|\left\|\left\| r^{123}\right\|\right\|\right\| -- \left\|\left\|\left\| r^{123}\right\|\right\|\right\| \] - \item\textbf{brace9 test: | |} \[\left|\left|\left| r^{123}\right|\right|\right| -- \left|\left|\left| r^{123}\right|\right|\right| \] - \item\textbf{brace10 test} \[\left\{\left[\left( r^{123}\right)\right]\right\} -- \left\{\left[\left( r^{123}\right)\right]\right\} \] - \item\textbf{brace11 test: floor} \[\left\lfloor\left\lfloor\left\lfloor r^{123}\right\rfloor\right\rfloor\right\rfloor -- \left\lfloor\left\lfloor\left\lfloor r^{123}\right\rfloor\right\rfloor\right\rfloor \] - \item\textbf{brace12 test: ceil} \[\left\lceil\left\lceil\left\lceil r^{123}\right\rceil\right\rceil\right\rceil -- \left\lceil\left\lceil\left\lceil r^{123}\right\rceil\right\rceil\right\rceil \] - \item\textbf{sub-, superscript test} \[r^{1234}_{321} r_{321}^{1234} -- r^{1234}_{321} r_{321}^{1234} -- \kappa^2 -- \kappa_2 -- \kappa_2^2 \] - \item\textbf{super-, subscript test} \[r^{123}_{4321} r_{4321}^{123} -- r^{123}_{4321} r_{4321}^{123} -- \kappa^2 -- \kappa_2 -- \kappa_2^2 \] - - \item\textbf{math 1:} \[f(x)=\int_{-\infty}^xe^{-t^2}\;\mathrm{d}t \] - \item\textbf{math 2:} \[\sum_{i=1}^\infty\frac{-e^{i\pi}}{2^n} \] - \item\textbf{math 3:} \[\mbox{det} \begin{pmatrix} 1 & x_1 & \ldots & x_1^{n-1} \\ 1 & x_2 & \ldots & x_2^{n-1} \\ \vdots & \vdots & \ddots & \vdots \\ 1 & x_n & \ldots & x_n^{n-1} \end{pmatrix} = \prod_{1 \leq i < j \leq n} (x_j - x_i) \] - \item\textbf{math 4:} \[\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+x}}}}}} \] - \item\textbf{math 5:} \[\left(\stackrel{p}{2}\right)=x^2y^{p-2}-\frac{1}{1-x}\frac{1}{1-x^2} \] - \item\textbf{math 6:} \[a_0+\frac{1}{a_1+\frac{1}{a_2+\frac{1}{a_3+\frac{1}{a_4}}}} \] - \item\textbf{math 7:} \[\left(\frac{\partial^2}{\partial x^2}+\frac{\partial^2}{\partial y^2}\right)\left|\varphi(x+\mathrm{i}y)\right|^2=0 \] - \item\textbf{math 8:} \[2^{2^{2^{x}}} \] - \item\textbf{math 9:} \[\iint_Df(x,y)\;\mathrm{d}x\;\mathrm{d}y \] - \item\textbf{math 10 (overbrace):} \[\overbrace{x+x+...+x}{k\ \mathrm{times}} \] - \item\textbf{math 11 (underbrace):} \[\underbrace{x+x+...+x}{k\ \mathrm{times}} \] - \item\textbf{math 12 (under/overbrace):} \[\underbrace{\overbrace{x+x+...+x}{k\ \mathrm{times}} \overbrace{x+x+...+x}{k\ \mathrm{times}}}{2k\ \mathrm{times}} \] - \item\textbf{math 13:} \[y_1''\ \ \ y_2''' \] - \item\textbf{math 14:} \[f(x)=\begin{cases} 1/3 & \mathrm{if}\ 0\leq x\leq1 \\ 2/3 & \mathrm{if}\ 3\leq x\leq4 \\0 & \mathrm{elsewhere} \end{cases} \] - \item\textbf{math 15:} \[\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2}\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}. \] - \item\textbf{math 16:} \[\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n}{3^m\left(m\,3^n+n\,3^m\right)} \] - \item\textbf{math 17:} \[\phi_n(\kappa) =\frac{1}{4\pi^2\kappa^2} \int_0^\infty\frac{\sin(\kappa R)}{\kappa R}\frac{\partial}{\partial R}\left[R^2\frac{\partial D_n(R)}{\partial R}\right]\,dR \] - \item\textbf{math 18:} \[{}_pF_q(a_1,\dots,a_p;c_1,\dots,c_q;z)= \sum_{n=0}^\infty\frac{(a_1)_n\cdots(a_p)_n}{(c_1)_n\cdots(c_q)_n}\frac{z^n}{n!} \] - \item\textbf{math 19 (overset):} \[X \overset{=}{def} Y\ \ \ \ \ X \overset{=}{!} Y\ \ \ \ \ X \overset{\rightarrow}{f} Y\ \ \ \ \ \frac{f(x+\Delta x)-f(x)}{\Delta x}\overset{\longrightarrow}{\Delta x\to 0}f'(x) \] - \item\textbf{math 20 (underset):} \[X \underset{=}{\text{def (5)}} Y\ \ \ \ \ X \underset{\rightarrow}{f} Y\ \ \ \ \ \frac{f(x+\Delta x)-f(x)}{\Delta x}\underset{\longrightarrow}{\Delta x\to 0}f'(x) \] - \item\textbf{axiom of power test:} \[\forall A \, \exists P \, \forall B \, [B \in P \iff \forall C \, (C \in B \Rightarrow C \in A)] \] - \item\textbf{De Morgan's law:} $\neg(P\land Q)\iff(\neg P)\lor(\neg Q)$ or $\overline{\bigcap_{i \in I} A_{i}}\equiv\bigcup_{i \in I} \overline{A_{i}}$ or $\overline{A \cup B}\equiv\overline{A} \cap \overline{B} $ - \item\textbf{quadratic formula:} \[x=\frac{-b \pm \sqrt{b^2-4ac}}{2a} \] - \item\textbf{combination:} \[\binom{n}{k} = \frac{n(n-1)...(n-k+1)}{k(k-1)\dots1}=\frac{n!}{k!(n-k)!} \] - \item\textbf{Sophomore's dream 1:} \[\int_0^1 x^{-x}\,dx = \sum_{n=1}^\infty n^{-n}(\scriptstyle{= 1.29128599706266354040728259059560054149861936827\dots)} \] - \item\textbf{Sophomore's dream 2:} \[\int_0^1 x^x \,dx = \sum_{n=1}^\infty (-1)^{n+1}n^{-n} = - \sum_{n=1}^\infty (-n)^{-n} (\scriptstyle{= 0.78343051071213440705926438652697546940768199014\dots}) \] - \item\textbf{divergence 1:} \[\operatorname{div}\vec{F} = \nabla\cdot\vec{F}=\frac{\partial U}{\partial x}+\frac{\partial V}{\partial y}+\frac{\partial W}{\partial z} \] - \item\textbf{divergence 2:} \[\overrightarrow{\operatorname{div}}\,(\mathbf{\underline{\underline{\epsilon}}}) = - \begin{bmatrix} - \frac{\partial \epsilon_{xx}}{\partial x} +\frac{\partial \epsilon_{yx}}{\partial y} +\frac{\partial \epsilon_{zx}}{\partial z} \\ - \frac{\partial \epsilon_{xy}}{\partial x} +\frac{\partial \epsilon_{yy}}{\partial y} +\frac{\partial \epsilon_{zy}}{\partial z} \\ - \frac{\partial \epsilon_{xz}}{\partial x} +\frac{\partial \epsilon_{yz}}{\partial y} +\frac{\partial \epsilon_{zz}}{\partial z} - \end{bmatrix} \] - \item\textbf{lim, sum ...:} \[\lim_{x\to\infty} f(x) = \binom{k}{r} + \frac{a}{b} \sum_{n=1}^\infty a_n + \displaystyle{ \left\{ \frac{1}{13} \sum_{n=1}^\infty b_n \right\} }. \] - %\item\textbf{array test:} \[ f(x) := \left\{\begin{array}[ll] x^2\sin\frac{1}{x} & \text{if} x \ne 0, \\ 0 & \text{if } x = 0 . \end{array}\right. \] - \item\textbf{Schwinger-Dyson:} \[\left\langle\psi\left|\mathcal{T}\{F \phi^j\}\right|\psi\right\rangle=\left\langle\psi\left|\mathcal{T}\{iF_{,i}D^{ij}-FS_{int,i}D^{ij}\}\right|\psi\right\rangle. \] - \item\textbf{Schrödinger's equation:} \[\left[-\frac{\hbar^2}{-2m}\frac{\partial^2}{\partial x^2}+V\right]\Psi(x)=i\hbar\frac{\partial}{\partial t}\Psi(x) \] - \item\textbf{Cauchy-Schwarz inequality:} \[\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \] - \item\textbf{Maxwell's equations:} \[\begin{aligned}\nabla \times \vec{\mathbf{B}} -\, \frac{1}{c}\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\\nabla \times \vec{\mathbf{E}}\, +\, \frac{1}{c}\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\\nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} \] - - \end{itemize} - + +\documentclass[a4paper]{scrartcl} + +%% Deutsche Anpassungen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[ngerman]{babel} +\usepackage[ansinew]{inputenc} +\usepackage{ulem} +\usepackage{mathtools} +\usepackage{esint} +%\usepackage{txfonts} +\usepackage[landscape]{geometry} +\usepackage{amsmath} +\usepackage{amssymb} + +\newcommand{\cbrt}[1]{\sqrt[3]{#1}} + +\newcommand{\bbC}{\mathbb{C}} +\newcommand{\bbH}{\mathbb{H}} +\newcommand{\bbN}{\mathbb{N}} +\newcommand{\bbP}{\mathbb{P}} +\newcommand{\bbQ}{\mathbb{Q}} +\newcommand{\bbZ}{\mathbb{Z}} +\newcommand{\bbR}{\mathbb{R}} +\newcommand{\Angstrom}{\r{A}} +\newcommand{\lefrighttharpoons}{\rightleftharpoons} +\newcommand{\subsetnot}{\not\subset} +\newcommand{\argmax}{\operatorname*{arg\,max}} + + +\newcommand{\va}{\vec{a}} +\newcommand{\vr}{\vec{r}} +\newcommand{\vR}{\vec{R}} +\newcommand{\argmin}{\mbox{arg\:min}} +\newcommand{\uul}[1]{\uuline{#1}} +\newcommand{\ool}[1]{\overline{\overline{#1}}} +\newcommand{\arrow}[1]{\overrightarrow{#1}} +\begin{document} + \begin{itemize} + +\item\textbf{std dev:} \[\sigma_x=\sqrt{\langle (x-\langle x\rangle)^2\rangle}=\sqrt{\frac{1}{N-1}\cdot\left( \sum_{i=1}^N{x_i}^2-\frac{1}{N}\cdot\left(\sum_{i=1}^Nx_i\right)^2\right)} \] + \item\textbf{std dev 2:} \[\sigma_x=\sqrt{\langle (x-\langle x\rangle)^2\rangle}=\sqrt{\frac{1}{N-1}\cdot\left( \sum_{i=1}^Nx_i^2-\frac{1}{N}\cdot\left(\sum_{i=1}^Nx_i\right)^2\right)} \] + \item\textbf{rotation matrix:} \[\mathrm{\mathbf{M}}(\alpha) = \left(\begin{matrix}\cos(\alpha)+n_x^2\cdot (1-\cos(\alpha)) & n_x\cdot n_y\cdot (1-\cos(\alpha))-n_z\cdot \sin(\alpha) & n_x\cdot n_z\cdot (1-\cos(\alpha))+n_y\cdot \sin(\alpha)\\n_x\cdot n_y\cdot (1-\cos(\alpha))+n_z\cdot \sin(\alpha) & \cos(\alpha)+n_y^2\cdot (1-\cos(\alpha)) & n_y\cdot n_z\cdot (1-\cos(\alpha))-n_x\cdot \sin(\alpha)\\n_z\cdot n_x\cdot (1-\cos(\alpha))-n_y\cdot \sin(\alpha) & n_z\cdot n_y\cdot (1-\cos(\alpha))+n_x\cdot \sin(\alpha) & \cos(\alpha)+n_z^2\cdot (1-\cos(\alpha))\end{matrix}\right) \] + \item\textbf{like in label at bottom (no MM):} \[\left(\left[\sqrt{2\pi\cdot\int_{-\infty}^\infty f(x)\;\mathrm{d}x}\right]\right) \] + \item\textbf{like in label at bottom (MM):} \[\left(\left[\sqrt{2\pi\cdot\int_{-\infty}^\infty f(x)\;\mathrm{d}x}\right]\right) \] + \item\textbf{decoration:} \[\vec{x}\vec{X}\vec{\psi} -- \dot{x}\dot{X}\dot{\psi} -- \ddot{x}\ddot{X}\ddot{\psi} -- \overline{x}\overline{X}\overline{\psi} -- \underline{x}\underline{X}\underline{\psi} -- \hat{x}\hat{X}\hat{\psi} -- \tilde{x}\tilde{X}\tilde{\psi} -- \uul{x}\uul{X}\uul{\psi} -- \ool{x}\ool{X}\ool{\psi} -- \bar{x}\bar{X}\bar{\psi} -- \arrow{x}\arrow{X}\arrow{\psi} \] + \item\textbf{mathtest:}\\ This is normal text: $this is math:\langle r^2(\tau)\rangle=\left\langle (\vec{r}(t)-\vec{r}(t+\tau) )^2\right\rangle\ \ \ g(\tau)=\frac{1}{N}\cdot\left(1+\frac{2}{3}\frac{\langle r^2(\tau)\rangle}{w_{xy}^2}\right)^{-1} \lfloor\rfloor\lceil\rceil\langle\rangle\left\{\va\left|\|\va\|_2\geq2\right.\right\} \vr\vR$\\$\frac{\sqrt{\sqrt{\sqrt{\sum_{i=0}^\infty \hat{i}^2}+y^\alpha}+1}}{\dot{v}\equiv\ddot{r}}\argmin_{\vec{k}}\sum_{\sqrt{i}=0}^{N}\int_{x_0}^{x_1}\left(\left(\left(x\right)\right)\right)\underbrace{\left[\left\{\frac{\partial f}{\partial x}\right\}\cdot\frac{1}{2}\right]}{\text{underbraced text $\hbar$}}\cdots\frac{\sqrt{\sum_{i=0}^2 \hat{i}^2}+y^\alpha}{\dot{v}\equiv\ddot{r}}, \hat{t}\hat{T} \overbrace{\left|\sqrt{x\cdot Y}\right|}{\propto\bbN\circ\bbZ}$\\$\left<\arrow{x(\tau)}\cdot\vec{R}(t+\bar{\tau})\right> \alpha\beta\gamma\delta\epsilon\Gamma\Delta\Theta\Omega \left\lfloor \left\lceil \cbrt{\hbar\omega}\right\rceil\right\rfloor $ + \item\textbf{chi2 test:} \[\vec{p}^\ast=\argmax\limits_{\vec{p}}\chi^2=\argmax\limits_{\vec{p}}\sum\limits_{i=1}^N\left|\frac{\hat{f}_i-f(x_i;\vec{p})}{\sigma_i}\right|^2\] + \item\textbf{upper/lower parantheses test:} \[ \text{bblabla} \frac{1}{2}\cdot\left(\frac{1}{\mathrm{e}^x+\mathrm{e}^{-x}}\right)\cdot\left(\frac{1}{\frac{1+2}{5+x}}\right)\cdot\left(\frac{1}{\exp\left[-\frac{y^2}{\sqrt{x}}\right]\cdot\exp\left[-\frac{1}{\frac{1}{2}}\right]}\right) \] + \item\textbf{ACF test:} \[g_{rg}^{ab}(\tau)=\frac{1}{N}\cdot\left(1+\frac{2}{3}\frac{\langle r^2(\tau)\rangle}{w_{xy}^2}\right)^{-1}\cdot\left(1+\frac{2}{3}\frac{\langle r^2(\tau)\rangle}{w_{xy}^2}\right)^{-\frac{1}{2}} \] + \item\textbf{MSD test:} \[\mathrm{MSD}(\tau)\equiv\langle r^2(\tau)\rangle=\left\langle (\vec{r}(t)-\vec{r}(t+\tau) )^2\right\rangle=2n\cdot\frac{K_\alpha}{\Gamma(1+\alpha)}\cdot\tau^\alpha \] + \item\textbf{math: blackboard:} \[\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ120} \] + \item\textbf{math: bf:} \[\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ120} \] + \item\textbf{math: rm:} \[\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ120} \] + \item\textbf{math: cal:} \[\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ120} \] + \item\textbf{subscript test:} \[r_{123}\ \ r_{\frac{1}{2}} \] + \item\textbf{subscript0 test:} \[r_{123} \] + \item\textbf{subscript1 test:} \[r_{123}\ \] + \item\textbf{subscript2 test:} \[r_{123}\ \ \] + \item\textbf{subscript3 test:} \[r_{123}r_{\frac{1}{2}} \] + \item\textbf{superscript test:} \[r^{123}\ \ r^{\frac{1}{2}} \] + \item\textbf{superscript0 test:} \[r^{123} \] + \item\textbf{superscript1 test:} \[r^{123}\ \] + \item\textbf{superscript2 test:} \[r^{123}\ \ \] + \item\textbf{superscript3 test:} \[r^{123}r^{\frac{1}{2}} \] + \item\textbf{asuperscript test:} \[a^{123}\ \ a^{\frac{1}{2}} \] + \item\textbf{asuperscript0 test:} \[a^{123} \] + \item\textbf{gsuperscript1 test:} \[g^{123}\ \] + \item\textbf{gsuperscript2 test:} \[g^{123}\ \ \] + \item\textbf{gsuperscript3 test:} \[g^{123}g^{\frac{1}{2}} \] + \item\textbf{frac test:} \[\frac{a}{b}+\frac{g}{a}-\frac{a^2}{b^2}\cdot\frac{a^2}{b^{\frac{1}{2}}} \] + \item\textbf{tfrac test:} \[\tfrac{a}{b}+\tfrac{g}{a}-\tfrac{a^2}{b^2}\cdot\tfrac{a^2}{b^{\tfrac{1}{2}}} \] + \item\textbf{dfrac test:} \[\dfrac{a}{b}+\dfrac{g}{a}-\dfrac{a^2}{b^2}\cdot\dfrac{a^2}{b^{\dfrac{1}{2}}} \] + \item\textbf{stackrel test:} \[\stackrel{a}{b}+\stackrel{g}{a}-\stackrel{a^2}{b^2}\cdot\stackrel{a^2}{b^{\stackrel{1}{2}}} \] + \item\textbf{brace5 test: ( )} \[\left(\left(\left( r^{123}\right)\right)\right) -- \left(\left(\left( r^{123}\right)\right)\right) \] + \item\textbf{brace6 test: [ ]} \[\left[\left[\left[ r^{123}\right]\right]\right] -- \left[\left[\left[ r^{123}\right]\right]\right] \] + \item\textbf{brace7 test: { }} \[\left\{\left\{\left\{ r^{123}\right\}\right\}\right\} -- \left\{\left\{\left\{ r^{123}\right\}\right\}\right\} \] + \item\textbf{brace8 test: || ||} \[\left\|\left\|\left\| r^{123}\right\|\right\|\right\| -- \left\|\left\|\left\| r^{123}\right\|\right\|\right\| \] + \item\textbf{brace9 test: | |} \[\left|\left|\left| r^{123}\right|\right|\right| -- \left|\left|\left| r^{123}\right|\right|\right| \] + \item\textbf{brace10 test} \[\left\{\left[\left( r^{123}\right)\right]\right\} -- \left\{\left[\left( r^{123}\right)\right]\right\} \] + \item\textbf{brace11 test: floor} \[\left\lfloor\left\lfloor\left\lfloor r^{123}\right\rfloor\right\rfloor\right\rfloor -- \left\lfloor\left\lfloor\left\lfloor r^{123}\right\rfloor\right\rfloor\right\rfloor \] + \item\textbf{brace12 test: ceil} \[\left\lceil\left\lceil\left\lceil r^{123}\right\rceil\right\rceil\right\rceil -- \left\lceil\left\lceil\left\lceil r^{123}\right\rceil\right\rceil\right\rceil \] + \item\textbf{sub-, superscript test} \[r^{1234}_{321} r_{321}^{1234} -- r^{1234}_{321} r_{321}^{1234} -- \kappa^2 -- \kappa_2 -- \kappa_2^2 \] + \item\textbf{super-, subscript test} \[r^{123}_{4321} r_{4321}^{123} -- r^{123}_{4321} r_{4321}^{123} -- \kappa^2 -- \kappa_2 -- \kappa_2^2 \] + + \item\textbf{math 1:} \[f(x)=\int_{-\infty}^xe^{-t^2}\;\mathrm{d}t \] + \item\textbf{math 2:} \[\sum_{i=1}^\infty\frac{-e^{i\pi}}{2^n} \] + \item\textbf{math 3:} \[\mbox{det} \begin{pmatrix} 1 & x_1 & \ldots & x_1^{n-1} \\ 1 & x_2 & \ldots & x_2^{n-1} \\ \vdots & \vdots & \ddots & \vdots \\ 1 & x_n & \ldots & x_n^{n-1} \end{pmatrix} = \prod_{1 \leq i < j \leq n} (x_j - x_i) \] + \item\textbf{math 4:} \[\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+x}}}}}} \] + \item\textbf{math 5:} \[\left(\stackrel{p}{2}\right)=x^2y^{p-2}-\frac{1}{1-x}\frac{1}{1-x^2} \] + \item\textbf{math 6:} \[a_0+\frac{1}{a_1+\frac{1}{a_2+\frac{1}{a_3+\frac{1}{a_4}}}} \] + \item\textbf{math 7:} \[\left(\frac{\partial^2}{\partial x^2}+\frac{\partial^2}{\partial y^2}\right)\left|\varphi(x+\mathrm{i}y)\right|^2=0 \] + \item\textbf{math 8:} \[2^{2^{2^{x}}} \] + \item\textbf{math 9:} \[\iint_Df(x,y)\;\mathrm{d}x\;\mathrm{d}y \] + \item\textbf{math 10 (overbrace):} \[\overbrace{x+x+...+x}{k\ \mathrm{times}} \] + \item\textbf{math 11 (underbrace):} \[\underbrace{x+x+...+x}{k\ \mathrm{times}} \] + \item\textbf{math 12 (under/overbrace):} \[\underbrace{\overbrace{x+x+...+x}{k\ \mathrm{times}} \overbrace{x+x+...+x}{k\ \mathrm{times}}}{2k\ \mathrm{times}} \] + \item\textbf{math 13:} \[y_1''\ \ \ y_2''' \] + \item\textbf{math 14:} \[f(x)=\begin{cases} 1/3 & \mathrm{if}\ 0\leq x\leq1 \\ 2/3 & \mathrm{if}\ 3\leq x\leq4 \\0 & \mathrm{elsewhere} \end{cases} \] + \item\textbf{math 15:} \[\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2}\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}. \] + \item\textbf{math 16:} \[\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n}{3^m\left(m\,3^n+n\,3^m\right)} \] + \item\textbf{math 17:} \[\phi_n(\kappa) =\frac{1}{4\pi^2\kappa^2} \int_0^\infty\frac{\sin(\kappa R)}{\kappa R}\frac{\partial}{\partial R}\left[R^2\frac{\partial D_n(R)}{\partial R}\right]\,dR \] + \item\textbf{math 18:} \[{}_pF_q(a_1,\dots,a_p;c_1,\dots,c_q;z)= \sum_{n=0}^\infty\frac{(a_1)_n\cdots(a_p)_n}{(c_1)_n\cdots(c_q)_n}\frac{z^n}{n!} \] + \item\textbf{math 19 (overset):} \[X \overset{=}{def} Y\ \ \ \ \ X \overset{=}{!} Y\ \ \ \ \ X \overset{\rightarrow}{f} Y\ \ \ \ \ \frac{f(x+\Delta x)-f(x)}{\Delta x}\overset{\longrightarrow}{\Delta x\to 0}f'(x) \] + \item\textbf{math 20 (underset):} \[X \underset{=}{\text{def (5)}} Y\ \ \ \ \ X \underset{\rightarrow}{f} Y\ \ \ \ \ \frac{f(x+\Delta x)-f(x)}{\Delta x}\underset{\longrightarrow}{\Delta x\to 0}f'(x) \] + \item\textbf{axiom of power test:} \[\forall A \, \exists P \, \forall B \, [B \in P \iff \forall C \, (C \in B \Rightarrow C \in A)] \] + \item\textbf{De Morgan's law:} $\neg(P\land Q)\iff(\neg P)\lor(\neg Q)$ or $\overline{\bigcap_{i \in I} A_{i}}\equiv\bigcup_{i \in I} \overline{A_{i}}$ or $\overline{A \cup B}\equiv\overline{A} \cap \overline{B} $ + \item\textbf{quadratic formula:} \[x=\frac{-b \pm \sqrt{b^2-4ac}}{2a} \] + \item\textbf{combination:} \[\binom{n}{k} = \frac{n(n-1)...(n-k+1)}{k(k-1)\dots1}=\frac{n!}{k!(n-k)!} \] + \item\textbf{Sophomore's dream 1:} \[\int_0^1 x^{-x}\,dx = \sum_{n=1}^\infty n^{-n}(\scriptstyle{= 1.29128599706266354040728259059560054149861936827\dots)} \] + \item\textbf{Sophomore's dream 2:} \[\int_0^1 x^x \,dx = \sum_{n=1}^\infty (-1)^{n+1}n^{-n} = - \sum_{n=1}^\infty (-n)^{-n} (\scriptstyle{= 0.78343051071213440705926438652697546940768199014\dots}) \] + \item\textbf{divergence 1:} \[\operatorname{div}\vec{F} = \nabla\cdot\vec{F}=\frac{\partial U}{\partial x}+\frac{\partial V}{\partial y}+\frac{\partial W}{\partial z} \] + \item\textbf{divergence 2:} \[\overrightarrow{\operatorname{div}}\,(\mathbf{\underline{\underline{\epsilon}}}) = + \begin{bmatrix} + \frac{\partial \epsilon_{xx}}{\partial x} +\frac{\partial \epsilon_{yx}}{\partial y} +\frac{\partial \epsilon_{zx}}{\partial z} \\ + \frac{\partial \epsilon_{xy}}{\partial x} +\frac{\partial \epsilon_{yy}}{\partial y} +\frac{\partial \epsilon_{zy}}{\partial z} \\ + \frac{\partial \epsilon_{xz}}{\partial x} +\frac{\partial \epsilon_{yz}}{\partial y} +\frac{\partial \epsilon_{zz}}{\partial z} + \end{bmatrix} \] + \item\textbf{lim, sum ...:} \[\lim_{x\to\infty} f(x) = \binom{k}{r} + \frac{a}{b} \sum_{n=1}^\infty a_n + \displaystyle{ \left\{ \frac{1}{13} \sum_{n=1}^\infty b_n \right\} }. \] + %\item\textbf{array test:} \[ f(x) := \left\{\begin{array}[ll] x^2\sin\frac{1}{x} & \text{if} x \ne 0, \\ 0 & \text{if } x = 0 . \end{array}\right. \] + \item\textbf{Schwinger-Dyson:} \[\left\langle\psi\left|\mathcal{T}\{F \phi^j\}\right|\psi\right\rangle=\left\langle\psi\left|\mathcal{T}\{iF_{,i}D^{ij}-FS_{int,i}D^{ij}\}\right|\psi\right\rangle. \] + \item\textbf{Schrödinger's equation:} \[\left[-\frac{\hbar^2}{-2m}\frac{\partial^2}{\partial x^2}+V\right]\Psi(x)=i\hbar\frac{\partial}{\partial t}\Psi(x) \] + \item\textbf{Cauchy-Schwarz inequality:} \[\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \] + \item\textbf{Maxwell's equations:} \[\begin{aligned}\nabla \times \vec{\mathbf{B}} -\, \frac{1}{c}\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\\nabla \times \vec{\mathbf{E}}\, +\, \frac{1}{c}\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\\nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} \] + + \end{itemize} + \end{document} \ No newline at end of file diff --git a/test/jkqtmathtext_test/testform.cpp b/examples/jkqtmathtext_test/testform.cpp similarity index 98% rename from test/jkqtmathtext_test/testform.cpp rename to examples/jkqtmathtext_test/testform.cpp index 196693bc16..7ee6308847 100644 --- a/test/jkqtmathtext_test/testform.cpp +++ b/examples/jkqtmathtext_test/testform.cpp @@ -1,387 +1,387 @@ -#include "testform.h" -#include "ui_testform.h" -#include - - -TestForm::TestForm(QWidget *parent) : - QWidget(parent), - ui(new Ui::TestForm) -{ - ui->setupUi(this); - ui->cmbTestset->addItem("simple relations", "$a{\\leq}b$, $a{\\geq}b$, $a{\\equiv}b$, $a=b$, $a{\\neq}b$, $ab$"); - ui->cmbTestset->addItem("simple relations in different modes", "math: $a{\\leq}b$, math/no braces: $a\\leq b$, no math: a{\\leq}b, no math/no braces: a\\leq b"); - ui->cmbTestset->addItem("named symbols 1", "ll: $\\ll$\\ gg: $\\gg$\\ leq: $\\leq$\\ geq: $\\geq$\\ pm: $\\pm$\\ mp: $\\mp$\\ "); - ui->cmbTestset->addItem("named symbols 2", "nexists: $\\nexists$\\ ni: $\\ni$\\ notni: $\\notni$\\ circ: $\\circ$\\ sim: $\\sim$\\ emptyset: $\\emptyset$\\ odot: $\\odot$\\ ominus: $\\ominus$\\ subsetnot: $\\subsetnot$\\ bot: $\\bot$"); - ui->cmbTestset->addItem("named symbols 3", "leftharpoonup: $\\leftharpoonup$\\ rightharpoonup: $\\rightharpoonup$\\ upharpoonleft: $\\upharpoonleft$\\ downharpoonleft: $\\downharpoonleft$\\ leftrightharpoon: $\\leftrightharpoon$\\ rightleftharpoon: $\\rightleftharpoon$"); - ui->cmbTestset->addItem("named symbols 4", "coprod: $\\coprod$\\ leftharpoondown: $\\leftharpoondown$\\ rightharpoondown: $\\rightharpoondown$\\ upharpoonright: $\\upharpoonright$\\ downharpoonright: $\\downharpoonright$\\ nwarrow: $\\nwarrow$\\ nearrow: $\\nearrow$\\ "); - ui->cmbTestset->addItem("named symbols 5", "searrow: $\\searrow$\\ swarrow: $\\swarrow$\\ mapsto: $\\mapsto$\\ div: $\\div$\\ multimap: $\\multimap$\\ maporiginal: $\\maporiginal$\\ mapimage: $\\mapimage$\\ "); - ui->cmbTestset->addItem("named symbols 6", "times: $\\times$\\ propto: $\\propto$\\ bullet: $\\bullet$\\ neq: $\\neq$\\ ne: $\\ne$\\ equiv: $\\equiv$\\ approx: $\\approx$\\ otimes: $\\otimes$\\ oplus: $\\oplus$"); - ui->cmbTestset->addItem("named symbols 7", "oslash: $\\oslash$\\ cap: $\\cap$\\ land: $\\land$\\ cup: $\\cup$\\ lor: $\\lor$\\ supset: $\\supset$\\ supseteq: $\\supseteq$\\ supsetnot: $\\supsetnot$\\ subset: $\\subset$"); - ui->cmbTestset->addItem("named symbols 8", "subseteq: $\\subseteq$\\ in: $\\in$\\ notin: $\\notin$\\ cdot: $\\cdot$\\ wedge: $\\wedge$\\ vee: $\\vee$\\ cong: $\\cong$\\ bot: $\\bot$"); - ui->cmbTestset->addItem("symbols", "$\\ll\\gg\\leq\\geq\\leftrightarrow\\leftarrow\\rightarrow\\to\\uparrow\\downarrow\\updownarrow\\Leftrightarrow\\iff\\Leftarrow\\Rightarrow\\Uparrow\\Downarrow\\Updownarrow\\pm\\mp\\nexists\\ni\\notni\\circ\\sim\\emptyset\\odot\\ominus\\subsetnot\\bot\\leftharpoonup\\rightharpoonup\\upharpoonleft\\downharpoonleft\\leftrightharpoon\\rightleftharpoon\\coprod\\leftharpoondown\\rightharpoondown\\upharpoonright\\downharpoonright\\nwarrow\\nearrow\\searrow\\swarrow\\mapsto\\div\\multimap\\maporiginal\\mapimage\\times\\propto\\bullet\\neq\\ne\\equiv\\approx\\otimes\\oplus\\oslash\\cap\\land\\cup\\lor\\supset\\supseteq\\supsetnot\\subset\\subseteq\\in\\notin\\cdot\\wedge\\vee\\cong\\bot$"); - ui->cmbTestset->addItem("std dev", "$\\sigma_x=\\sqrt{\\langle (x-\\langle x\\rangle)^2\\rangle}=\\sqrt{\\frac{1}{N-1}\\cdot\\left( \\sum_{i=1}^N{x_i}^2-\\frac{1}{N}\\cdot\\left(\\sum_{i=1}^Nx_i\\right)^2\\right)}$"); - ui->cmbTestset->addItem("std dev 2", "$\\sigma_x=\\sqrt{\\langle (x-\\langle x\\rangle)^2\\rangle}=\\sqrt{\\frac{1}{N-1}\\cdot\\left( \\sum_{i=1}^Nx_i^2-\\frac{1}{N}\\cdot\\left(\\sum_{i=1}^Nx_i\\right)^2\\right)}$"); - ui->cmbTestset->addItem("rotation matrix", "$\\mathrm{\\mathbf{M}}(\\alpha) = \\left(\\begin{matrix}\\cos(\\alpha)+n_x^2\\cdot (1-\\cos(\\alpha)) & n_x\\cdot n_y\\cdot (1-\\cos(\\alpha))-n_z\\cdot \\sin(\\alpha) & n_x\\cdot n_z\\cdot (1-\\cos(\\alpha))+n_y\\cdot \\sin(\\alpha)\\\\n_x\\cdot n_y\\cdot (1-\\cos(\\alpha))+n_z\\cdot \\sin(\\alpha) & \\cos(\\alpha)+n_y^2\\cdot (1-\\cos(\\alpha)) & n_y\\cdot n_z\\cdot (1-\\cos(\\alpha))-n_x\\cdot \\sin(\\alpha)\\\\n_z\\cdot n_x\\cdot (1-\\cos(\\alpha))-n_y\\cdot \\sin(\\alpha) & n_z\\cdot n_y\\cdot (1-\\cos(\\alpha))+n_x\\cdot \\sin(\\alpha) & \\cos(\\alpha)+n_z^2\\cdot (1-\\cos(\\alpha))\\end{matrix}\\right)$"); - ui->cmbTestset->addItem("like in label at bottom (no MM)", "\\left(\\left[\\sqrt{2\\pi\\cdot\\int_{-\\infty}^\\infty f(x)\\;\\mathrm{d}x}\\right]\\right)"); - ui->cmbTestset->addItem("like in label at bottom (MM)", "$\\left(\\left[\\sqrt{2\\pi\\cdot\\int_{-\\infty}^\\infty f(x)\\;\\mathrm{d}x}\\right]\\right)$"); - ui->cmbTestset->addItem("text 0", "text"); - ui->cmbTestset->addItem("text 1", "text \\mathbf{bold}"); - ui->cmbTestset->addItem("text 2", "text \\mathbf{bold}\\textcolor{red}{RED}"); - ui->cmbTestset->addItem("decoration", "$\\vec{x}\\vec{X}\\vec{\\psi} -- \\dot{x}\\dot{X}\\dot{\\psi} -- \\ddot{x}\\ddot{X}\\ddot{\\psi} -- \\overline{x}\\overline{X}\\overline{\\psi} -- \\underline{x}\\underline{X}\\underline{\\psi} -- \\hat{x}\\hat{X}\\hat{\\psi} -- \\tilde{x}\\tilde{X}\\tilde{\\psi} -- \\uul{x}\\uul{X}\\uul{\\psi} -- \\ool{x}\\ool{X}\\ool{\\psi} -- \\bar{x}\\bar{X}\\bar{\\psi} -- \\arrow{x}\\arrow{X}\\arrow{\\psi}$"); - ui->cmbTestset->addItem("mathtest", "This is normal text: $this is math:\\langle r^2(\\tau)\\rangle=\\left\\langle (\\vec{r}(t)-\\vec{r}(t+\\tau) )^2\\right\\rangle\\ \\ \\ g(\\tau)=\\frac{1}{N}\\cdot\\left(1+\\frac{2}{3}\\frac{\\langle r^2(\\tau)\\rangle}{w_{xy}^2}\\right)^{-1} \\lfloor\\rfloor\\lceil\\rceil\\langle\\rangle\\left\\{\\va\\left|\\|\\va\\|_2\\geq2\\right.\\right\\} \\vr\\vR\\frac{\\sqrt{\\sqrt{\\sqrt{\\sum_{i=0}^\\infty \\hat{i}^2}+y^\\alpha}+1}}{\\dot{v}\\equiv\\ddot{r}}\\argmin_{\\vec{k}}\\sum_{\\sqrt{i}=0}^{N}\\int_{x_0}^{x_1}\\left(\\left(\\left(x\\right)\\right)\\right)\\underbrace{\\left[\\left\\{\\frac{\\partial f}{\\partial x}\\right\\}\\cdot\\frac{1}{2}\\right]}{\\text{underbraced text \\hbar}}\\cdots\\frac{\\sqrt{\\sum_{i=0}^2 \\hat{i}^2}+y^\\alpha}{\\dot{v}\\equiv\\ddot{r}}, \\hat{t}\\hat{T} \\overbrace{\\left|\\sqrt{x\\cdot Y}\\right|}{\\propto\\bbN\\circ\\bbZ} \\left<\\arrow{x(\\tau)}\\cdot\\vec{R}(t+\\bar{\\tau})\\right> \\alpha\\beta\\gamma\\delta\\epsilon\\Gamma\\Delta\\Theta\\Omega \\left\\_\\left~\\cbrt{\\hbar\\omega}\\right~\\right\\_$"); - ui->cmbTestset->addItem("upper/lower parantheses test:", "$\\text{bblabla} \\frac{1}{2}\\cdot\\left(\\frac{1}{\\mathrm{e}^x+\\mathrm{e}^{-x}}\\right)\\cdot\\left(\\frac{1}{\\frac{1+2}{5+x}}\\right)\\cdot\\left(\\frac{1}{\\exp\\left[-\\frac{y^2}{\\sqrt{x}}\\right]\\cdot\\exp\\left[-\\frac{1}{\\frac{1}{2}}\\right]}\\right) $"); - ui->cmbTestset->addItem("ACF test", "$g_{rg}^{ab}(\\tau)=\\frac{1}{N}\\cdot\\left(1+\\frac{2}{3}\\frac{\\langle r^2(\\tau)\\rangle}{w_{xy}^2}\\right)^{-1}\\cdot\\left(1+\\frac{2}{3}\\frac{\\langle r^2(\\tau)\\rangle}{w_{xy}^2}\\right)^{-\\frac{1}{2}}$"); - ui->cmbTestset->addItem("MSD test", "$\\mathrm{MSD}(\\tau)\\equiv\\langle r^2(\\tau)\\rangle=\\left\\langle (\\vec{r}(t)-\\vec{r}(t+\\tau) )^2\\right\\rangle=2n\\cdot\\frac{K_\\alpha}{\\Gamma(1+\\alpha)}\\cdot\\tau^\\alpha$"); - ui->cmbTestset->addItem("f() test", "$f(\\vec{x})=\\frac{1}{\\sqrt{2\\pi\\cdot\\sigma^2}}\\exp\\left(-\\frac{(\\vec{x}-\\vec{x}_0)^2}{\\sigma^2}\\right)$"); - ui->cmbTestset->addItem("chi^2 test", "$\\vec{p}^\\ast=\\argmax\\limits_{\\vec{p}}\\chi^2=\\argmax\\limits_{\\vec{p}}\\sum\\limits_{i=1}^N\\left|\\frac{\\hat{f}_i-f(x_i;\\vec{p})}{\\sigma_i}\\right|^2$"); - ui->cmbTestset->addItem("symbol test", "\\vdots\\cdots\\ddots\\iddots\\lfloor\\rfloor\\lceil\\rceil\\langle\\rangle\\sum\\int \\iint \\oint \\prod \\leftrightarrow \\leftarrow\\Leftarrow\\rightarrow\\Rightarrow\\pm\\mp\\leq\\geq\\ll\\gg\\hbar\\euro\\bbC\\bbH\\bbN\\bbP\\bbQ\\bbZ\\bbR\\Angstrom\\Alef\\Bet\\Gimel\\Dalet\\nexists\\ni\\notni\\circ\\tilde\\oiint\\oiiint\\emptyset\\odot\\ominus\\subsetnot\\DC\\bot\\cdots\\perthousand\\leftharpoonup\\rightharpoonup \\upharpoonleft \\downharpoonleft \\leftrightharpoon \\rightleftharpoon \\coprod \\leftharpoondown \\rightharpoondown \\nwarrow \\nearrow \\mapsto \\cent \\pound \\yen \\div \\multimap \\maporiginal \\mapimage \\bigcap \\bigcup \\benzene \\times \\cdot \\propto \\equiv \\Im \\Re \\ "); - ui->cmbTestset->addItem("arrowtest 1", "$\\leftarrow \\longleftarrow \\Leftarrow \\Longleftarrow \\rightarrow \\longrightarrow \\Rightarrow \\Longrightarrow \\uparrow \\Uparrow \\downarrow \\Downarrow \\leftrightarrow \\Leftrightarrow \\longleftrightarrow \\Longleftrightarrow$"); - ui->cmbTestset->addItem("arrowtest 2", "$\\nwarrow \\nearrow \\searrow \\swarrow \\mapsto \\leftharpoonup \\rightharpoonup \\upharpoonleft \\downharpoonleft \\leftrightharpoon \\rightleftharpoon \\leftharpoondown \\rightharpoondown \\upharpoonright \\downharpoonright $"); - ui->cmbTestset->addItem("math: blackboard", "$\\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$"); - ui->cmbTestset->addItem("math: bf", "$\\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$"); - ui->cmbTestset->addItem("math: rm", "$\\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$"); - ui->cmbTestset->addItem("math: cal", "$\\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$"); - ui->cmbTestset->addItem("subscript test", "$r_{123}\\ \\ r_{\\frac{1}{2}}$"); - ui->cmbTestset->addItem("subscript0 test", "$r_{123}$"); - ui->cmbTestset->addItem("subscript1 test", "$r_{123}\\ $"); - ui->cmbTestset->addItem("subscript2 test", "$r_{123}\\ \\ $"); - ui->cmbTestset->addItem("subscript3 test", "$r_{123}r_{\\frac{1}{2}}$"); - ui->cmbTestset->addItem("superscript test", "$r^{123}\\ \\ r^{\\frac{1}{2}}$"); - ui->cmbTestset->addItem("superscript0 test", "$r^{123}$"); - ui->cmbTestset->addItem("superscript1 test", "$r^{123}\\ $"); - ui->cmbTestset->addItem("superscript2 test", "$r^{123}\\ \\ $"); - ui->cmbTestset->addItem("superscript3 test", "$r^{123}r^{\\frac{1}{2}}$"); - ui->cmbTestset->addItem("asuperscript test", "$a^{123}\\ \\ a^{\\frac{1}{2}}$"); - ui->cmbTestset->addItem("asuperscript0 test", "$a^{123}$"); - ui->cmbTestset->addItem("gsuperscript1 test", "$g^{123}\\ $"); - ui->cmbTestset->addItem("gsuperscript2 test", "$g^{123}\\ \\ $"); - ui->cmbTestset->addItem("gsuperscript3 test", "$g^{123}g^{\\frac{1}{2}}$"); - ui->cmbTestset->addItem("frac test", "$\\frac{a}{b}+\\frac{g}{a}-\\frac{a^2}{b^2}\\cdot\\frac{a^2}{b^{\\frac{1}{2}}}$"); - ui->cmbTestset->addItem("tfrac test", "$\\tfrac{a}{b}+\\tfrac{g}{a}-\\tfrac{a^2}{b^2}\\cdot\\tfrac{a^2}{b^{\\tfrac{1}{2}}}$"); - ui->cmbTestset->addItem("dfrac test", "$\\dfrac{a}{b}+\\dfrac{g}{a}-\\dfrac{a^2}{b^2}\\cdot\\dfrac{a^2}{b^{\\dfrac{1}{2}}}$"); - ui->cmbTestset->addItem("stackrel test", "$\\stackrel{a}{b}+\\stackrel{g}{a}-\\stackrel{a^2}{b^2}\\cdot\\stackrel{a^2}{b^{\\stackrel{1}{2}}}$"); - ui->cmbTestset->addItem("brace0 test", "\\langle\\langle -- $\\langle\\langle$"); - ui->cmbTestset->addItem("brace1 test", "\\langle\\langle r^{123} -- $\\langle\\langle r^{123}$"); - ui->cmbTestset->addItem("brace2 test", "\\langle\\langle r^{123}\\rangle\\rangle -- $\\langle\\langle r^{123}\\rangle\\rangle$"); - ui->cmbTestset->addItem("brace3 test", "\\left\\langle r^{123}\\right\\rangle -- $\\left\\langle r^{123}\\right\\rangle$"); - ui->cmbTestset->addItem("brace4 test", "\\left\\langle\\left\\langle\\left\\langle r^{123}\\right\\rangle\\right\\rangle\\right\\rangle -- $\\left\\langle\\left\\langle\\left\\langle r^{123}\\right\\rangle\\right\\rangle\\right\\rangle$"); - ui->cmbTestset->addItem("brace5 test: ( )", "\\left(\\left(\\left( r^{123}\\right)\\right)\\right) -- $\\left(\\left(\\left( r^{123}\\right)\\right)\\right)$"); - ui->cmbTestset->addItem("brace6 test: [ ]", "\\left[\\left[\\left[ r^{123}\\right]\\right]\\right] -- $\\left[\\left[\\left[ r^{123}\\right]\\right]\\right]$"); - ui->cmbTestset->addItem("brace7 test: { }", "\\left\\{\\left\\{\\left\\{ r^{123}\\right\\}\\right\\}\\right\\} -- $\\left\\{\\left\\{\\left\\{ r^{123}\\right\\}\\right\\}\\right\\}$"); - ui->cmbTestset->addItem("brace8 test: || ||", "\\left\\|\\left\\|\\left\\| r^{123}\\right\\|\\right\\|\\right\\| -- $\\left\\|\\left\\|\\left\\| r^{123}\\right\\|\\right\\|\\right\\|$"); - ui->cmbTestset->addItem("brace9 test: | |", "\\left|\\left|\\left| r^{123}\\right|\\right|\\right| -- $\\left|\\left|\\left| r^{123}\\right|\\right|\\right|$"); - ui->cmbTestset->addItem("brace10 test", "\\left\\{\\left[\\left( r^{123}\\right)\\right]\\right\\} -- $\\left\\{\\left[\\left( r^{123}\\right)\\right]\\right\\}$"); - ui->cmbTestset->addItem("brace11 test: floor", "\\left\\lfloor\\left\\lfloor\\left\\lfloor r^{123}\\right\\rfloor\\right\\rfloor\\right\\rfloor -- $\\left\\lfloor\\left\\lfloor\\left\\lfloor r^{123}\\right\\rfloor\\right\\rfloor\\right\\rfloor$"); - ui->cmbTestset->addItem("brace12 test: ceil", "\\left\\lceil\\left\\lceil\\left\\lceil r^{123}\\right\\rceil\\right\\rceil\\right\\rceil -- $\\left\\lceil\\left\\lceil\\left\\lceil r^{123}\\right\\rceil\\right\\rceil\\right\\rceil$"); - ui->cmbTestset->addItem("sub-, superscript test", "r^{1234}_{321} r_{321}^{1234} -- $r^{1234}_{321} r_{321}^{1234} -- \\kappa^2 -- \\kappa_2 -- \\kappa_2^2$"); - ui->cmbTestset->addItem("super-, subscript test", "r^{123}_{4321} r_{4321}^{123} -- $r^{123}_{4321} r_{4321}^{123} -- \\kappa^2 -- \\kappa_2 -- \\kappa_2^2$"); - //ui->cmbTestset->addItem("", ""); - ui->cmbTestset->addItem("math 1", "$f(x)=\\int_{-\\infty}^xe^{-t^2}\\;\\mathrm{d}t$"); - ui->cmbTestset->addItem("math 2", "$\\sum_{i=1}^\\infty\\frac{-e^{i\\pi}}{2^n}$"); - ui->cmbTestset->addItem("math 3", "$\\mbox{det} \\begin{pmatrix} 1 & x_1 & \\ldots & x_1^{n-1} \\\\ 1 & x_2 & \\ldots & x_2^{n-1} \\\\ \\vdots & \\vdots & \\ddots & \\vdots \\\\ 1 & x_n & \\ldots & x_n^{n-1} \\end{pmatrix} = \\prod_{1 \\leq i < j \\leq n} (x_j - x_i) $"); - ui->cmbTestset->addItem("math 4", "$\\sqrt{1+\\sqrt{1+\\sqrt{1+\\sqrt{1+\\sqrt{1+\\sqrt{1+x}}}}}}$"); - ui->cmbTestset->addItem("math 5", "$\\left(\\stackrel{p}{2}\\right)=x^2y^{p-2}-\\frac{1}{1-x}\\frac{1}{1-x^2}$"); - ui->cmbTestset->addItem("math 6", "$a_0+\\frac{1}{a_1+\\frac{1}{a_2+\\frac{1}{a_3+\\frac{1}{a_4}}}}$"); - ui->cmbTestset->addItem("math 7", "$\\left(\\frac{\\partial^2}{\\partial x^2}+\\frac{\\partial^2}{\\partial y^2}\\right)\\left|\\varphi(x+\\mathrm{i}y)\\right|^2=0$"); - ui->cmbTestset->addItem("math 8", "$2^{2^{2^{x}}}$"); - ui->cmbTestset->addItem("math 9", "$\\iint_Df(x,y)\\;\\mathrm{d}x\\;\\mathrm{d}y$"); - ui->cmbTestset->addItem("math 10 (overbrace)", "$\\overbrace{x+x+...+x}{k\\ \\mathrm{times}}$"); - ui->cmbTestset->addItem("math 11 (underbrace)", "$\\underbrace{x+x+...+x}{k\\ \\mathrm{times}}$"); - ui->cmbTestset->addItem("math 12 (under/overbrace)", "$\\underbrace{\\overbrace{x+x+...+x}{k\\ \\mathrm{times}} \\overbrace{x+x+...+x}{k\\ \\mathrm{times}}}{2k\\ \\mathrm{times}}$"); - ui->cmbTestset->addItem("math 13", "$y_1''\\ \\ \\ y_2'''$"); - ui->cmbTestset->addItem("math 14", "$f(x)=\\begin{cases} 1/3 & \\mathrm{if}\\ 0\\leq x\\leq1 \\\\ 2/3 & \\mathrm{if}\\ 3\\leq x\\leq4 \\\\0 & \\mathrm{elsewhere} \\end{cases}$"); - ui->cmbTestset->addItem("math 15", "$\\Re{z} =\\frac{n\\pi \\dfrac{\\theta +\\psi}{2}}{\\left(\\dfrac{\\theta +\\psi}{2}\\right)^2 + \\left( \\dfrac{1}{2}\\log \\left\\lvert\\dfrac{B}{A}\\right\\rvert\\right)^2}.$"); - ui->cmbTestset->addItem("math 16", "$\\sum_{m=1}^\\infty\\sum_{n=1}^\\infty\\frac{m^2\\,n}{3^m\\left(m\\,3^n+n\\,3^m\\right)}$"); - ui->cmbTestset->addItem("math 17", "$\\phi_n(\\kappa) =\\frac{1}{4\\pi^2\\kappa^2} \\int_0^\\infty\\frac{\\sin(\\kappa R)}{\\kappa R}\\frac{\\partial}{\\partial R}\\left[R^2\\frac{\\partial D_n(R)}{\\partial R}\\right]\\,dR$"); - ui->cmbTestset->addItem("math 18", "${}_pF_q(a_1,\\dots,a_p;c_1,\\dots,c_q;z)= \\sum_{n=0}^\\infty\\frac{(a_1)_n\\cdots(a_p)_n}{(c_1)_n\\cdots(c_q)_n}\\frac{z^n}{n!}$"); - ui->cmbTestset->addItem("math 19 (overset)", "$X \\overset{=}{def} Y$\\ \\ \\ \\ \\ $X \\overset{=}{!} Y$\\ \\ \\ \\ \\ $X \\overset{\\rightarrow}{f} Y$\\ \\ \\ \\ \\ $\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}\\overset{\\longrightarrow}{\\Delta x\\to 0}f'(x)$"); - ui->cmbTestset->addItem("math 20 (underset)", "$X \\underset{=}{\\text{def (5)}} Y$\\ \\ \\ \\ \\ $X \\underset{\\rightarrow}{f} Y$\\ \\ \\ \\ \\ $\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}\\underset{\\longrightarrow}{\\Delta x\\to 0}f'(x)$"); - ui->cmbTestset->addItem("Jacobi Matrix and VarCov matrix", "$J_{ij}= \\left.\\frac{\\partial f(x,\\vec{p})}{\\partial p_i}\\right|_{\\vec{p},x=x_j}\\ \\ \\ \\ \\ \\mat{C}=\\left(\\mat{J}^\\mathrm{T}\\ J\\right)^{-1}\\ \\ \\ \\ \\ test: \\left|\\frac{\\partial f(x,\\vec{p})}{\\partial p_i}\\right|_{\\vec{p},x=x_j}^2$"); - ui->cmbTestset->addItem("operator test (textmode)", "x=0\\ \\ y>0\\ \\ x+y\\ \\ -1\\ \\ x-2\\ \\ x\\cdot y\\ \\ x\\geq 4\\ \\ x~4"); - ui->cmbTestset->addItem("operator test (mathmode)", "$x=0\\ \\ y>0\\ \\ x+y\\ \\ -1\\ \\ x-2\\ \\ x\\cdot y\\ \\ x\\geq 4\\ \\ x~4$"); - ui->cmbTestset->addItem("color test", "\\textcolor{red}{RED}\\textcolor{blue}{BLUE}"); - ui->cmbTestset->addItem("boxed test", "test: \\boxed{boxed text} in the middle"); - ui->cmbTestset->addItem("mathboxed test", "\\fbox{2^{2^{\\colorbox{red}{2^{x}}}}}"); - ui->cmbTestset->addItem("axiom of power test", "$\\forall A \\, \\exists P \\, \\forall B \\, [B \\in P \\iff \\forall C \\, (C \\in B \\Rightarrow C \\in A)]$"); - ui->cmbTestset->addItem("De Morgan's law", "$\\neg(P\\land Q)\\iff(\\neg P)\\lor(\\neg Q)$ or $\\overline{\\bigcap_{i \\in I} A_{i}}\\equiv\\bigcup_{i \\in I} \\overline{A_{i}}$ or $\\overline{A \\cup B}\\equiv\\overline{A} \\cap \\overline{B}$"); - ui->cmbTestset->addItem("quadratic formula", "$x=\\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}$"); - ui->cmbTestset->addItem("combination", "$\\binom{n}{k} = \\frac{n(n-1)...(n-k+1)}{k(k-1)\\dots1}=\\frac{n!}{k!(n-k)!}$"); - ui->cmbTestset->addItem("Sophomore's dream 1", "$\\int_0^1 x^{-x}\\,dx = \\sum_{n=1}^\\infty n^{-n}(\\scriptstyle{= 1.29128599706266354040728259059560054149861936827\\dots)}$"); - ui->cmbTestset->addItem("Sophomore's dream 2", "$\\int_0^1 x^x \\,dx = \\sum_{n=1}^\\infty (-1)^{n+1}n^{-n} = - \\sum_{n=1}^\\infty (-n)^{-n} (\\scriptstyle{= 0.78343051071213440705926438652697546940768199014\\dots})$"); - ui->cmbTestset->addItem("divergence 1", "$\\operatorname{div}\\vec{F} = \\nabla\\cdot\\vec{F}=\\frac{\\partial U}{\\partial x}+\\frac{\\partial V}{\\partial y}+\\frac{\\partial W}{\\partial z}$"); - ui->cmbTestset->addItem("divergence 2", "$\\overrightarrow{\\operatorname{div}}\\,(\\mathbf{\\underline{\\underline{\\epsilon}}}) = " - "\\begin{bmatrix}" - "\\frac{\\partial \\epsilon_{xx}}{\\partial x} +\\frac{\\partial \\epsilon_{yx}}{\\partial y} +\\frac{\\partial \\epsilon_{zx}}{\\partial z} \\\\" - "\\frac{\\partial \\epsilon_{xy}}{\\partial x} +\\frac{\\partial \\epsilon_{yy}}{\\partial y} +\\frac{\\partial \\epsilon_{zy}}{\\partial z} \\\\" - "\\frac{\\partial \\epsilon_{xz}}{\\partial x} +\\frac{\\partial \\epsilon_{yz}}{\\partial y} +\\frac{\\partial \\epsilon_{zz}}{\\partial z}" - "\\end{bmatrix}$"); - ui->cmbTestset->addItem("lim, sum ...", "$\\lim_{x\\to\\infty} f(x) = \\binom{k}{r} + \\frac{a}{b} \\sum_{n=1}^\\infty a_n + \\displaystyle{ \\left\\{ \\frac{1}{13} \\sum_{n=1}^\\infty b_n \\right\\} }.$"); - ui->cmbTestset->addItem("array test", "$f(x) := \\left\\{\\begin{array} x^2 \\sin \\frac{1}{x} & \\textrm{if } x \\ne 0, \\\\ 0 & \\textrm{if } x = 0 . \\end{array}\\right.$"); - ui->cmbTestset->addItem("Schwinger-Dyson", "$\\left\\langle\\psi\\left|\\mathcal{T}\\{F \\phi^j\\}\\right|\\psi\\right\\rangle=\\left\\langle\\psi\\left|\\mathcal{T}\\{iF_{,i}D^{ij}-FS_{int,i}D^{ij}\\}\\right|\\psi\\right\\rangle.$"); - ui->cmbTestset->addItem(QLatin1String("Schrödinger's equation"), "$\\left[-\\frac{\\hbar^2}{2m}\\frac{\\partial^2}{\\partial x^2}+V\\right]\\Psi(x)=\\mathrm{i}\\hbar\\frac{\\partial}{\\partial t}\\Psi(x)$"); - ui->cmbTestset->addItem("Cauchy-Schwarz inequality", "$\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)$"); - ui->cmbTestset->addItem("Maxwell's equations", "$\\begin{aligned}\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac{1}{c}\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac{1}{c}\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \\end{aligned}$"); - ui->cmbTestset->addItem("Langevin Equation", "$m \\dot{v}(t) = -\\gamma v(t) + F(x,t)+ f(t)$"); - ui->cmbTestset->addItem("Fokker-Planck Equation", "$\\frac{\\partial}{\\partial t}P(y,t)=-\\frac{\\partial}{\\partial y}\\left[ A(y,t)P(y,t)\\right] +\\frac{\\Gamma}{2}\\frac{\\partial^2}{\\partial y^2}\\left[ P(y,t)\\right]$"); - ui->cmbTestset->addItem("Hamilton Equations of motion", "$\\mathcal{H}(\\mathbf{q},\\mathbf{p})=\\frac{\\mathbf{p}^2}{2\\,m}+V(\\mathbf{q})\\ \\ \\ \\text{and}\\ \\ \\ \\dot{q}_k =\\frac{p_k}{m}\\ ,\\ \\dot{p}_k = - \\frac{\\partial V}{\\partial q_k}$"); - ui->cmbTestset->addItem("Gaussian Distrubution", "$f(x | \\mu,\\sigma^2)=\\frac{1}{\\sqrt{2\\pi\\sigma^2}}\\operatorname{exp}\\left(-\\frac{(x-\\mu)^2}{2\\sigma^2}\\right)=\\frac{1}{\\sqrt{2\\pi\\sigma^2}} e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}\\quad -\\inftycmbTestset->addItem("User-Editable Text"); - // - //ui->cmbTestset->addItem("", "$$"); - //ui->cmbTestset->addItem("", "$$"); - //ui->cmbTestset->addItem("", ""); - ui->cmbTestset->setCurrentIndex(0); - - ui->labMath->setMath("\\left(\\left[\\sqrt{2\\pi\\cdot\\int_{-\\infty}^\\infty f(x)\\;\\mathrm{d}x}\\right]\\right)"); - ui->cmbFont->setCurrentIndex(1); -} - -TestForm::~TestForm() -{ - delete ui; -} - -#define W 2000 -#define H 2000 -#define X1 15 -#define Y1 50 - - - -double TestForm::draw(QPainter& painter, double X, double YY, JKQTmathText& mt, QString name, double& durationSizingMS, double&durationTimingMS) { - - - double Y=YY; - painter.save(); - ht.start(); - QSizeF s=mt.getSize(painter); - Y=Y+mt.getAscent(painter); - durationSizingMS=ht.get_time()/1000.0; - qDebug()<<" sizing in "<chkBoxes->isChecked()); - durationTimingMS=ht.get_time()/1000.0; - qDebug()<<" drawing in "<get_decoration())); - if (decoN->get_child()) ti->addChild(createTree(decoN->get_child(), ti)); - } else if (matrixN) { - int l=matrixN->get_lines(); - int c=matrixN->get_columns(); - name=QString("MTmatrixNode: l*c=%1*%2").arg(l).arg(c); - QVector > children=matrixN->get_children(); - for (int y=0; ysetText(0, QString("(%1,%2):").arg(y).arg(x)+it->text(0)); - ti->addChild(it); - } - } - } - } else if (fracN) { - name=QString("MTfracNode: mode='%1'").arg(JKQTmathText::fracModeToString(fracN->get_mode())); - if (fracN->get_child1()) ti->addChild(createTree(fracN->get_child1(), ti)); - if (fracN->get_child2()) ti->addChild(createTree(fracN->get_child2(), ti)); - } else if (sqrtN) { - name=QString("MTsqrtNode: deg=%1").arg(sqrtN->get_degree()); - if (sqrtN->get_child()) ti->addChild(createTree(sqrtN->get_child(), ti)); - } else if (braceN) { - name=QString("MTbraceNode: l='%1', r='%2', showR=%3").arg(braceN->get_openbrace()).arg(braceN->get_closebrace()).arg(braceN->get_showRightBrace()); - if (braceN->get_child()) ti->addChild(createTree(braceN->get_child(), ti)); - } else if (superN) { - name=QString("MTsuperscriptNode"); - if (superN->get_child()) ti->addChild(createTree(superN->get_child(), ti)); - } else if (subN) { - name=QString("MTsubscriptNode"); - if (subN->get_child()) ti->addChild(createTree(subN->get_child(), ti)); - } else if (inst1N) { - name=QString("MTinstruction1Node: \'%1\'").arg(inst1N->get_name()); - if (inst1N->get_child()) ti->addChild(createTree(inst1N->get_child(), ti)); - } else if (lstN) { - name=QString("MTlistNode"); - QList list=lstN->get_nodes(); - for (int i=0; iaddChild(createTree(list[i], ti)); - } - } else if (symN) { - name=QString("MTsymbolNode: \'%1\'").arg(symN->get_symbolName()); - } else if (spN) { - name=QString("MTwhitespaceNode :\'%1\'").arg(txtN->get_text()); - } else if (txtN) { - name=QString("MTtextNode: \'%1\'").arg(txtN->get_text()); - - } else { - name=QString("unknown"); - } - - ti->setText(0,name); - - /* - QString space=""; - QTreeWidgetItem* p=ti->parent(); - while (p) { - space+=" "; - p=p->parent(); - } - - qDebug()<cmbTestset->currentIndex()==ui->cmbTestset->count()-1) { - mathTest=ui->textBrowserSource->toPlainText(); - ui->textBrowserSource->setReadOnly(false); - ui->btnRender->setEnabled(true); - } else { - mathTest=ui->cmbTestset->itemData(ui->cmbTestset->currentIndex()).toString(); - ui->textBrowserSource->setPlainText(mathTest); - ui->textBrowserSource->setReadOnly(true); - ui->btnRender->setEnabled(false); - } - - ui->scrollArea->setBackgroundRole(QPalette::Dark); - - QPixmap pix(W, H); - pix.fill(); - QPainter painter; - JKQTmathText mt(this); - - - double Y=Y1; - - painter.begin(&pix); - if (ui->chkAntiAlias->isChecked()) painter.setRenderHint(QPainter::Antialiasing); - if (ui->chkAntiAliasHQ->isChecked()) painter.setRenderHint(QPainter::HighQualityAntialiasing); - if (ui->chkAntiAliasText->isChecked()) painter.setRenderHint(QPainter::TextAntialiasing); - if (ui->chkSmoothTransform->isChecked()) painter.setRenderHint(QPainter::QPainter::SmoothPixmapTransform); - ht.start(); - - - mt.set_fontRoman(ui->cmbUnicodeSerif->currentFont().family()); - mt.set_fontMathRoman(ui->cmbUnicodeSerif->currentFont().family()); - mt.set_fontSans(ui->cmbUnicodeSans->currentFont().family()); - mt.set_fontMathSans(ui->cmbUnicodeSans->currentFont().family()); - mt.set_fontTypewriter(ui->cmbUnicodeFixed->currentFont().family()); - mt.set_fontSymbol(ui->cmbUnicodeSymbol->currentFont().family()); - - switch (ui->cmbFont->currentIndex()) { - case 1: mt.useXITS(); break; - case 2: mt.useSTIX(); break; - case 3: mt.useAnyUnicode(ui->cmbUnicodeSans->currentFont().family(),ui->cmbUnicodeSerif->currentFont().family()); break; - case 4: mt.useLatexFonts(ui->edtLatexPrefix->text(), ui->edtLatexPostfix->text()); break; - case 5: mt.useASANA(); break; - - } - - ui->tree->clear(); - ht.start(); - double durationParse=0; - if (mt.parse(mathTest)) { - durationParse=ht.get_time()/1000.0; - ui->tree->addTopLevelItem(createTree(mt.get_parsedNode())); - } else { - durationParse=ht.get_time()/1000.0; - } - ui->labParsingTimes->setText(QString(" %1ms").arg(durationParse, 0, 'f', 3)); - ui->tree->expandAll(); - bool okh=true; - ui->textBrowser->clear(); - qDebug()<<"parse mathTest in "<edtSizes->text().split(","); - ui->labRenderTimes->setText(""); - - for (int i=0; icmbTestset->currentText()).arg(ui->cmbFont->currentText()).arg(size), durationSizingMS, durationTimingMS); - - if (i==0) { - if (mt.get_error_list().size()>0) { - ui->labError->setText(""+mt.get_error_list().join("
")+"
"); - } else { - ui->labError->setText("OK"); - } - } - - ui->labRenderTimes->setText(ui->labRenderTimes->text()+QString(" %1pt: %2ms/%3ms").arg(size).arg(durationSizingMS, 0, 'F', 1).arg(durationTimingMS, 0, 'F', 1)); - ui->textBrowser->textCursor().insertHtml("
"+mt.toHtml(&okh)+"


"); - qDebug()<<"HTML: ---------------------------------------------\n"<label->setPixmap(pix); - QApplication::restoreOverrideCursor(); -} +#include "testform.h" +#include "ui_testform.h" +#include + + +TestForm::TestForm(QWidget *parent) : + QWidget(parent), + ui(new Ui::TestForm) +{ + ui->setupUi(this); + ui->cmbTestset->addItem("simple relations", "$a{\\leq}b$, $a{\\geq}b$, $a{\\equiv}b$, $a=b$, $a{\\neq}b$, $ab$"); + ui->cmbTestset->addItem("simple relations in different modes", "math: $a{\\leq}b$, math/no braces: $a\\leq b$, no math: a{\\leq}b, no math/no braces: a\\leq b"); + ui->cmbTestset->addItem("named symbols 1", "ll: $\\ll$\\ gg: $\\gg$\\ leq: $\\leq$\\ geq: $\\geq$\\ pm: $\\pm$\\ mp: $\\mp$\\ "); + ui->cmbTestset->addItem("named symbols 2", "nexists: $\\nexists$\\ ni: $\\ni$\\ notni: $\\notni$\\ circ: $\\circ$\\ sim: $\\sim$\\ emptyset: $\\emptyset$\\ odot: $\\odot$\\ ominus: $\\ominus$\\ subsetnot: $\\subsetnot$\\ bot: $\\bot$"); + ui->cmbTestset->addItem("named symbols 3", "leftharpoonup: $\\leftharpoonup$\\ rightharpoonup: $\\rightharpoonup$\\ upharpoonleft: $\\upharpoonleft$\\ downharpoonleft: $\\downharpoonleft$\\ leftrightharpoon: $\\leftrightharpoon$\\ rightleftharpoon: $\\rightleftharpoon$"); + ui->cmbTestset->addItem("named symbols 4", "coprod: $\\coprod$\\ leftharpoondown: $\\leftharpoondown$\\ rightharpoondown: $\\rightharpoondown$\\ upharpoonright: $\\upharpoonright$\\ downharpoonright: $\\downharpoonright$\\ nwarrow: $\\nwarrow$\\ nearrow: $\\nearrow$\\ "); + ui->cmbTestset->addItem("named symbols 5", "searrow: $\\searrow$\\ swarrow: $\\swarrow$\\ mapsto: $\\mapsto$\\ div: $\\div$\\ multimap: $\\multimap$\\ maporiginal: $\\maporiginal$\\ mapimage: $\\mapimage$\\ "); + ui->cmbTestset->addItem("named symbols 6", "times: $\\times$\\ propto: $\\propto$\\ bullet: $\\bullet$\\ neq: $\\neq$\\ ne: $\\ne$\\ equiv: $\\equiv$\\ approx: $\\approx$\\ otimes: $\\otimes$\\ oplus: $\\oplus$"); + ui->cmbTestset->addItem("named symbols 7", "oslash: $\\oslash$\\ cap: $\\cap$\\ land: $\\land$\\ cup: $\\cup$\\ lor: $\\lor$\\ supset: $\\supset$\\ supseteq: $\\supseteq$\\ supsetnot: $\\supsetnot$\\ subset: $\\subset$"); + ui->cmbTestset->addItem("named symbols 8", "subseteq: $\\subseteq$\\ in: $\\in$\\ notin: $\\notin$\\ cdot: $\\cdot$\\ wedge: $\\wedge$\\ vee: $\\vee$\\ cong: $\\cong$\\ bot: $\\bot$"); + ui->cmbTestset->addItem("symbols", "$\\ll\\gg\\leq\\geq\\leftrightarrow\\leftarrow\\rightarrow\\to\\uparrow\\downarrow\\updownarrow\\Leftrightarrow\\iff\\Leftarrow\\Rightarrow\\Uparrow\\Downarrow\\Updownarrow\\pm\\mp\\nexists\\ni\\notni\\circ\\sim\\emptyset\\odot\\ominus\\subsetnot\\bot\\leftharpoonup\\rightharpoonup\\upharpoonleft\\downharpoonleft\\leftrightharpoon\\rightleftharpoon\\coprod\\leftharpoondown\\rightharpoondown\\upharpoonright\\downharpoonright\\nwarrow\\nearrow\\searrow\\swarrow\\mapsto\\div\\multimap\\maporiginal\\mapimage\\times\\propto\\bullet\\neq\\ne\\equiv\\approx\\otimes\\oplus\\oslash\\cap\\land\\cup\\lor\\supset\\supseteq\\supsetnot\\subset\\subseteq\\in\\notin\\cdot\\wedge\\vee\\cong\\bot$"); + ui->cmbTestset->addItem("std dev", "$\\sigma_x=\\sqrt{\\langle (x-\\langle x\\rangle)^2\\rangle}=\\sqrt{\\frac{1}{N-1}\\cdot\\left( \\sum_{i=1}^N{x_i}^2-\\frac{1}{N}\\cdot\\left(\\sum_{i=1}^Nx_i\\right)^2\\right)}$"); + ui->cmbTestset->addItem("std dev 2", "$\\sigma_x=\\sqrt{\\langle (x-\\langle x\\rangle)^2\\rangle}=\\sqrt{\\frac{1}{N-1}\\cdot\\left( \\sum_{i=1}^Nx_i^2-\\frac{1}{N}\\cdot\\left(\\sum_{i=1}^Nx_i\\right)^2\\right)}$"); + ui->cmbTestset->addItem("rotation matrix", "$\\mathrm{\\mathbf{M}}(\\alpha) = \\left(\\begin{matrix}\\cos(\\alpha)+n_x^2\\cdot (1-\\cos(\\alpha)) & n_x\\cdot n_y\\cdot (1-\\cos(\\alpha))-n_z\\cdot \\sin(\\alpha) & n_x\\cdot n_z\\cdot (1-\\cos(\\alpha))+n_y\\cdot \\sin(\\alpha)\\\\n_x\\cdot n_y\\cdot (1-\\cos(\\alpha))+n_z\\cdot \\sin(\\alpha) & \\cos(\\alpha)+n_y^2\\cdot (1-\\cos(\\alpha)) & n_y\\cdot n_z\\cdot (1-\\cos(\\alpha))-n_x\\cdot \\sin(\\alpha)\\\\n_z\\cdot n_x\\cdot (1-\\cos(\\alpha))-n_y\\cdot \\sin(\\alpha) & n_z\\cdot n_y\\cdot (1-\\cos(\\alpha))+n_x\\cdot \\sin(\\alpha) & \\cos(\\alpha)+n_z^2\\cdot (1-\\cos(\\alpha))\\end{matrix}\\right)$"); + ui->cmbTestset->addItem("like in label at bottom (no MM)", "\\left(\\left[\\sqrt{2\\pi\\cdot\\int_{-\\infty}^\\infty f(x)\\;\\mathrm{d}x}\\right]\\right)"); + ui->cmbTestset->addItem("like in label at bottom (MM)", "$\\left(\\left[\\sqrt{2\\pi\\cdot\\int_{-\\infty}^\\infty f(x)\\;\\mathrm{d}x}\\right]\\right)$"); + ui->cmbTestset->addItem("text 0", "text"); + ui->cmbTestset->addItem("text 1", "text \\mathbf{bold}"); + ui->cmbTestset->addItem("text 2", "text \\mathbf{bold}\\textcolor{red}{RED}"); + ui->cmbTestset->addItem("decoration", "$\\vec{x}\\vec{X}\\vec{\\psi} -- \\dot{x}\\dot{X}\\dot{\\psi} -- \\ddot{x}\\ddot{X}\\ddot{\\psi} -- \\overline{x}\\overline{X}\\overline{\\psi} -- \\underline{x}\\underline{X}\\underline{\\psi} -- \\hat{x}\\hat{X}\\hat{\\psi} -- \\tilde{x}\\tilde{X}\\tilde{\\psi} -- \\uul{x}\\uul{X}\\uul{\\psi} -- \\ool{x}\\ool{X}\\ool{\\psi} -- \\bar{x}\\bar{X}\\bar{\\psi} -- \\arrow{x}\\arrow{X}\\arrow{\\psi}$"); + ui->cmbTestset->addItem("mathtest", "This is normal text: $this is math:\\langle r^2(\\tau)\\rangle=\\left\\langle (\\vec{r}(t)-\\vec{r}(t+\\tau) )^2\\right\\rangle\\ \\ \\ g(\\tau)=\\frac{1}{N}\\cdot\\left(1+\\frac{2}{3}\\frac{\\langle r^2(\\tau)\\rangle}{w_{xy}^2}\\right)^{-1} \\lfloor\\rfloor\\lceil\\rceil\\langle\\rangle\\left\\{\\va\\left|\\|\\va\\|_2\\geq2\\right.\\right\\} \\vr\\vR\\frac{\\sqrt{\\sqrt{\\sqrt{\\sum_{i=0}^\\infty \\hat{i}^2}+y^\\alpha}+1}}{\\dot{v}\\equiv\\ddot{r}}\\argmin_{\\vec{k}}\\sum_{\\sqrt{i}=0}^{N}\\int_{x_0}^{x_1}\\left(\\left(\\left(x\\right)\\right)\\right)\\underbrace{\\left[\\left\\{\\frac{\\partial f}{\\partial x}\\right\\}\\cdot\\frac{1}{2}\\right]}{\\text{underbraced text \\hbar}}\\cdots\\frac{\\sqrt{\\sum_{i=0}^2 \\hat{i}^2}+y^\\alpha}{\\dot{v}\\equiv\\ddot{r}}, \\hat{t}\\hat{T} \\overbrace{\\left|\\sqrt{x\\cdot Y}\\right|}{\\propto\\bbN\\circ\\bbZ} \\left<\\arrow{x(\\tau)}\\cdot\\vec{R}(t+\\bar{\\tau})\\right> \\alpha\\beta\\gamma\\delta\\epsilon\\Gamma\\Delta\\Theta\\Omega \\left\\_\\left~\\cbrt{\\hbar\\omega}\\right~\\right\\_$"); + ui->cmbTestset->addItem("upper/lower parantheses test:", "$\\text{bblabla} \\frac{1}{2}\\cdot\\left(\\frac{1}{\\mathrm{e}^x+\\mathrm{e}^{-x}}\\right)\\cdot\\left(\\frac{1}{\\frac{1+2}{5+x}}\\right)\\cdot\\left(\\frac{1}{\\exp\\left[-\\frac{y^2}{\\sqrt{x}}\\right]\\cdot\\exp\\left[-\\frac{1}{\\frac{1}{2}}\\right]}\\right) $"); + ui->cmbTestset->addItem("ACF test", "$g_{rg}^{ab}(\\tau)=\\frac{1}{N}\\cdot\\left(1+\\frac{2}{3}\\frac{\\langle r^2(\\tau)\\rangle}{w_{xy}^2}\\right)^{-1}\\cdot\\left(1+\\frac{2}{3}\\frac{\\langle r^2(\\tau)\\rangle}{w_{xy}^2}\\right)^{-\\frac{1}{2}}$"); + ui->cmbTestset->addItem("MSD test", "$\\mathrm{MSD}(\\tau)\\equiv\\langle r^2(\\tau)\\rangle=\\left\\langle (\\vec{r}(t)-\\vec{r}(t+\\tau) )^2\\right\\rangle=2n\\cdot\\frac{K_\\alpha}{\\Gamma(1+\\alpha)}\\cdot\\tau^\\alpha$"); + ui->cmbTestset->addItem("f() test", "$f(\\vec{x})=\\frac{1}{\\sqrt{2\\pi\\cdot\\sigma^2}}\\exp\\left(-\\frac{(\\vec{x}-\\vec{x}_0)^2}{\\sigma^2}\\right)$"); + ui->cmbTestset->addItem("chi^2 test", "$\\vec{p}^\\ast=\\argmax\\limits_{\\vec{p}}\\chi^2=\\argmax\\limits_{\\vec{p}}\\sum\\limits_{i=1}^N\\left|\\frac{\\hat{f}_i-f(x_i;\\vec{p})}{\\sigma_i}\\right|^2$"); + ui->cmbTestset->addItem("symbol test", "\\vdots\\cdots\\ddots\\iddots\\lfloor\\rfloor\\lceil\\rceil\\langle\\rangle\\sum\\int \\iint \\oint \\prod \\leftrightarrow \\leftarrow\\Leftarrow\\rightarrow\\Rightarrow\\pm\\mp\\leq\\geq\\ll\\gg\\hbar\\euro\\bbC\\bbH\\bbN\\bbP\\bbQ\\bbZ\\bbR\\Angstrom\\Alef\\Bet\\Gimel\\Dalet\\nexists\\ni\\notni\\circ\\tilde\\oiint\\oiiint\\emptyset\\odot\\ominus\\subsetnot\\DC\\bot\\cdots\\perthousand\\leftharpoonup\\rightharpoonup \\upharpoonleft \\downharpoonleft \\leftrightharpoon \\rightleftharpoon \\coprod \\leftharpoondown \\rightharpoondown \\nwarrow \\nearrow \\mapsto \\cent \\pound \\yen \\div \\multimap \\maporiginal \\mapimage \\bigcap \\bigcup \\benzene \\times \\cdot \\propto \\equiv \\Im \\Re \\ "); + ui->cmbTestset->addItem("arrowtest 1", "$\\leftarrow \\longleftarrow \\Leftarrow \\Longleftarrow \\rightarrow \\longrightarrow \\Rightarrow \\Longrightarrow \\uparrow \\Uparrow \\downarrow \\Downarrow \\leftrightarrow \\Leftrightarrow \\longleftrightarrow \\Longleftrightarrow$"); + ui->cmbTestset->addItem("arrowtest 2", "$\\nwarrow \\nearrow \\searrow \\swarrow \\mapsto \\leftharpoonup \\rightharpoonup \\upharpoonleft \\downharpoonleft \\leftrightharpoon \\rightleftharpoon \\leftharpoondown \\rightharpoondown \\upharpoonright \\downharpoonright $"); + ui->cmbTestset->addItem("math: blackboard", "$\\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$"); + ui->cmbTestset->addItem("math: bf", "$\\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$"); + ui->cmbTestset->addItem("math: rm", "$\\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$"); + ui->cmbTestset->addItem("math: cal", "$\\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$"); + ui->cmbTestset->addItem("subscript test", "$r_{123}\\ \\ r_{\\frac{1}{2}}$"); + ui->cmbTestset->addItem("subscript0 test", "$r_{123}$"); + ui->cmbTestset->addItem("subscript1 test", "$r_{123}\\ $"); + ui->cmbTestset->addItem("subscript2 test", "$r_{123}\\ \\ $"); + ui->cmbTestset->addItem("subscript3 test", "$r_{123}r_{\\frac{1}{2}}$"); + ui->cmbTestset->addItem("superscript test", "$r^{123}\\ \\ r^{\\frac{1}{2}}$"); + ui->cmbTestset->addItem("superscript0 test", "$r^{123}$"); + ui->cmbTestset->addItem("superscript1 test", "$r^{123}\\ $"); + ui->cmbTestset->addItem("superscript2 test", "$r^{123}\\ \\ $"); + ui->cmbTestset->addItem("superscript3 test", "$r^{123}r^{\\frac{1}{2}}$"); + ui->cmbTestset->addItem("asuperscript test", "$a^{123}\\ \\ a^{\\frac{1}{2}}$"); + ui->cmbTestset->addItem("asuperscript0 test", "$a^{123}$"); + ui->cmbTestset->addItem("gsuperscript1 test", "$g^{123}\\ $"); + ui->cmbTestset->addItem("gsuperscript2 test", "$g^{123}\\ \\ $"); + ui->cmbTestset->addItem("gsuperscript3 test", "$g^{123}g^{\\frac{1}{2}}$"); + ui->cmbTestset->addItem("frac test", "$\\frac{a}{b}+\\frac{g}{a}-\\frac{a^2}{b^2}\\cdot\\frac{a^2}{b^{\\frac{1}{2}}}$"); + ui->cmbTestset->addItem("tfrac test", "$\\tfrac{a}{b}+\\tfrac{g}{a}-\\tfrac{a^2}{b^2}\\cdot\\tfrac{a^2}{b^{\\tfrac{1}{2}}}$"); + ui->cmbTestset->addItem("dfrac test", "$\\dfrac{a}{b}+\\dfrac{g}{a}-\\dfrac{a^2}{b^2}\\cdot\\dfrac{a^2}{b^{\\dfrac{1}{2}}}$"); + ui->cmbTestset->addItem("stackrel test", "$\\stackrel{a}{b}+\\stackrel{g}{a}-\\stackrel{a^2}{b^2}\\cdot\\stackrel{a^2}{b^{\\stackrel{1}{2}}}$"); + ui->cmbTestset->addItem("brace0 test", "\\langle\\langle -- $\\langle\\langle$"); + ui->cmbTestset->addItem("brace1 test", "\\langle\\langle r^{123} -- $\\langle\\langle r^{123}$"); + ui->cmbTestset->addItem("brace2 test", "\\langle\\langle r^{123}\\rangle\\rangle -- $\\langle\\langle r^{123}\\rangle\\rangle$"); + ui->cmbTestset->addItem("brace3 test", "\\left\\langle r^{123}\\right\\rangle -- $\\left\\langle r^{123}\\right\\rangle$"); + ui->cmbTestset->addItem("brace4 test", "\\left\\langle\\left\\langle\\left\\langle r^{123}\\right\\rangle\\right\\rangle\\right\\rangle -- $\\left\\langle\\left\\langle\\left\\langle r^{123}\\right\\rangle\\right\\rangle\\right\\rangle$"); + ui->cmbTestset->addItem("brace5 test: ( )", "\\left(\\left(\\left( r^{123}\\right)\\right)\\right) -- $\\left(\\left(\\left( r^{123}\\right)\\right)\\right)$"); + ui->cmbTestset->addItem("brace6 test: [ ]", "\\left[\\left[\\left[ r^{123}\\right]\\right]\\right] -- $\\left[\\left[\\left[ r^{123}\\right]\\right]\\right]$"); + ui->cmbTestset->addItem("brace7 test: { }", "\\left\\{\\left\\{\\left\\{ r^{123}\\right\\}\\right\\}\\right\\} -- $\\left\\{\\left\\{\\left\\{ r^{123}\\right\\}\\right\\}\\right\\}$"); + ui->cmbTestset->addItem("brace8 test: || ||", "\\left\\|\\left\\|\\left\\| r^{123}\\right\\|\\right\\|\\right\\| -- $\\left\\|\\left\\|\\left\\| r^{123}\\right\\|\\right\\|\\right\\|$"); + ui->cmbTestset->addItem("brace9 test: | |", "\\left|\\left|\\left| r^{123}\\right|\\right|\\right| -- $\\left|\\left|\\left| r^{123}\\right|\\right|\\right|$"); + ui->cmbTestset->addItem("brace10 test", "\\left\\{\\left[\\left( r^{123}\\right)\\right]\\right\\} -- $\\left\\{\\left[\\left( r^{123}\\right)\\right]\\right\\}$"); + ui->cmbTestset->addItem("brace11 test: floor", "\\left\\lfloor\\left\\lfloor\\left\\lfloor r^{123}\\right\\rfloor\\right\\rfloor\\right\\rfloor -- $\\left\\lfloor\\left\\lfloor\\left\\lfloor r^{123}\\right\\rfloor\\right\\rfloor\\right\\rfloor$"); + ui->cmbTestset->addItem("brace12 test: ceil", "\\left\\lceil\\left\\lceil\\left\\lceil r^{123}\\right\\rceil\\right\\rceil\\right\\rceil -- $\\left\\lceil\\left\\lceil\\left\\lceil r^{123}\\right\\rceil\\right\\rceil\\right\\rceil$"); + ui->cmbTestset->addItem("sub-, superscript test", "r^{1234}_{321} r_{321}^{1234} -- $r^{1234}_{321} r_{321}^{1234} -- \\kappa^2 -- \\kappa_2 -- \\kappa_2^2$"); + ui->cmbTestset->addItem("super-, subscript test", "r^{123}_{4321} r_{4321}^{123} -- $r^{123}_{4321} r_{4321}^{123} -- \\kappa^2 -- \\kappa_2 -- \\kappa_2^2$"); + //ui->cmbTestset->addItem("", ""); + ui->cmbTestset->addItem("math 1", "$f(x)=\\int_{-\\infty}^xe^{-t^2}\\;\\mathrm{d}t$"); + ui->cmbTestset->addItem("math 2", "$\\sum_{i=1}^\\infty\\frac{-e^{i\\pi}}{2^n}$"); + ui->cmbTestset->addItem("math 3", "$\\mbox{det} \\begin{pmatrix} 1 & x_1 & \\ldots & x_1^{n-1} \\\\ 1 & x_2 & \\ldots & x_2^{n-1} \\\\ \\vdots & \\vdots & \\ddots & \\vdots \\\\ 1 & x_n & \\ldots & x_n^{n-1} \\end{pmatrix} = \\prod_{1 \\leq i < j \\leq n} (x_j - x_i) $"); + ui->cmbTestset->addItem("math 4", "$\\sqrt{1+\\sqrt{1+\\sqrt{1+\\sqrt{1+\\sqrt{1+\\sqrt{1+x}}}}}}$"); + ui->cmbTestset->addItem("math 5", "$\\left(\\stackrel{p}{2}\\right)=x^2y^{p-2}-\\frac{1}{1-x}\\frac{1}{1-x^2}$"); + ui->cmbTestset->addItem("math 6", "$a_0+\\frac{1}{a_1+\\frac{1}{a_2+\\frac{1}{a_3+\\frac{1}{a_4}}}}$"); + ui->cmbTestset->addItem("math 7", "$\\left(\\frac{\\partial^2}{\\partial x^2}+\\frac{\\partial^2}{\\partial y^2}\\right)\\left|\\varphi(x+\\mathrm{i}y)\\right|^2=0$"); + ui->cmbTestset->addItem("math 8", "$2^{2^{2^{x}}}$"); + ui->cmbTestset->addItem("math 9", "$\\iint_Df(x,y)\\;\\mathrm{d}x\\;\\mathrm{d}y$"); + ui->cmbTestset->addItem("math 10 (overbrace)", "$\\overbrace{x+x+...+x}{k\\ \\mathrm{times}}$"); + ui->cmbTestset->addItem("math 11 (underbrace)", "$\\underbrace{x+x+...+x}{k\\ \\mathrm{times}}$"); + ui->cmbTestset->addItem("math 12 (under/overbrace)", "$\\underbrace{\\overbrace{x+x+...+x}{k\\ \\mathrm{times}} \\overbrace{x+x+...+x}{k\\ \\mathrm{times}}}{2k\\ \\mathrm{times}}$"); + ui->cmbTestset->addItem("math 13", "$y_1''\\ \\ \\ y_2'''$"); + ui->cmbTestset->addItem("math 14", "$f(x)=\\begin{cases} 1/3 & \\mathrm{if}\\ 0\\leq x\\leq1 \\\\ 2/3 & \\mathrm{if}\\ 3\\leq x\\leq4 \\\\0 & \\mathrm{elsewhere} \\end{cases}$"); + ui->cmbTestset->addItem("math 15", "$\\Re{z} =\\frac{n\\pi \\dfrac{\\theta +\\psi}{2}}{\\left(\\dfrac{\\theta +\\psi}{2}\\right)^2 + \\left( \\dfrac{1}{2}\\log \\left\\lvert\\dfrac{B}{A}\\right\\rvert\\right)^2}.$"); + ui->cmbTestset->addItem("math 16", "$\\sum_{m=1}^\\infty\\sum_{n=1}^\\infty\\frac{m^2\\,n}{3^m\\left(m\\,3^n+n\\,3^m\\right)}$"); + ui->cmbTestset->addItem("math 17", "$\\phi_n(\\kappa) =\\frac{1}{4\\pi^2\\kappa^2} \\int_0^\\infty\\frac{\\sin(\\kappa R)}{\\kappa R}\\frac{\\partial}{\\partial R}\\left[R^2\\frac{\\partial D_n(R)}{\\partial R}\\right]\\,dR$"); + ui->cmbTestset->addItem("math 18", "${}_pF_q(a_1,\\dots,a_p;c_1,\\dots,c_q;z)= \\sum_{n=0}^\\infty\\frac{(a_1)_n\\cdots(a_p)_n}{(c_1)_n\\cdots(c_q)_n}\\frac{z^n}{n!}$"); + ui->cmbTestset->addItem("math 19 (overset)", "$X \\overset{=}{def} Y$\\ \\ \\ \\ \\ $X \\overset{=}{!} Y$\\ \\ \\ \\ \\ $X \\overset{\\rightarrow}{f} Y$\\ \\ \\ \\ \\ $\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}\\overset{\\longrightarrow}{\\Delta x\\to 0}f'(x)$"); + ui->cmbTestset->addItem("math 20 (underset)", "$X \\underset{=}{\\text{def (5)}} Y$\\ \\ \\ \\ \\ $X \\underset{\\rightarrow}{f} Y$\\ \\ \\ \\ \\ $\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}\\underset{\\longrightarrow}{\\Delta x\\to 0}f'(x)$"); + ui->cmbTestset->addItem("Jacobi Matrix and VarCov matrix", "$J_{ij}= \\left.\\frac{\\partial f(x,\\vec{p})}{\\partial p_i}\\right|_{\\vec{p},x=x_j}\\ \\ \\ \\ \\ \\mat{C}=\\left(\\mat{J}^\\mathrm{T}\\ J\\right)^{-1}\\ \\ \\ \\ \\ test: \\left|\\frac{\\partial f(x,\\vec{p})}{\\partial p_i}\\right|_{\\vec{p},x=x_j}^2$"); + ui->cmbTestset->addItem("operator test (textmode)", "x=0\\ \\ y>0\\ \\ x+y\\ \\ -1\\ \\ x-2\\ \\ x\\cdot y\\ \\ x\\geq 4\\ \\ x~4"); + ui->cmbTestset->addItem("operator test (mathmode)", "$x=0\\ \\ y>0\\ \\ x+y\\ \\ -1\\ \\ x-2\\ \\ x\\cdot y\\ \\ x\\geq 4\\ \\ x~4$"); + ui->cmbTestset->addItem("color test", "\\textcolor{red}{RED}\\textcolor{blue}{BLUE}"); + ui->cmbTestset->addItem("boxed test", "test: \\boxed{boxed text} in the middle"); + ui->cmbTestset->addItem("mathboxed test", "\\fbox{2^{2^{\\colorbox{red}{2^{x}}}}}"); + ui->cmbTestset->addItem("axiom of power test", "$\\forall A \\, \\exists P \\, \\forall B \\, [B \\in P \\iff \\forall C \\, (C \\in B \\Rightarrow C \\in A)]$"); + ui->cmbTestset->addItem("De Morgan's law", "$\\neg(P\\land Q)\\iff(\\neg P)\\lor(\\neg Q)$ or $\\overline{\\bigcap_{i \\in I} A_{i}}\\equiv\\bigcup_{i \\in I} \\overline{A_{i}}$ or $\\overline{A \\cup B}\\equiv\\overline{A} \\cap \\overline{B}$"); + ui->cmbTestset->addItem("quadratic formula", "$x=\\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}$"); + ui->cmbTestset->addItem("combination", "$\\binom{n}{k} = \\frac{n(n-1)...(n-k+1)}{k(k-1)\\dots1}=\\frac{n!}{k!(n-k)!}$"); + ui->cmbTestset->addItem("Sophomore's dream 1", "$\\int_0^1 x^{-x}\\,dx = \\sum_{n=1}^\\infty n^{-n}(\\scriptstyle{= 1.29128599706266354040728259059560054149861936827\\dots)}$"); + ui->cmbTestset->addItem("Sophomore's dream 2", "$\\int_0^1 x^x \\,dx = \\sum_{n=1}^\\infty (-1)^{n+1}n^{-n} = - \\sum_{n=1}^\\infty (-n)^{-n} (\\scriptstyle{= 0.78343051071213440705926438652697546940768199014\\dots})$"); + ui->cmbTestset->addItem("divergence 1", "$\\operatorname{div}\\vec{F} = \\nabla\\cdot\\vec{F}=\\frac{\\partial U}{\\partial x}+\\frac{\\partial V}{\\partial y}+\\frac{\\partial W}{\\partial z}$"); + ui->cmbTestset->addItem("divergence 2", "$\\overrightarrow{\\operatorname{div}}\\,(\\mathbf{\\underline{\\underline{\\epsilon}}}) = " + "\\begin{bmatrix}" + "\\frac{\\partial \\epsilon_{xx}}{\\partial x} +\\frac{\\partial \\epsilon_{yx}}{\\partial y} +\\frac{\\partial \\epsilon_{zx}}{\\partial z} \\\\" + "\\frac{\\partial \\epsilon_{xy}}{\\partial x} +\\frac{\\partial \\epsilon_{yy}}{\\partial y} +\\frac{\\partial \\epsilon_{zy}}{\\partial z} \\\\" + "\\frac{\\partial \\epsilon_{xz}}{\\partial x} +\\frac{\\partial \\epsilon_{yz}}{\\partial y} +\\frac{\\partial \\epsilon_{zz}}{\\partial z}" + "\\end{bmatrix}$"); + ui->cmbTestset->addItem("lim, sum ...", "$\\lim_{x\\to\\infty} f(x) = \\binom{k}{r} + \\frac{a}{b} \\sum_{n=1}^\\infty a_n + \\displaystyle{ \\left\\{ \\frac{1}{13} \\sum_{n=1}^\\infty b_n \\right\\} }.$"); + ui->cmbTestset->addItem("array test", "$f(x) := \\left\\{\\begin{array} x^2 \\sin \\frac{1}{x} & \\textrm{if } x \\ne 0, \\\\ 0 & \\textrm{if } x = 0 . \\end{array}\\right.$"); + ui->cmbTestset->addItem("Schwinger-Dyson", "$\\left\\langle\\psi\\left|\\mathcal{T}\\{F \\phi^j\\}\\right|\\psi\\right\\rangle=\\left\\langle\\psi\\left|\\mathcal{T}\\{iF_{,i}D^{ij}-FS_{int,i}D^{ij}\\}\\right|\\psi\\right\\rangle.$"); + ui->cmbTestset->addItem(QLatin1String("Schrödinger's equation"), "$\\left[-\\frac{\\hbar^2}{2m}\\frac{\\partial^2}{\\partial x^2}+V\\right]\\Psi(x)=\\mathrm{i}\\hbar\\frac{\\partial}{\\partial t}\\Psi(x)$"); + ui->cmbTestset->addItem("Cauchy-Schwarz inequality", "$\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)$"); + ui->cmbTestset->addItem("Maxwell's equations", "$\\begin{aligned}\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac{1}{c}\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac{1}{c}\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \\end{aligned}$"); + ui->cmbTestset->addItem("Langevin Equation", "$m \\dot{v}(t) = -\\gamma v(t) + F(x,t)+ f(t)$"); + ui->cmbTestset->addItem("Fokker-Planck Equation", "$\\frac{\\partial}{\\partial t}P(y,t)=-\\frac{\\partial}{\\partial y}\\left[ A(y,t)P(y,t)\\right] +\\frac{\\Gamma}{2}\\frac{\\partial^2}{\\partial y^2}\\left[ P(y,t)\\right]$"); + ui->cmbTestset->addItem("Hamilton Equations of motion", "$\\mathcal{H}(\\mathbf{q},\\mathbf{p})=\\frac{\\mathbf{p}^2}{2\\,m}+V(\\mathbf{q})\\ \\ \\ \\text{and}\\ \\ \\ \\dot{q}_k =\\frac{p_k}{m}\\ ,\\ \\dot{p}_k = - \\frac{\\partial V}{\\partial q_k}$"); + ui->cmbTestset->addItem("Gaussian Distrubution", "$f(x | \\mu,\\sigma^2)=\\frac{1}{\\sqrt{2\\pi\\sigma^2}}\\operatorname{exp}\\left(-\\frac{(x-\\mu)^2}{2\\sigma^2}\\right)=\\frac{1}{\\sqrt{2\\pi\\sigma^2}} e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}\\quad -\\inftycmbTestset->addItem("User-Editable Text"); + // + //ui->cmbTestset->addItem("", "$$"); + //ui->cmbTestset->addItem("", "$$"); + //ui->cmbTestset->addItem("", ""); + ui->cmbTestset->setCurrentIndex(0); + + ui->labMath->setMath("\\left(\\left[\\sqrt{2\\pi\\cdot\\int_{-\\infty}^\\infty f(x)\\;\\mathrm{d}x}\\right]\\right)"); + ui->cmbFont->setCurrentIndex(1); +} + +TestForm::~TestForm() +{ + delete ui; +} + +#define W 2000 +#define H 2000 +#define X1 15 +#define Y1 50 + + + +double TestForm::draw(QPainter& painter, double X, double YY, JKQTmathText& mt, QString name, double& durationSizingMS, double&durationTimingMS) { + + + double Y=YY; + painter.save(); + ht.start(); + QSizeF s=mt.getSize(painter); + Y=Y+mt.getAscent(painter); + durationSizingMS=ht.get_time()/1000.0; + qDebug()<<" sizing in "<chkBoxes->isChecked()); + durationTimingMS=ht.get_time()/1000.0; + qDebug()<<" drawing in "<get_decoration())); + if (decoN->get_child()) ti->addChild(createTree(decoN->get_child(), ti)); + } else if (matrixN) { + int l=matrixN->get_lines(); + int c=matrixN->get_columns(); + name=QString("MTmatrixNode: l*c=%1*%2").arg(l).arg(c); + QVector > children=matrixN->get_children(); + for (int y=0; ysetText(0, QString("(%1,%2):").arg(y).arg(x)+it->text(0)); + ti->addChild(it); + } + } + } + } else if (fracN) { + name=QString("MTfracNode: mode='%1'").arg(JKQTmathText::fracModeToString(fracN->get_mode())); + if (fracN->get_child1()) ti->addChild(createTree(fracN->get_child1(), ti)); + if (fracN->get_child2()) ti->addChild(createTree(fracN->get_child2(), ti)); + } else if (sqrtN) { + name=QString("MTsqrtNode: deg=%1").arg(sqrtN->get_degree()); + if (sqrtN->get_child()) ti->addChild(createTree(sqrtN->get_child(), ti)); + } else if (braceN) { + name=QString("MTbraceNode: l='%1', r='%2', showR=%3").arg(braceN->get_openbrace()).arg(braceN->get_closebrace()).arg(braceN->get_showRightBrace()); + if (braceN->get_child()) ti->addChild(createTree(braceN->get_child(), ti)); + } else if (superN) { + name=QString("MTsuperscriptNode"); + if (superN->get_child()) ti->addChild(createTree(superN->get_child(), ti)); + } else if (subN) { + name=QString("MTsubscriptNode"); + if (subN->get_child()) ti->addChild(createTree(subN->get_child(), ti)); + } else if (inst1N) { + name=QString("MTinstruction1Node: \'%1\'").arg(inst1N->get_name()); + if (inst1N->get_child()) ti->addChild(createTree(inst1N->get_child(), ti)); + } else if (lstN) { + name=QString("MTlistNode"); + QList list=lstN->get_nodes(); + for (int i=0; iaddChild(createTree(list[i], ti)); + } + } else if (symN) { + name=QString("MTsymbolNode: \'%1\'").arg(symN->get_symbolName()); + } else if (spN) { + name=QString("MTwhitespaceNode :\'%1\'").arg(txtN->get_text()); + } else if (txtN) { + name=QString("MTtextNode: \'%1\'").arg(txtN->get_text()); + + } else { + name=QString("unknown"); + } + + ti->setText(0,name); + + /* + QString space=""; + QTreeWidgetItem* p=ti->parent(); + while (p) { + space+=" "; + p=p->parent(); + } + + qDebug()<cmbTestset->currentIndex()==ui->cmbTestset->count()-1) { + mathTest=ui->textBrowserSource->toPlainText(); + ui->textBrowserSource->setReadOnly(false); + ui->btnRender->setEnabled(true); + } else { + mathTest=ui->cmbTestset->itemData(ui->cmbTestset->currentIndex()).toString(); + ui->textBrowserSource->setPlainText(mathTest); + ui->textBrowserSource->setReadOnly(true); + ui->btnRender->setEnabled(false); + } + + ui->scrollArea->setBackgroundRole(QPalette::Dark); + + QPixmap pix(W, H); + pix.fill(); + QPainter painter; + JKQTmathText mt(this); + + + double Y=Y1; + + painter.begin(&pix); + if (ui->chkAntiAlias->isChecked()) painter.setRenderHint(QPainter::Antialiasing); + if (ui->chkAntiAliasHQ->isChecked()) painter.setRenderHint(QPainter::HighQualityAntialiasing); + if (ui->chkAntiAliasText->isChecked()) painter.setRenderHint(QPainter::TextAntialiasing); + if (ui->chkSmoothTransform->isChecked()) painter.setRenderHint(QPainter::QPainter::SmoothPixmapTransform); + ht.start(); + + + mt.set_fontRoman(ui->cmbUnicodeSerif->currentFont().family()); + mt.set_fontMathRoman(ui->cmbUnicodeSerif->currentFont().family()); + mt.set_fontSans(ui->cmbUnicodeSans->currentFont().family()); + mt.set_fontMathSans(ui->cmbUnicodeSans->currentFont().family()); + mt.set_fontTypewriter(ui->cmbUnicodeFixed->currentFont().family()); + mt.set_fontSymbol(ui->cmbUnicodeSymbol->currentFont().family()); + + switch (ui->cmbFont->currentIndex()) { + case 1: mt.useXITS(); break; + case 2: mt.useSTIX(); break; + case 3: mt.useAnyUnicode(ui->cmbUnicodeSans->currentFont().family(),ui->cmbUnicodeSerif->currentFont().family()); break; + case 4: mt.useLatexFonts(ui->edtLatexPrefix->text(), ui->edtLatexPostfix->text()); break; + case 5: mt.useASANA(); break; + + } + + ui->tree->clear(); + ht.start(); + double durationParse=0; + if (mt.parse(mathTest)) { + durationParse=ht.get_time()/1000.0; + ui->tree->addTopLevelItem(createTree(mt.get_parsedNode())); + } else { + durationParse=ht.get_time()/1000.0; + } + ui->labParsingTimes->setText(QString(" %1ms").arg(durationParse, 0, 'f', 3)); + ui->tree->expandAll(); + bool okh=true; + ui->textBrowser->clear(); + qDebug()<<"parse mathTest in "<edtSizes->text().split(","); + ui->labRenderTimes->setText(""); + + for (int i=0; icmbTestset->currentText()).arg(ui->cmbFont->currentText()).arg(size), durationSizingMS, durationTimingMS); + + if (i==0) { + if (mt.get_error_list().size()>0) { + ui->labError->setText(""+mt.get_error_list().join("
")+"
"); + } else { + ui->labError->setText("OK"); + } + } + + ui->labRenderTimes->setText(ui->labRenderTimes->text()+QString(" %1pt: %2ms/%3ms").arg(size).arg(durationSizingMS, 0, 'F', 1).arg(durationTimingMS, 0, 'F', 1)); + ui->textBrowser->textCursor().insertHtml("
"+mt.toHtml(&okh)+"


"); + qDebug()<<"HTML: ---------------------------------------------\n"<label->setPixmap(pix); + QApplication::restoreOverrideCursor(); +} diff --git a/test/jkqtmathtext_test/testform.h b/examples/jkqtmathtext_test/testform.h similarity index 95% rename from test/jkqtmathtext_test/testform.h rename to examples/jkqtmathtext_test/testform.h index ef96bda633..9e8f97bfee 100644 --- a/test/jkqtmathtext_test/testform.h +++ b/examples/jkqtmathtext_test/testform.h @@ -1,34 +1,34 @@ -#ifndef TESTFORM_H -#define TESTFORM_H - -#include -#include -#include "jkqtmathtext/jkqtmathtext.h" -#include "jkqtplottertools/jkqtphighrestimer.h" -#include -#include - - -namespace Ui { - class TestForm; -} - -class TestForm : public QWidget -{ - Q_OBJECT - - public: - explicit TestForm(QWidget *parent = 0); - ~TestForm(); - - public slots: - void updateMath(); - private: - Ui::TestForm *ui; - JKQTPHighResTimer ht; - double draw(QPainter& painter, double X, double YY, JKQTmathText& mt, QString name, double &durationSizingMS, double &durationTimingMS); - - QTreeWidgetItem* createTree(JKQTmathText::MTnode* node, QTreeWidgetItem *parent=NULL); -}; - -#endif // TESTFORM_H +#ifndef TESTFORM_H +#define TESTFORM_H + +#include +#include +#include "jkqtmathtext/jkqtmathtext.h" +#include "jkqtplottertools/jkqtphighrestimer.h" +#include +#include + + +namespace Ui { + class TestForm; +} + +class TestForm : public QWidget +{ + Q_OBJECT + + public: + explicit TestForm(QWidget *parent = 0); + ~TestForm(); + + public slots: + void updateMath(); + private: + Ui::TestForm *ui; + JKQTPHighResTimer ht; + double draw(QPainter& painter, double X, double YY, JKQTmathText& mt, QString name, double &durationSizingMS, double &durationTimingMS); + + QTreeWidgetItem* createTree(JKQTmathText::MTnode* node, QTreeWidgetItem *parent=NULL); +}; + +#endif // TESTFORM_H diff --git a/test/jkqtmathtext_test/testform.ui b/examples/jkqtmathtext_test/testform.ui similarity index 95% rename from test/jkqtmathtext_test/testform.ui rename to examples/jkqtmathtext_test/testform.ui index 768cceff4c..dfc55d2a8f 100644 --- a/test/jkqtmathtext_test/testform.ui +++ b/examples/jkqtmathtext_test/testform.ui @@ -1,672 +1,672 @@ - - - TestForm - - - - 0 - 0 - 1238 - 742 - - - - Form - - - - - - true - - - - - 0 - 0 - 605 - 616 - - - - - - - TextLabel - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - - - 75 - true - - - - render times (getSize()+getAscent()/draw()): - - - - - - - - - testset: - - - - - - - -1 - - - 30 - - - - - - - fonts: - - - - - - - 0 - - - - Symbol - - - - - XITS - - - - - STIX - - - - - Unicode - - - - - LaTeX - - - - - ASANA - - - - - - - - size: - - - - - - - 90,30,20,10 - - - - - - - boxes - - - true - - - - - - - anti-aliase - - - true - - - - - - - HQ anti-aliase - - - - - - - Text anti-aliase - - - true - - - - - - - smooth transform - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - left(left[sqrt{2picdotint_{-infty}^infty f(x);mathrm{d}x}right]right) - - - - - - - - - - 75 - true - - - - LaTeX source: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - false - - - &Render - - - - - - - - - true - - - - - - - - 75 - true - - - - rendered result: - - - - - - - - 75 - true - - - - HTML output: - - - - - - - - - latex prefix/postfix: - - - - - - - - - - - - - Symbol/Unicode fonts: - - - - - - - - Times New Roman - - - - - - - - - Arial - - - - - - - - - Courier New - - - - - - - - symbol font: - - - - - - - - Symbol - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - - - - true - - - - 1 - - - - - - - - - 75 - true - - - - node tree: - - - - - - - - 75 - true - - - - parsing times: - - - - - - - - - - - - - - - - - - - - - - JKQTMathTextLabel - QLabel -
jkqtmathtext/jkqtmathtext.h
-
-
- - - - cmbTestset - currentIndexChanged(int) - TestForm - updateMath() - - - 130 - 20 - - - 421 - 36 - - - - - cmbFont - currentIndexChanged(int) - TestForm - updateMath() - - - 328 - 29 - - - 423 - 89 - - - - - chkBoxes - clicked() - TestForm - updateMath() - - - 790 - 27 - - - 424 - 187 - - - - - chkAntiAlias - clicked() - TestForm - updateMath() - - - 868 - 27 - - - 422 - 220 - - - - - chkAntiAliasHQ - clicked() - TestForm - updateMath() - - - 964 - 27 - - - 423 - 259 - - - - - chkAntiAliasText - clicked() - TestForm - updateMath() - - - 1067 - 27 - - - 424 - 302 - - - - - edtSizes - textChanged(QString) - TestForm - updateMath() - - - 679 - 29 - - - 422 - 160 - - - - - edtLatexPrefix - textChanged(QString) - TestForm - updateMath() - - - 141 - 48 - - - 520 - 140 - - - - - edtLatexPostfix - textChanged(QString) - TestForm - updateMath() - - - 200 - 49 - - - 519 - 118 - - - - - cmbUnicodeSerif - currentFontChanged(QFont) - TestForm - updateMath() - - - 416 - 54 - - - 519 - 201 - - - - - cmbUnicodeSans - currentFontChanged(QFont) - TestForm - updateMath() - - - 553 - 45 - - - 518 - 175 - - - - - cmbUnicodeFixed - currentFontChanged(QFont) - TestForm - updateMath() - - - 949 - 57 - - - 518 - 236 - - - - - cmbUnicodeSymbol - currentFontChanged(QFont) - TestForm - updateMath() - - - 1221 - 57 - - - 520 - 288 - - - - - chkSmoothTransform - clicked() - TestForm - updateMath() - - - 1181 - 27 - - - 519 - 317 - - - - - btnRender - clicked() - TestForm - updateMath() - - - 1187 - 83 - - - 617 - 380 - - - - - - updateMath() - -
+ + + TestForm + + + + 0 + 0 + 1238 + 742 + + + + Form + + + + + + true + + + + + 0 + 0 + 605 + 616 + + + + + + + TextLabel + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + + + 75 + true + + + + render times (getSize()+getAscent()/draw()): + + + + + + + + + testset: + + + + + + + -1 + + + 30 + + + + + + + fonts: + + + + + + + 0 + + + + Symbol + + + + + XITS + + + + + STIX + + + + + Unicode + + + + + LaTeX + + + + + ASANA + + + + + + + + size: + + + + + + + 90,30,20,10 + + + + + + + boxes + + + true + + + + + + + anti-aliase + + + true + + + + + + + HQ anti-aliase + + + + + + + Text anti-aliase + + + true + + + + + + + smooth transform + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + left(left[sqrt{2picdotint_{-infty}^infty f(x);mathrm{d}x}right]right) + + + + + + + + + + 75 + true + + + + LaTeX source: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + &Render + + + + + + + + + true + + + + + + + + 75 + true + + + + rendered result: + + + + + + + + 75 + true + + + + HTML output: + + + + + + + + + latex prefix/postfix: + + + + + + + + + + + + + Symbol/Unicode fonts: + + + + + + + + Times New Roman + + + + + + + + + Arial + + + + + + + + + Courier New + + + + + + + + symbol font: + + + + + + + + Symbol + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + true + + + + 1 + + + + + + + + + 75 + true + + + + node tree: + + + + + + + + 75 + true + + + + parsing times: + + + + + + + + + + + + + + + + + + + + + + JKQTMathTextLabel + QLabel +
jkqtmathtext/jkqtmathtext.h
+
+
+ + + + cmbTestset + currentIndexChanged(int) + TestForm + updateMath() + + + 130 + 20 + + + 421 + 36 + + + + + cmbFont + currentIndexChanged(int) + TestForm + updateMath() + + + 328 + 29 + + + 423 + 89 + + + + + chkBoxes + clicked() + TestForm + updateMath() + + + 790 + 27 + + + 424 + 187 + + + + + chkAntiAlias + clicked() + TestForm + updateMath() + + + 868 + 27 + + + 422 + 220 + + + + + chkAntiAliasHQ + clicked() + TestForm + updateMath() + + + 964 + 27 + + + 423 + 259 + + + + + chkAntiAliasText + clicked() + TestForm + updateMath() + + + 1067 + 27 + + + 424 + 302 + + + + + edtSizes + textChanged(QString) + TestForm + updateMath() + + + 679 + 29 + + + 422 + 160 + + + + + edtLatexPrefix + textChanged(QString) + TestForm + updateMath() + + + 141 + 48 + + + 520 + 140 + + + + + edtLatexPostfix + textChanged(QString) + TestForm + updateMath() + + + 200 + 49 + + + 519 + 118 + + + + + cmbUnicodeSerif + currentFontChanged(QFont) + TestForm + updateMath() + + + 416 + 54 + + + 519 + 201 + + + + + cmbUnicodeSans + currentFontChanged(QFont) + TestForm + updateMath() + + + 553 + 45 + + + 518 + 175 + + + + + cmbUnicodeFixed + currentFontChanged(QFont) + TestForm + updateMath() + + + 949 + 57 + + + 518 + 236 + + + + + cmbUnicodeSymbol + currentFontChanged(QFont) + TestForm + updateMath() + + + 1221 + 57 + + + 520 + 288 + + + + + chkSmoothTransform + clicked() + TestForm + updateMath() + + + 1181 + 27 + + + 519 + 317 + + + + + btnRender + clicked() + TestForm + updateMath() + + + 1187 + 83 + + + 617 + 380 + + + + + + updateMath() + +
diff --git a/test/jkqtplot_test/EmfEngine/CHANGES.txt b/examples/jkqtplot_test/EmfEngine/CHANGES.txt similarity index 97% rename from test/jkqtplot_test/EmfEngine/CHANGES.txt rename to examples/jkqtplot_test/EmfEngine/CHANGES.txt index b5c613903b..88faa95e9e 100644 --- a/test/jkqtplot_test/EmfEngine/CHANGES.txt +++ b/examples/jkqtplot_test/EmfEngine/CHANGES.txt @@ -1,66 +1,66 @@ -EmfEngine GNU GPL v. 3.0 ------------------------- +EmfEngine GNU GPL v. 3.0 +------------------------ 26/07/2010 - Release 0.8 This release improves the support for Unix-like systems, using the GDI API provided by libEMF: - - Fixes compilation issues. + - Fixes compilation issues. - Fixed crash when exporting rotated text strings. - - Fixed drawing of paths. + - Fixed drawing of paths. - Added support for drawing images and tiled pixmaps. ------------------------ - -30/08/2009 - Release 0.7: - - Fixed crash when exporting text strings having a non available font family using the GDI+ backend. - - Improved exporting of texts containing superscripts/subscripts. - ------------------------- - -16/07/2009 - Release 0.6. Improvements for the GDI+ backend: - - Implemented support for pens with custom dash patterns. - - Fixed drawing of polygons. - - Fixed drawing of pixmaps/images. - ------------------------- - -25/05/2009 - Release 0.5: -- Implemented drawPoints(). -- Improved GDI+ backend: - - Fixed clipping. - - Improved drawRects(). - ------------------------- - -07/05/2009 - Release 0.4: - -- Fixed compile errors with Visual Studio 2008. -- Removed clipping in drawTextItem(). -- Improved the build system. -- Added the "EMFENGINE_DLL" and "EMFENGINE_DLL_BUILD" preprocessor flags in order to be able to build using Visual Studio (thanks to David Stranz). - ------------------------- - -22/04/2009 - Release 0.3: - -EmfEngine was completely rewritten using the Windows GDI+ API. The old implementation using Windows GDI (also provided by libEMF on Unix-like systems) is still available if you disable the HAVE_GDI_PLUS option in EmfEngine.pro. -This new implementation adds the following features: - - Antialiasing - - Antialiased texts (if the option HAVE_ANTIALIASED_TEXT is enabled in EmfEngine.pro) - - Transparent brushes - - Support for Qt::LinearGradientPattern and Qt::RadialGradientPattern - ------------------------- - -13/04/2009 - Release 0.2: - -- Implemented drawImage(). -- Implemented drawTiledPixmap(). -- Improved drawPixmap(). -- Implemented rendering of QBrush with style set to Qt::TexturePattern. -- Improved paths handling in drawPath(). -- Fixed polyline drawing in drawPolygon(). -- Modified the example to make use of the new features. ------------------------- - -10/04/2009 - Release 0.1: Initial release. - + +30/08/2009 - Release 0.7: + - Fixed crash when exporting text strings having a non available font family using the GDI+ backend. + - Improved exporting of texts containing superscripts/subscripts. + +------------------------ + +16/07/2009 - Release 0.6. Improvements for the GDI+ backend: + - Implemented support for pens with custom dash patterns. + - Fixed drawing of polygons. + - Fixed drawing of pixmaps/images. + +------------------------ + +25/05/2009 - Release 0.5: +- Implemented drawPoints(). +- Improved GDI+ backend: + - Fixed clipping. + - Improved drawRects(). + +------------------------ + +07/05/2009 - Release 0.4: + +- Fixed compile errors with Visual Studio 2008. +- Removed clipping in drawTextItem(). +- Improved the build system. +- Added the "EMFENGINE_DLL" and "EMFENGINE_DLL_BUILD" preprocessor flags in order to be able to build using Visual Studio (thanks to David Stranz). + +------------------------ + +22/04/2009 - Release 0.3: + +EmfEngine was completely rewritten using the Windows GDI+ API. The old implementation using Windows GDI (also provided by libEMF on Unix-like systems) is still available if you disable the HAVE_GDI_PLUS option in EmfEngine.pro. +This new implementation adds the following features: + - Antialiasing + - Antialiased texts (if the option HAVE_ANTIALIASED_TEXT is enabled in EmfEngine.pro) + - Transparent brushes + - Support for Qt::LinearGradientPattern and Qt::RadialGradientPattern + +------------------------ + +13/04/2009 - Release 0.2: + +- Implemented drawImage(). +- Implemented drawTiledPixmap(). +- Improved drawPixmap(). +- Implemented rendering of QBrush with style set to Qt::TexturePattern. +- Improved paths handling in drawPath(). +- Fixed polyline drawing in drawPolygon(). +- Modified the example to make use of the new features. +------------------------ + +10/04/2009 - Release 0.1: Initial release. + diff --git a/test/jkqtplot_test/EmfEngine/COPYING.txt b/examples/jkqtplot_test/EmfEngine/COPYING.txt similarity index 100% rename from test/jkqtplot_test/EmfEngine/COPYING.txt rename to examples/jkqtplot_test/EmfEngine/COPYING.txt diff --git a/test/jkqtplot_test/EmfEngine/EmfEngine.pro b/examples/jkqtplot_test/EmfEngine/EmfEngine.pro similarity index 79% rename from test/jkqtplot_test/EmfEngine/EmfEngine.pro rename to examples/jkqtplot_test/EmfEngine/EmfEngine.pro index ca67c324d1..4615ffa569 100644 --- a/test/jkqtplot_test/EmfEngine/EmfEngine.pro +++ b/examples/jkqtplot_test/EmfEngine/EmfEngine.pro @@ -1,7 +1,7 @@ -include( config.pri ) - -TEMPLATE = subdirs - -SUBDIRS = \ - src \ +include( config.pri ) + +TEMPLATE = subdirs + +SUBDIRS = \ + src \ example \ No newline at end of file diff --git a/test/jkqtplot_test/EmfEngine/EmfEngine.pro.user b/examples/jkqtplot_test/EmfEngine/EmfEngine.pro.user similarity index 100% rename from test/jkqtplot_test/EmfEngine/EmfEngine.pro.user rename to examples/jkqtplot_test/EmfEngine/EmfEngine.pro.user diff --git a/test/jkqtplot_test/EmfEngine/README.txt b/examples/jkqtplot_test/EmfEngine/README.txt similarity index 98% rename from test/jkqtplot_test/EmfEngine/README.txt rename to examples/jkqtplot_test/EmfEngine/README.txt index f692f0c502..0c9f27e674 100644 --- a/test/jkqtplot_test/EmfEngine/README.txt +++ b/examples/jkqtplot_test/EmfEngine/README.txt @@ -1,28 +1,28 @@ -EmfEngine GNU GPL v. 3.0 ------------------------- -AUTHOR: Ion Vasilief ------------------------- -FEATURES: EmfEngine enables Qt based applications to easily export graphics created using the - QPainter class to the Enhanced MetaFile format (EMF). ---------------------------------------------------------------------------- -DEPENDENCIES: You need Qt (http://www.qtsoftware.com) installed on your system in order to build EmfEngine. - On Unix-like systems you also need libEMF (http://libemf.sourceforge.net/). ---------------------------------------------------------------------------- -COMPILING: EmfEngine uses qmake for the building process. - qmake is part of a Qt distribution: - qmake reads project files, that contain the options and rules how to build a certain project. - A project file ends with the suffix "*.pro". Please read the qmake documentation for more details. - -After installing Qt on your system, type the following command lines: - - $ qmake - $ make - -if you use MinGW, or: - - $ qmake -tp vc -r - -if you use Microsoft Visual Studio (this will generate Visual Studio .vcproj project files in the "src" and "example" folders). ---------------------------------------------------------------------------- -USE: a short demo application is provided in the "example" folder of the source archive. ---------------------------------------------------------------------------- +EmfEngine GNU GPL v. 3.0 +------------------------ +AUTHOR: Ion Vasilief +------------------------ +FEATURES: EmfEngine enables Qt based applications to easily export graphics created using the + QPainter class to the Enhanced MetaFile format (EMF). +--------------------------------------------------------------------------- +DEPENDENCIES: You need Qt (http://www.qtsoftware.com) installed on your system in order to build EmfEngine. + On Unix-like systems you also need libEMF (http://libemf.sourceforge.net/). +--------------------------------------------------------------------------- +COMPILING: EmfEngine uses qmake for the building process. + qmake is part of a Qt distribution: + qmake reads project files, that contain the options and rules how to build a certain project. + A project file ends with the suffix "*.pro". Please read the qmake documentation for more details. + +After installing Qt on your system, type the following command lines: + + $ qmake + $ make + +if you use MinGW, or: + + $ qmake -tp vc -r + +if you use Microsoft Visual Studio (this will generate Visual Studio .vcproj project files in the "src" and "example" folders). +--------------------------------------------------------------------------- +USE: a short demo application is provided in the "example" folder of the source archive. +--------------------------------------------------------------------------- diff --git a/test/jkqtplot_test/EmfEngine/config.pri b/examples/jkqtplot_test/EmfEngine/config.pri similarity index 96% rename from test/jkqtplot_test/EmfEngine/config.pri rename to examples/jkqtplot_test/EmfEngine/config.pri index 97854bc883..68c8d3d697 100644 --- a/test/jkqtplot_test/EmfEngine/config.pri +++ b/examples/jkqtplot_test/EmfEngine/config.pri @@ -1,15 +1,15 @@ -CONFIG += qt warn_on thread -CONFIG += release - -# Comment the following line if you want to build using the GDI backend -win32:CONFIG += HAVE_GDI_PLUS - -# Uncomment the following line if you want to enable text antialiasing (works only with the GDI+ backend enabled) -#DEFINES += HAVE_ANTIALIASED_TEXT - -# Comment the following line if you want to build EmfEngine statically -#CONFIG += EmfEngineDll - - - - +CONFIG += qt warn_on thread +CONFIG += release + +# Comment the following line if you want to build using the GDI backend +win32:CONFIG += HAVE_GDI_PLUS + +# Uncomment the following line if you want to enable text antialiasing (works only with the GDI+ backend enabled) +#DEFINES += HAVE_ANTIALIASED_TEXT + +# Comment the following line if you want to build EmfEngine statically +#CONFIG += EmfEngineDll + + + + diff --git a/test/jkqtplot_test/EmfEngine/example/example.pro b/examples/jkqtplot_test/EmfEngine/example/example.pro similarity index 95% rename from test/jkqtplot_test/EmfEngine/example/example.pro rename to examples/jkqtplot_test/EmfEngine/example/example.pro index d359aa202c..96dc2ac58f 100644 --- a/test/jkqtplot_test/EmfEngine/example/example.pro +++ b/examples/jkqtplot_test/EmfEngine/example/example.pro @@ -1,23 +1,23 @@ -include( ../config.pri ) - -TARGET = example -TEMPLATE = app -CONFIG += warn_on release thread -win32: CONFIG += console - -MOC_DIR = ../tmp -OBJECTS_DIR = ../tmp -DESTDIR = ./ - -INCLUDEPATH += ../src -unix: INCLUDEPATH += /usr/local/include/libEMF - -LIBS += ../libEmfEngine.a - -win32: LIBS += -lgdi32 -unix: LIBS += /usr/local/lib/libEMF.a - -HEADERS = renderarea.h \ - pixmaps.h -SOURCES = main.cpp \ - renderarea.cpp +include( ../config.pri ) + +TARGET = example +TEMPLATE = app +CONFIG += warn_on release thread +win32: CONFIG += console + +MOC_DIR = ../tmp +OBJECTS_DIR = ../tmp +DESTDIR = ./ + +INCLUDEPATH += ../src +unix: INCLUDEPATH += /usr/local/include/libEMF + +LIBS += ../libEmfEngine.a + +win32: LIBS += -lgdi32 +unix: LIBS += /usr/local/lib/libEMF.a + +HEADERS = renderarea.h \ + pixmaps.h +SOURCES = main.cpp \ + renderarea.cpp diff --git a/test/jkqtplot_test/EmfEngine/example/main.cpp b/examples/jkqtplot_test/EmfEngine/example/main.cpp similarity index 95% rename from test/jkqtplot_test/EmfEngine/example/main.cpp rename to examples/jkqtplot_test/EmfEngine/example/main.cpp index af275cd9c7..1a364f193a 100644 --- a/test/jkqtplot_test/EmfEngine/example/main.cpp +++ b/examples/jkqtplot_test/EmfEngine/example/main.cpp @@ -1,20 +1,20 @@ -#include -#include "renderarea.h" -#include - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - RenderArea area; - - area.setGeometry(100, 100, 600, 500); - area.show(); - - EmfPaintDevice emf(QSize(600, 500), QString("example.emf")); - QPainter paint; - paint.begin(&emf); - area.draw(&paint); - paint.end(); - - return app.exec(); -} +#include +#include "renderarea.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + RenderArea area; + + area.setGeometry(100, 100, 600, 500); + area.show(); + + EmfPaintDevice emf(QSize(600, 500), QString("example.emf")); + QPainter paint; + paint.begin(&emf); + area.draw(&paint); + paint.end(); + + return app.exec(); +} diff --git a/test/jkqtplot_test/EmfEngine/example/pixmaps.h b/examples/jkqtplot_test/EmfEngine/example/pixmaps.h similarity index 96% rename from test/jkqtplot_test/EmfEngine/example/pixmaps.h rename to examples/jkqtplot_test/EmfEngine/example/pixmaps.h index 86a2aca988..2cda3c22dc 100644 --- a/test/jkqtplot_test/EmfEngine/example/pixmaps.h +++ b/examples/jkqtplot_test/EmfEngine/example/pixmaps.h @@ -1,805 +1,805 @@ -/* XPM */ -static const char * qt_logo_xpm[] = { -"69 80 364 2", -" c None", -". c #0C481E", -"+ c #135020", -"@ c #3F832C", -"# c #4D932F", -"$ c #509730", -"% c #559C31", -"& c #5AA233", -"* c #569E32", -"= c #4D942F", -"- c #468B2E", -"; c #41852C", -"> c #0E4B1F", -", c #347629", -"' c #60A934", -") c #66B036", -"! c #63AC35", -"~ c #579F32", -"{ c #4E9430", -"] c #478C2E", -"^ c #41862C", -"/ c #124F20", -"( c #59A133", -"_ c #64AD35", -": c #58A032", -"< c #4F9530", -"[ c #488D2E", -"} c #42862C", -"| c #4A8F2E", -"1 c #64AE36", -"2 c #509630", -"3 c #488E2E", -"4 c #42872C", -"5 c #317328", -"6 c #65AF36", -"7 c #5AA333", -"8 c #498E2E", -"9 c #43872D", -"0 c #175521", -"a c #63AD35", -"b c #5BA333", -"c c #519830", -"d c #498F2E", -"e c #43882D", -"f c #2E6F27", -"g c #5CA533", -"h c #529931", -"i c #4A902F", -"j c #44882D", -"k c #40842C", -"l c #5DA634", -"m c #539A31", -"n c #4B902F", -"o c #44892D", -"p c #5FA734", -"q c #549B31", -"r c #0D491E", -"s c #589E37", -"t c #70B04C", -"u c #83BE5D", -"v c #7CBB53", -"w c #6DB43F", -"x c #63AD36", -"y c #286926", -"z c #26622B", -"A c #699665", -"B c #D0E0CF", -"C c #FFFFFF", -"D c #FEFEFD", -"E c #E5F2DD", -"F c #C4E1B2", -"G c #9DCD7F", -"H c #69B23A", -"I c #185722", -"J c #114E20", -"K c #7FA67A", -"L c #EEF6E8", -"M c #A7D18B", -"N c #6BB23C", -"O c #3A7D2B", -"P c #0D481E", -"Q c #1E5A26", -"R c #D4E2D1", -"S c #E0EFD6", -"T c #76B84A", -"U c #63AB35", -"V c #397C2A", -"W c #8DBE74", -"X c #9ECD80", -"Y c #8EC56B", -"Z c #7DBC55", -"` c #6DB33F", -" . c #3F842C", -".. c #175323", -"+. c #D2E1D0", -"@. c #EFF7EA", -"#. c #83BF5D", -"$. c #0D491F", -"%. c #EAF1E9", -"&. c #CBE4BA", -"*. c #B9D1B6", -"=. c #EFF7EB", -"-. c #72B646", -";. c #235F2A", -">. c #65B036", -",. c #1C5A22", -"'. c #487E48", -"). c #F8FAF9", -"!. c #ADC6AB", -"~. c #B7CFB4", -"{. c #D3E8C5", -"]. c #67B037", -"^. c #246324", -"/. c #4F844E", -"(. c #104D20", -"_. c #DBE8D9", -":. c #CCE5BC", -"<. c #7BBB52", -"[. c #114E1F", -"}. c #2A662F", -"|. c #A2C09D", -"1. c #A1CE83", -"2. c #64AE35", -"3. c #0F4D1F", -"4. c #8DB289", -"5. c #65AF35", -"6. c #165321", -"7. c #588A56", -"8. c #E6F2DE", -"9. c #6CB33E", -"0. c #0C491E", -"a. c #104B1F", -"b. c #CCDDC8", -"c. c #E8F3E0", -"d. c #539B31", -"e. c #DCE8DB", -"f. c #BCD3B8", -"g. c #81BE59", -"h. c #2C6D26", -"i. c #2E6932", -"j. c #95C873", -"k. c #3E832B", -"l. c #1C5926", -"m. c #347529", -"n. c #1B5825", -"o. c #EBF4E4", -"p. c #98B993", -"q. c #D4E9C7", -"r. c #296A26", -"s. c #457B44", -"t. c #558853", -"u. c #C9E3B8", -"v. c #155220", -"w. c #568A54", -"x. c #FAFDF9", -"y. c #2D6A2D", -"z. c #0F4B1E", -"A. c #53864F", -"B. c #D9E6D7", -"C. c #BCD2B9", -"D. c #D5E3D2", -"E. c #DAECCF", -"F. c #8DC469", -"G. c #82BF5B", -"H. c #77B94D", -"I. c #589F33", -"J. c #A6C3A1", -"K. c #A7D28C", -"L. c #276826", -"M. c #2D6831", -"N. c #659363", -"O. c #51854F", -"P. c #C5E1B3", -"Q. c #E3EBE0", -"R. c #86C161", -"S. c #FDFEFD", -"T. c #A8C5A1", -"U. c #C6E2B4", -"V. c #145122", -"W. c #FEFFFE", -"X. c #6AB23B", -"Y. c #C5D8C1", -"Z. c #CFE2C8", -"`. c #2C6C27", -" + c #2B6530", -".+ c #F8FBF6", -"++ c #5BA334", -"@+ c #91B48C", -"#+ c #E2EFDA", -"$+ c #1D5B22", -"%+ c #497F49", -"&+ c #F1F8ED", -"*+ c #82AA7F", -"=+ c #F1F8EC", -"-+ c #458536", -";+ c #2F6A33", -">+ c #417841", -",+ c #E7F0E2", -"'+ c #BDD8B3", -")+ c #C3DAB9", -"!+ c #CBDFC4", -"~+ c #DBE9D3", -"{+ c #B7D9A1", -"]+ c #649360", -"^+ c #EAF4E3", -"/+ c #78A274", -"(+ c #478C2D", -"_+ c #6F9C6C", -":+ c #E3F1DB", -"<+ c #0E4A1E", -"[+ c #6D9B69", -"}+ c #7DA578", -"|+ c #DCEDD1", -"1+ c #639260", -"2+ c #7FBD57", -"3+ c #61AA35", -"4+ c #88AE84", -"5+ c #D5E9C8", -"6+ c #598B57", -"7+ c #8CC468", -"8+ c #97B792", -"9+ c #CEE6BF", -"0+ c #1A5821", -"a+ c #9ACB7A", -"b+ c #5AA132", -"c+ c #C8E2B6", -"d+ c #1E5D23", -"e+ c #477D46", -"f+ c #5FA834", -"g+ c #90B38B", -"h+ c #1E5C22", -"i+ c #487D47", -"j+ c #A9D28D", -"k+ c #7AA476", -"l+ c #D1E7C3", -"m+ c #51844E", -"n+ c #9ECD7F", -"o+ c #679563", -"p+ c #D7EBCB", -"q+ c #175421", -"r+ c #93C771", -"s+ c #185621", -"t+ c #558752", -"u+ c #DEEED4", -"v+ c #61915E", -"w+ c #88C263", -"x+ c #1F5E24", -"y+ c #437B44", -"z+ c #E5F1DC", -"A+ c #0F4C1F", -"B+ c #6A9867", -"C+ c #276625", -"D+ c #356E38", -"E+ c #749F70", -"F+ c #73B747", -"G+ c #2D6E27", -"H+ c #28642E", -"I+ c #62AB34", -"J+ c #68B139", -"K+ c #1D5A26", -"L+ c #5EA734", -"M+ c #F7FBF4", -"N+ c #145021", -"O+ c #9EBD99", -"P+ c #E7EFE5", -"Q+ c #91C66F", -"R+ c #DEE9DC", -"S+ c #C2DFAF", -"T+ c #B0D698", -"U+ c #357829", -"V+ c #195524", -"W+ c #99CA79", -"X+ c #578955", -"Y+ c #D0E7C1", -"Z+ c #37703A", -"`+ c #71B645", -" @ c #D1E7C2", -".@ c #E0EFD7", -"+@ c #478D2E", -"@@ c #EBF5E5", -"#@ c #4B902E", -"$@ c #80BE59", -"%@ c #579E32", -"&@ c #ADC7A8", -"*@ c #B8DAA1", -"=@ c #F9FBF8", -"-@ c #6EB440", -";@ c #155321", -">@ c #D6EAC9", -",@ c #3D743E", -"'@ c #C1DFB1", -")@ c #538E44", -"!@ c #437B42", -"~@ c #CCDEC7", -"{@ c #377A2A", -"]@ c #195623", -"^@ c #FCFDFB", -"/@ c #94C873", -"(@ c #4B922F", -"_@ c #67B138", -":@ c #62AB35", -"<@ c #FBFDF9", -"[@ c #5EA634", -"}@ c #7EA77A", -"|@ c #F0F7EB", -"1@ c #8FC56D", -"2@ c #3C7E2A", -"3@ c #427941", -"4@ c #97C977", -"5@ c #6A9866", -"6@ c #E7EEE5", -"7@ c #E4ECE2", -"8@ c #D9EBCD", -"9@ c #EBF2EB", -"0@ c #66AF36", -"a@ c #236324", -"b@ c #387139", -"c@ c #BADBA4", -"d@ c #1F5E23", -"e@ c #4A8049", -"f@ c #F2F8EE", -"g@ c #83BF5C", -"h@ c #2F6C31", -"i@ c #C7DAC3", -"j@ c #EDF6E7", -"k@ c #9DCC7E", -"l@ c #74B749", -"m@ c #F2F7F2", -"n@ c #E1F0D8", -"o@ c #78B94E", -"p@ c #AAC5A6", -"q@ c #A5D189", -"r@ c #6AB23C", -"s@ c #62AD35", -"t@ c #266725", -"u@ c #FDFEFC", -"v@ c #6C9A68", -"w@ c #29642E", -"x@ c #CEE6BE", -"y@ c #62AC35", -"z@ c #AFD595", -"A@ c #77A172", -"B@ c #D5E8CD", -"C@ c #B6D9A1", -"D@ c #25602B", -"E@ c #FAFCFA", -"F@ c #185521", -"G@ c #5B8C59", -"H@ c #A2C19E", -"I@ c #155221", -"J@ c #8CB284", -"K@ c #3D812B", -"L@ c #417F37", -"M@ c #679A5C", -"N@ c #97BF8A", -"O@ c #C8E1B7", -"P@ c #BBDCA5", -"Q@ c #89C264", -"R@ c #45892D", -"S@ c #5BA433", -"T@ c #519831", -"U@ c #5CA433", -"V@ c #5DA534", -"W@ c #4B912F", -" . . + @ # $ % & * = - ; ", -" . . . . > , ' ) ) ) ) ) ) ) ) ) ) ! ~ { ] ^ ", -" . . . . / ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) _ : < [ } ", -" . . . . . | ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 ( 2 3 4 ", -" . . . . . 5 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 7 $ 8 9 ", -" . . . . 0 a ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 b c d e ", -" . . . . . f ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) g h i j ", -" . . . . . k ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) l m n o ", -" . . . . . h ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) p q ", -" . . . . r ! ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' * s t u v w ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) x 3 y z A B C C C C D E F G H ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) c I J K C C C C C C C C C C C L M N ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) O P Q R C C C C C C C C C C C C C C S T ) ) ) ) ) ) ) ) U V V W X Y Z ` ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) .. ..+.C C C C C C C C C C C C C C C C @.#.) ) ) ) ) ) ) { . $.%.C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) # P $.*.C C C C C C C C C C C C C C C C C C =.-.) ) ) ) ) ) V . ;.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) >.,.. '.C C C C C C C C C ).!.~.C C C C C C C C {.].) ) ) ) ) ^.. /.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) e . (._.C C C C C C C C :.<.e [.}.|.C C C C C C C 1.) ) ) ) 2.3.. 4.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) 5.6.. 7.C C C C C C C C 8.9.) ) h 0.a.b.C C C C C C c.].) ) ) d.. . e.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) $ . . f.C C C C C C C C g.) ) ) ) h.. i.C C C C C C C j.) ) ) k.. l.C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) m.. n.C C C C C C C C o.) ) ) ) ) 7 . . p.C C C C C C q.) ) ) r.. s.C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) 0 . t.C C C C C C C C u.) ) ) ) ) ) v.. w.C C C C C C x.y.z.A.B.C.D.C C C C C E.F.G.H.` ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) I.. . J.C C C C C C C C K.) ) ) ) ) ) L.. M.C C C C C C C N.. O.C C C C C C C C C C C C C P.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) 3 . . Q.C C C C C C C C R.) ) ) ) ) ) O . J S.C C C C C C T.. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) O . V.C C C C C C C C W.X.) ) ) ) ) ) # . . Y.C C C C C C Z.. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) `.. +C C C C C C C C .+) ) ) ) ) ) ) ++. . @+C C C C C C #+. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) $+. %+C C C C C C C C &+) ) ) ) ) ) ) ' . . *+C C C C C C =+{ -+;+>+C C C C C C ,+'+)+!+~+{+) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) + . ]+C C C C C C C C ^+) ) ) ) ) ) ) 1 . . /+C C C C C C S.].(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) z.. _+C C C C C C C C :+) ) ) ) ) ) ) ) <+. [+C C C C C C C -.(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) 2.. . }+C C C C C C C C |+) ) ) ) ) ) ) ) [.. 1+C C C C C C C 2+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) 3+. . 4+C C C C C C C C 5+) ) ) ) ) ) ) ) 6.. 6+C C C C C C C 7+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) g . . 8+C C C C C C C C 9+) ) ) ) ) ) ) ) 0+. /.C C C C C C C a+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) b+. . |.C C C C C C C C c+) ) ) ) ) ) ) ) d+. e+C C C C C C C M (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) f+. . g+C C C C C C C C &.) ) ) ) ) ) ) ) h+. i+C C C C C C C j+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) 5.0.. k+C C C C C C C C l+) ) ) ) ) ) ) ) 0+. m+C C C C C C C n+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) [.. o+C C C C C C C C p+) ) ) ) ) ) ) ) q+. 7.C C C C C C C r+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) s+. t+C C C C C C C C u+) ) ) ) ) ) ) ) / . v+C C C C C C C w+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) x+. y+C C C C C C C C z+) ) ) ) ) ) ) ) A+. B+C C C C C C C Z (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) C+. D+C C C C C C C C o.) ) ) ) ) ) ) >.. . E+C C C C C C C F+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) G+. H+C C C C C C C C &+) ) ) ) ) ) ) I+. . K C C C C C C C J+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) m.. K+C C C C C C C C .+) ) ) ) ) ) ) L+. . 4+C C C C C C M+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) O . N+C C C C C C C C C F+) ) ) ) ) ) : . . O+C C C C C C c.) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) (+. 0.P+C C C C C C C C Q+) ) ) ) ) ) (+. . R+C C C C C C S+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) g . . p.C C C C C C C C T+) ) ) ) ) ) U+. V+C C C C C C C W+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) 0 . X+C C C C C C C C Y+) ) ) ) ) ) ^.. Z+C C C C C C D `+) (+. / C C C C C C @) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) G+. H+C C C C C C C C @.) ) ) ) ) ) / . ]+C C C C C C .@) ) +@. / C C C C C C @@) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) #@. $.D.C C C C C C C C $@) ) ) ) %@. . &@C C C C C C *@) ) = . $.=@C C C C C W.-@) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) 5.;@. v+C C C C C C C C >@) ) ) ) L.. ,@C C C C C C C Y ) ) ~ . . R C C C C C C '@)@!@/+~@) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) {@. ]@^@C C C C C C C C /@) ) (@. / _.C C C C C C 8._@) ) :@. . &@C C C C C C C C C C <@) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) [@[.. }@C C C C C C C C |@1@2@(.3@*.C C C C C C C 4@) ) ) ) ,.. 5@C C C C C C C C C C x.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) } . / e.C C C C C C C C C 6@7@C C C C C C C C 8@) ) ) ) ) 8 . N+9@C C C C C C C C C <@) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) 0@a@. b@S.C C C C C C C C C C C C C C C C C L F+) ) ) ) ) 0@y . '.=@C C C C C C C z+c@) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) 3+d@. e@C C C C C C C C C C C C C C C C f@g@) ) ) ) ) ) ) ) j ^.h@g+i@=@j@P.k@l@) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) 3+a@. %+m@C C C C C C C C C C C C C n@o@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0@9 [.K+p@C C C C C C C C C C o.q@r@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) s@[ t@;.A P+C C C C C C u@-@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 [.. v@C C C C C C C r+) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) `.. w@C C C C C C C x@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) y@ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) [ . P _.C C C C C C C z@F+) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ~ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) :@z.. A@C C C C C C C C D B@C@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) < ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) f . D@E@C C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) - ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3+F@. G@C C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) y@ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) m <+P H@C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) n ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) # $+I@J@^@C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0@= K@L@M@N@O@U.P@M Q@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3+ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) L+ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 ~ o ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 b c i R@ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 S@T@i o ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) U@h i o ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) g h i o ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) V@h i o ", -" . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) V@m n o ", -" . . / ) ) ) ) ) ) ) ) ) ) ) ) l m n o ", -" . / ) ) ) ) ) ) L+m W@o ", -" v.L+m W@R@ "}; - -/* XPM */ -static const char * brick_xpm[] = { -"32 16 338 2", -" c #ECDAA8", -". c #EEDDA8", -"+ c #F0E0A8", -"@ c #F0E2A8", -"# c #F2E3A8", -"$ c #F2E4A8", -"% c #F1E3A8", -"& c #F1E2A8", -"* c #EEDEA8", -"= c #EEDBA8", -"- c #EBD9A8", -"; c #EAD6A8", -"> c #E9D4A8", -", c #E7D1A8", -"' c #E6CDA8", -") c #E6CFA8", -"! c #E7D0A8", -"~ c #E8D2A8", -"{ c #E6CEA8", -"] c #E4CCA8", -"^ c #E3CAA8", -"/ c #E2C7A8", -"( c #E1C6A8", -"_ c #E1C5A8", -": c #E4CBA8", -"< c #EBD7A8", -"[ c #EFDFA8", -"} c #473600", -"| c #ECDBA8", -"1 c #E7D083", -"2 c #EBD783", -"3 c #EDD983", -"4 c #EEDC83", -"5 c #F0DF83", -"6 c #F1E283", -"7 c #EDDA83", -"8 c #EBD683", -"9 c #E5CC83", -"0 c #E4C983", -"a c #E2C683", -"b c #E0C183", -"c c #DDBD83", -"d c #DEBE83", -"e c #E0C283", -"f c #DFBF83", -"g c #DCBC83", -"h c #D9B683", -"i c #D7B283", -"j c #D5AF83", -"k c #D6AF83", -"l c #D7B383", -"m c #654D00", -"n c #463400", -"o c #E9D283", -"p c #E4C84D", -"q c #E8CD4D", -"r c #EAD24D", -"s c #EDD84D", -"t c #F1DF4D", -"u c #F0DC4D", -"v c #EBD34D", -"w c #DFBE4D", -"x c #DAB64D", -"y c #D9B44D", -"z c #D8B24D", -"A c #D4AC4D", -"B c #D1A44D", -"C c #CFA14D", -"D c #D1A54D", -"E c #D2A64D", -"F c #CA984D", -"G c #C6924D", -"H c #C6904D", -"I c #C48F4D", -"J c #C6914D", -"K c #C9964D", -"L c #D7AF4D", -"M c #8D6900", -"N c #634B00", -"O c #EBD583", -"P c #E5CA4D", -"Q c #E2C000", -"R c #E4C400", -"S c #EBD100", -"T c #EFD800", -"U c #EDD400", -"V c #E6C800", -"W c #DCB600", -"X c #D4A800", -"Y c #CB9700", -"Z c #C48B00", -"` c #C38800", -" . c #C28700", -".. c #BC7C00", -"+. c #B87500", -"@. c #B97700", -"#. c #B77300", -"$. c #B46E00", -"%. c #AF6300", -"&. c #AB5E00", -"*. c #AD6000", -"=. c #AA5B00", -"-. c #A95A00", -";. c #AC5E00", -">. c #B36C00", -",. c #BB7900", -"'. c #C08400", -"). c #8A6400", -"!. c #634900", -"~. c #ECD883", -"{. c #E8CE4D", -"]. c #E3C300", -"^. c #E8CC00", -"/. c #F1DD00", -"(. c #EDD500", -"_. c #E5C600", -":. c #D4A700", -"<. c #CA9500", -"[. c #C08200", -"}. c #BD7E00", -"|. c #BC7B00", -"1. c #B67200", -"2. c #B36B00", -"3. c #B26A00", -"4. c #B06600", -"5. c #AB5F00", -"6. c #A65500", -"7. c #A45000", -"8. c #A65400", -"9. c #B06500", -"0. c #B57000", -"a. c #BA7800", -"b. c #886000", -"c. c #624800", -"d. c #E9D14D", -"e. c #E4C500", -"f. c #EBD200", -"g. c #F1DC00", -"h. c #F0DB00", -"i. c #ECD400", -"j. c #E2C200", -"k. c #D6AC00", -"l. c #C48A00", -"m. c #BF8200", -"n. c #B77400", -"o. c #B36A00", -"p. c #AF6500", -"q. c #AD6100", -"r. c #AC5F00", -"s. c #AF6400", -"t. c #AB5C00", -"u. c #A14A00", -"v. c #A04900", -"w. c #A45100", -"x. c #AD5F00", -"y. c #B56F00", -"z. c #835500", -"A. c #5E4000", -"B. c #432F00", -"C. c #F4E7A8", -"D. c #F0E083", -"E. c #EAD34D", -"F. c #E5C700", -"G. c #ECD300", -"H. c #EFD900", -"I. c #DAB300", -"J. c #CD9C00", -"K. c #BE8000", -"L. c #A95800", -"M. c #A85800", -"N. c #A75500", -"O. c #AA5C00", -"P. c #A75600", -"Q. c #A24C00", -"R. c #A55200", -"S. c #AB5D00", -"T. c #B06700", -"U. c #7E4D00", -"V. c #593800", -"W. c #3F2800", -"X. c #F5E8A8", -"Y. c #EBD74D", -"Z. c #E9CF00", -"`. c #E0BD00", -" + c #D7AE00", -".+ c #CE9D00", -"++ c #C89200", -"@+ c #C58C00", -"#+ c #BF8100", -"$+ c #A24D00", -"%+ c #A85700", -"&+ c #A95900", -"*+ c #B26900", -"=+ c #7D4B00", -"-+ c #583500", -";+ c #3D2600", -">+ c #F3E6A8", -",+ c #EED94D", -"'+ c #E9CE00", -")+ c #E5C500", -"!+ c #DBB500", -"~+ c #D1A100", -"{+ c #C79000", -"]+ c #C18400", -"^+ c #C08300", -"/+ c #B97500", -"(+ c #A04800", -"_+ c #9D4300", -":+ c #9F4700", -"<+ c #A34F00", -"[+ c #A65300", -"}+ c #A44F00", -"|+ c #AC6000", -"1+ c #AE6200", -"2+ c #B16700", -"3+ c #7C4A00", -"4+ c #583600", -"5+ c #3D2500", -"6+ c #EFDC4D", -"7+ c #D8AF00", -"8+ c #CF9F00", -"9+ c #C58D00", -"0+ c #BA7900", -"a+ c #B67100", -"b+ c #9C4100", -"c+ c #9C4200", -"d+ c #9E4500", -"e+ c #A14B00", -"f+ c #9F4800", -"g+ c #AE6400", -"h+ c #B46C00", -"i+ c #7D4C00", -"j+ c #F2E283", -"k+ c #E5C800", -"l+ c #E7CA00", -"m+ c #DEB900", -"n+ c #D6AA00", -"o+ c #D1A200", -"p+ c #C79100", -"q+ c #BB7C00", -"r+ c #B46F00", -"s+ c #B16900", -"t+ c #A34D00", -"u+ c #A04700", -"v+ c #9B4000", -"w+ c #9F4500", -"x+ c #9E4400", -"y+ c #A24E00", -"z+ c #7F5000", -"A+ c #5A3900", -"B+ c #3E2800", -"C+ c #F2E5A8", -"D+ c #EFDD83", -"E+ c #E7CD4D", -"F+ c #DDB800", -"G+ c #DBB400", -"H+ c #D2A300", -"I+ c #C99400", -"J+ c #9E4600", -"K+ c #9B4100", -"L+ c #993C00", -"M+ c #9F4600", -"N+ c #9A3F00", -"O+ c #5B3C00", -"P+ c #412D00", -"Q+ c #F0E1A8", -"R+ c #EAD483", -"S+ c #DDBC4D", -"T+ c #CF9E00", -"U+ c #D5AB00", -"V+ c #CE9C00", -"W+ c #C99200", -"X+ c #C28600", -"Y+ c #B97600", -"Z+ c #9B3F00", -"`+ c #B16800", -" @ c #805100", -".@ c #5D3F00", -"+@ c #443100", -"@@ c #8C6500", -"#@ c #8A6300", -"$@ c #917000", -"%@ c #927200", -"&@ c #906E00", -"*@ c #906F00", -"=@ c #8E6900", -"-@ c #885E00", -";@ c #825400", -">@ c #7B4800", -",@ c #753B00", -"'@ c #713400", -")@ c #6F3200", -"!@ c #703400", -"~@ c #713600", -"{@ c #703300", -"]@ c #6F3100", -"^@ c #723600", -"/@ c #753E00", -"(@ c #784200", -"_@ c #794500", -":@ c #835700", -"<@ c #5F4200", -"[@ c #443200", -"}@ c #604400", -"|@ c #5F4300", -"1@ c #624900", -"2@ c #634A00", -"3@ c #654C00", -"4@ c #5B3D00", -"5@ c #573400", -"6@ c #532D00", -"7@ c #512800", -"8@ c #4E2400", -"9@ c #502700", -"0@ c #502800", -"a@ c #502600", -"b@ c #522A00", -"c@ c #542F00", -"d@ c #553100", -"e@ c #573300", -"f@ c #593900", -"g@ c #5B3B00", -"h@ c #5C3D00", -"i@ c #5E4200", -"j@ c #604500", -"k@ c #433100", -"l@ c #422D00", -"m@ c #422F00", -"n@ c #3E2700", -"o@ c #3D2400", -"p@ c #3B2300", -"q@ c #391F00", -"r@ c #391D00", -"s@ c #391E00", -"t@ c #381C00", -"u@ c #381B00", -"v@ c #402B00", -"w@ c #453400", -" . + @ # $ % & + * = - ; > , ' ) ! ~ ! { ] ^ / ( _ : ~ < = [ } ", -"| 1 2 3 4 5 6 5 7 8 1 9 0 a b c d e e f g h i j k k l g 0 1 m n ", -"* o p q r s t u v p w x y z A B C D E C F G H I I J K C L M N } ", -"@ O P Q R S T U V W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.} ", -"% ~.{.].^.T /.(._.W :.<.[.}.|.1.2.2.$.3.4.5.=.6.7.8.9.0.a.b.c.n ", -"$ 4 d.e.f.g.h.i.j.k.Y l.m.n.o.p.q.r.s.4.&.t.6.u.v.w.x.>.y.z.A.B.", -"C.D.E.F.G.H.f.e.I.J.l.m.K.>.L.M.N.w.O.&.8.P.P.Q.v.R.S.T.2.U.V.W.", -"X.6 Y.V Z.^.`. +.+++@+#+K.2.R.Q.Q.$+M.M.$+7.%+P.N.M.&+*.*+=+-+;+", -">+6 ,+'+Z.)+!+~+{+]+^+}./+*+P.(+_+:+<+[+Q.}+-.|+*.1+3.3.2+3+4+5+", -"$ 6 6+S '+Q 7+8+9+0+0.a+>.1+%+u.b+c+d+e+f+Q.M.g+2+h+@.+.2.i+V.;+", -">+j+s k+l+m+n+o+p+q+r+s+*.6.t+u+c+v+_+w+x+_+y+1+*+>.h+2.*+z+A+B+", -"C+D+E+I.F+G+ +H+I+m.1.4.8.v.u+J+K+L+_+M+N+L+M+L.9.s.1+s.2+z+O+P+", -"Q+R+S+T+U+ +X V+W+X+Y+4.[+:+J+u.:+N+_+_+Z+d+$+N.S.S.g+2+`+ @.@+@", -"* 1 @@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@)@!@^@/@(@_@>@=+z+z+:@<@[@", -"| c.}@|@1@2@2@3@c.4@V.5@6@7@8@9@0@a@8@8@b@c@d@e@5@f@g@g@h@i@j@k@", -"l@m@B.B.B.[@[@[@P+n@;+o@p@q@r@s@s@t@u@t@s@o@n@n@B+v@l@B.B.[@w@[@"}; +/* XPM */ +static const char * qt_logo_xpm[] = { +"69 80 364 2", +" c None", +". c #0C481E", +"+ c #135020", +"@ c #3F832C", +"# c #4D932F", +"$ c #509730", +"% c #559C31", +"& c #5AA233", +"* c #569E32", +"= c #4D942F", +"- c #468B2E", +"; c #41852C", +"> c #0E4B1F", +", c #347629", +"' c #60A934", +") c #66B036", +"! c #63AC35", +"~ c #579F32", +"{ c #4E9430", +"] c #478C2E", +"^ c #41862C", +"/ c #124F20", +"( c #59A133", +"_ c #64AD35", +": c #58A032", +"< c #4F9530", +"[ c #488D2E", +"} c #42862C", +"| c #4A8F2E", +"1 c #64AE36", +"2 c #509630", +"3 c #488E2E", +"4 c #42872C", +"5 c #317328", +"6 c #65AF36", +"7 c #5AA333", +"8 c #498E2E", +"9 c #43872D", +"0 c #175521", +"a c #63AD35", +"b c #5BA333", +"c c #519830", +"d c #498F2E", +"e c #43882D", +"f c #2E6F27", +"g c #5CA533", +"h c #529931", +"i c #4A902F", +"j c #44882D", +"k c #40842C", +"l c #5DA634", +"m c #539A31", +"n c #4B902F", +"o c #44892D", +"p c #5FA734", +"q c #549B31", +"r c #0D491E", +"s c #589E37", +"t c #70B04C", +"u c #83BE5D", +"v c #7CBB53", +"w c #6DB43F", +"x c #63AD36", +"y c #286926", +"z c #26622B", +"A c #699665", +"B c #D0E0CF", +"C c #FFFFFF", +"D c #FEFEFD", +"E c #E5F2DD", +"F c #C4E1B2", +"G c #9DCD7F", +"H c #69B23A", +"I c #185722", +"J c #114E20", +"K c #7FA67A", +"L c #EEF6E8", +"M c #A7D18B", +"N c #6BB23C", +"O c #3A7D2B", +"P c #0D481E", +"Q c #1E5A26", +"R c #D4E2D1", +"S c #E0EFD6", +"T c #76B84A", +"U c #63AB35", +"V c #397C2A", +"W c #8DBE74", +"X c #9ECD80", +"Y c #8EC56B", +"Z c #7DBC55", +"` c #6DB33F", +" . c #3F842C", +".. c #175323", +"+. c #D2E1D0", +"@. c #EFF7EA", +"#. c #83BF5D", +"$. c #0D491F", +"%. c #EAF1E9", +"&. c #CBE4BA", +"*. c #B9D1B6", +"=. c #EFF7EB", +"-. c #72B646", +";. c #235F2A", +">. c #65B036", +",. c #1C5A22", +"'. c #487E48", +"). c #F8FAF9", +"!. c #ADC6AB", +"~. c #B7CFB4", +"{. c #D3E8C5", +"]. c #67B037", +"^. c #246324", +"/. c #4F844E", +"(. c #104D20", +"_. c #DBE8D9", +":. c #CCE5BC", +"<. c #7BBB52", +"[. c #114E1F", +"}. c #2A662F", +"|. c #A2C09D", +"1. c #A1CE83", +"2. c #64AE35", +"3. c #0F4D1F", +"4. c #8DB289", +"5. c #65AF35", +"6. c #165321", +"7. c #588A56", +"8. c #E6F2DE", +"9. c #6CB33E", +"0. c #0C491E", +"a. c #104B1F", +"b. c #CCDDC8", +"c. c #E8F3E0", +"d. c #539B31", +"e. c #DCE8DB", +"f. c #BCD3B8", +"g. c #81BE59", +"h. c #2C6D26", +"i. c #2E6932", +"j. c #95C873", +"k. c #3E832B", +"l. c #1C5926", +"m. c #347529", +"n. c #1B5825", +"o. c #EBF4E4", +"p. c #98B993", +"q. c #D4E9C7", +"r. c #296A26", +"s. c #457B44", +"t. c #558853", +"u. c #C9E3B8", +"v. c #155220", +"w. c #568A54", +"x. c #FAFDF9", +"y. c #2D6A2D", +"z. c #0F4B1E", +"A. c #53864F", +"B. c #D9E6D7", +"C. c #BCD2B9", +"D. c #D5E3D2", +"E. c #DAECCF", +"F. c #8DC469", +"G. c #82BF5B", +"H. c #77B94D", +"I. c #589F33", +"J. c #A6C3A1", +"K. c #A7D28C", +"L. c #276826", +"M. c #2D6831", +"N. c #659363", +"O. c #51854F", +"P. c #C5E1B3", +"Q. c #E3EBE0", +"R. c #86C161", +"S. c #FDFEFD", +"T. c #A8C5A1", +"U. c #C6E2B4", +"V. c #145122", +"W. c #FEFFFE", +"X. c #6AB23B", +"Y. c #C5D8C1", +"Z. c #CFE2C8", +"`. c #2C6C27", +" + c #2B6530", +".+ c #F8FBF6", +"++ c #5BA334", +"@+ c #91B48C", +"#+ c #E2EFDA", +"$+ c #1D5B22", +"%+ c #497F49", +"&+ c #F1F8ED", +"*+ c #82AA7F", +"=+ c #F1F8EC", +"-+ c #458536", +";+ c #2F6A33", +">+ c #417841", +",+ c #E7F0E2", +"'+ c #BDD8B3", +")+ c #C3DAB9", +"!+ c #CBDFC4", +"~+ c #DBE9D3", +"{+ c #B7D9A1", +"]+ c #649360", +"^+ c #EAF4E3", +"/+ c #78A274", +"(+ c #478C2D", +"_+ c #6F9C6C", +":+ c #E3F1DB", +"<+ c #0E4A1E", +"[+ c #6D9B69", +"}+ c #7DA578", +"|+ c #DCEDD1", +"1+ c #639260", +"2+ c #7FBD57", +"3+ c #61AA35", +"4+ c #88AE84", +"5+ c #D5E9C8", +"6+ c #598B57", +"7+ c #8CC468", +"8+ c #97B792", +"9+ c #CEE6BF", +"0+ c #1A5821", +"a+ c #9ACB7A", +"b+ c #5AA132", +"c+ c #C8E2B6", +"d+ c #1E5D23", +"e+ c #477D46", +"f+ c #5FA834", +"g+ c #90B38B", +"h+ c #1E5C22", +"i+ c #487D47", +"j+ c #A9D28D", +"k+ c #7AA476", +"l+ c #D1E7C3", +"m+ c #51844E", +"n+ c #9ECD7F", +"o+ c #679563", +"p+ c #D7EBCB", +"q+ c #175421", +"r+ c #93C771", +"s+ c #185621", +"t+ c #558752", +"u+ c #DEEED4", +"v+ c #61915E", +"w+ c #88C263", +"x+ c #1F5E24", +"y+ c #437B44", +"z+ c #E5F1DC", +"A+ c #0F4C1F", +"B+ c #6A9867", +"C+ c #276625", +"D+ c #356E38", +"E+ c #749F70", +"F+ c #73B747", +"G+ c #2D6E27", +"H+ c #28642E", +"I+ c #62AB34", +"J+ c #68B139", +"K+ c #1D5A26", +"L+ c #5EA734", +"M+ c #F7FBF4", +"N+ c #145021", +"O+ c #9EBD99", +"P+ c #E7EFE5", +"Q+ c #91C66F", +"R+ c #DEE9DC", +"S+ c #C2DFAF", +"T+ c #B0D698", +"U+ c #357829", +"V+ c #195524", +"W+ c #99CA79", +"X+ c #578955", +"Y+ c #D0E7C1", +"Z+ c #37703A", +"`+ c #71B645", +" @ c #D1E7C2", +".@ c #E0EFD7", +"+@ c #478D2E", +"@@ c #EBF5E5", +"#@ c #4B902E", +"$@ c #80BE59", +"%@ c #579E32", +"&@ c #ADC7A8", +"*@ c #B8DAA1", +"=@ c #F9FBF8", +"-@ c #6EB440", +";@ c #155321", +">@ c #D6EAC9", +",@ c #3D743E", +"'@ c #C1DFB1", +")@ c #538E44", +"!@ c #437B42", +"~@ c #CCDEC7", +"{@ c #377A2A", +"]@ c #195623", +"^@ c #FCFDFB", +"/@ c #94C873", +"(@ c #4B922F", +"_@ c #67B138", +":@ c #62AB35", +"<@ c #FBFDF9", +"[@ c #5EA634", +"}@ c #7EA77A", +"|@ c #F0F7EB", +"1@ c #8FC56D", +"2@ c #3C7E2A", +"3@ c #427941", +"4@ c #97C977", +"5@ c #6A9866", +"6@ c #E7EEE5", +"7@ c #E4ECE2", +"8@ c #D9EBCD", +"9@ c #EBF2EB", +"0@ c #66AF36", +"a@ c #236324", +"b@ c #387139", +"c@ c #BADBA4", +"d@ c #1F5E23", +"e@ c #4A8049", +"f@ c #F2F8EE", +"g@ c #83BF5C", +"h@ c #2F6C31", +"i@ c #C7DAC3", +"j@ c #EDF6E7", +"k@ c #9DCC7E", +"l@ c #74B749", +"m@ c #F2F7F2", +"n@ c #E1F0D8", +"o@ c #78B94E", +"p@ c #AAC5A6", +"q@ c #A5D189", +"r@ c #6AB23C", +"s@ c #62AD35", +"t@ c #266725", +"u@ c #FDFEFC", +"v@ c #6C9A68", +"w@ c #29642E", +"x@ c #CEE6BE", +"y@ c #62AC35", +"z@ c #AFD595", +"A@ c #77A172", +"B@ c #D5E8CD", +"C@ c #B6D9A1", +"D@ c #25602B", +"E@ c #FAFCFA", +"F@ c #185521", +"G@ c #5B8C59", +"H@ c #A2C19E", +"I@ c #155221", +"J@ c #8CB284", +"K@ c #3D812B", +"L@ c #417F37", +"M@ c #679A5C", +"N@ c #97BF8A", +"O@ c #C8E1B7", +"P@ c #BBDCA5", +"Q@ c #89C264", +"R@ c #45892D", +"S@ c #5BA433", +"T@ c #519831", +"U@ c #5CA433", +"V@ c #5DA534", +"W@ c #4B912F", +" . . + @ # $ % & * = - ; ", +" . . . . > , ' ) ) ) ) ) ) ) ) ) ) ! ~ { ] ^ ", +" . . . . / ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) _ : < [ } ", +" . . . . . | ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 ( 2 3 4 ", +" . . . . . 5 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 7 $ 8 9 ", +" . . . . 0 a ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 b c d e ", +" . . . . . f ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) g h i j ", +" . . . . . k ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) l m n o ", +" . . . . . h ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) p q ", +" . . . . r ! ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' * s t u v w ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) x 3 y z A B C C C C D E F G H ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) c I J K C C C C C C C C C C C L M N ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) O P Q R C C C C C C C C C C C C C C S T ) ) ) ) ) ) ) ) U V V W X Y Z ` ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) .. ..+.C C C C C C C C C C C C C C C C @.#.) ) ) ) ) ) ) { . $.%.C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) # P $.*.C C C C C C C C C C C C C C C C C C =.-.) ) ) ) ) ) V . ;.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) >.,.. '.C C C C C C C C C ).!.~.C C C C C C C C {.].) ) ) ) ) ^.. /.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) e . (._.C C C C C C C C :.<.e [.}.|.C C C C C C C 1.) ) ) ) 2.3.. 4.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) 5.6.. 7.C C C C C C C C 8.9.) ) h 0.a.b.C C C C C C c.].) ) ) d.. . e.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) $ . . f.C C C C C C C C g.) ) ) ) h.. i.C C C C C C C j.) ) ) k.. l.C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) m.. n.C C C C C C C C o.) ) ) ) ) 7 . . p.C C C C C C q.) ) ) r.. s.C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) 0 . t.C C C C C C C C u.) ) ) ) ) ) v.. w.C C C C C C x.y.z.A.B.C.D.C C C C C E.F.G.H.` ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) I.. . J.C C C C C C C C K.) ) ) ) ) ) L.. M.C C C C C C C N.. O.C C C C C C C C C C C C C P.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) 3 . . Q.C C C C C C C C R.) ) ) ) ) ) O . J S.C C C C C C T.. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) O . V.C C C C C C C C W.X.) ) ) ) ) ) # . . Y.C C C C C C Z.. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) `.. +C C C C C C C C .+) ) ) ) ) ) ) ++. . @+C C C C C C #+. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) $+. %+C C C C C C C C &+) ) ) ) ) ) ) ' . . *+C C C C C C =+{ -+;+>+C C C C C C ,+'+)+!+~+{+) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) + . ]+C C C C C C C C ^+) ) ) ) ) ) ) 1 . . /+C C C C C C S.].(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) z.. _+C C C C C C C C :+) ) ) ) ) ) ) ) <+. [+C C C C C C C -.(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) 2.. . }+C C C C C C C C |+) ) ) ) ) ) ) ) [.. 1+C C C C C C C 2+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) 3+. . 4+C C C C C C C C 5+) ) ) ) ) ) ) ) 6.. 6+C C C C C C C 7+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) g . . 8+C C C C C C C C 9+) ) ) ) ) ) ) ) 0+. /.C C C C C C C a+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) b+. . |.C C C C C C C C c+) ) ) ) ) ) ) ) d+. e+C C C C C C C M (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) f+. . g+C C C C C C C C &.) ) ) ) ) ) ) ) h+. i+C C C C C C C j+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) 5.0.. k+C C C C C C C C l+) ) ) ) ) ) ) ) 0+. m+C C C C C C C n+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) [.. o+C C C C C C C C p+) ) ) ) ) ) ) ) q+. 7.C C C C C C C r+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) s+. t+C C C C C C C C u+) ) ) ) ) ) ) ) / . v+C C C C C C C w+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) x+. y+C C C C C C C C z+) ) ) ) ) ) ) ) A+. B+C C C C C C C Z (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) C+. D+C C C C C C C C o.) ) ) ) ) ) ) >.. . E+C C C C C C C F+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) G+. H+C C C C C C C C &+) ) ) ) ) ) ) I+. . K C C C C C C C J+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) m.. K+C C C C C C C C .+) ) ) ) ) ) ) L+. . 4+C C C C C C M+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) O . N+C C C C C C C C C F+) ) ) ) ) ) : . . O+C C C C C C c.) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) (+. 0.P+C C C C C C C C Q+) ) ) ) ) ) (+. . R+C C C C C C S+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) g . . p.C C C C C C C C T+) ) ) ) ) ) U+. V+C C C C C C C W+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) 0 . X+C C C C C C C C Y+) ) ) ) ) ) ^.. Z+C C C C C C D `+) (+. / C C C C C C @) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) G+. H+C C C C C C C C @.) ) ) ) ) ) / . ]+C C C C C C .@) ) +@. / C C C C C C @@) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) #@. $.D.C C C C C C C C $@) ) ) ) %@. . &@C C C C C C *@) ) = . $.=@C C C C C W.-@) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) 5.;@. v+C C C C C C C C >@) ) ) ) L.. ,@C C C C C C C Y ) ) ~ . . R C C C C C C '@)@!@/+~@) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) {@. ]@^@C C C C C C C C /@) ) (@. / _.C C C C C C 8._@) ) :@. . &@C C C C C C C C C C <@) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) [@[.. }@C C C C C C C C |@1@2@(.3@*.C C C C C C C 4@) ) ) ) ,.. 5@C C C C C C C C C C x.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) } . / e.C C C C C C C C C 6@7@C C C C C C C C 8@) ) ) ) ) 8 . N+9@C C C C C C C C C <@) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) 0@a@. b@S.C C C C C C C C C C C C C C C C C L F+) ) ) ) ) 0@y . '.=@C C C C C C C z+c@) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) 3+d@. e@C C C C C C C C C C C C C C C C f@g@) ) ) ) ) ) ) ) j ^.h@g+i@=@j@P.k@l@) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) 3+a@. %+m@C C C C C C C C C C C C C n@o@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0@9 [.K+p@C C C C C C C C C C o.q@r@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) s@[ t@;.A P+C C C C C C u@-@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 [.. v@C C C C C C C r+) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) `.. w@C C C C C C C x@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) y@ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) [ . P _.C C C C C C C z@F+) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ~ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) :@z.. A@C C C C C C C C D B@C@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) < ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) f . D@E@C C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) - ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3+F@. G@C C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) y@ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) m <+P H@C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) n ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) # $+I@J@^@C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0@= K@L@M@N@O@U.P@M Q@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3+ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) L+ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 ~ o ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 b c i R@ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 S@T@i o ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) U@h i o ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) g h i o ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) V@h i o ", +" . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) V@m n o ", +" . . / ) ) ) ) ) ) ) ) ) ) ) ) l m n o ", +" . / ) ) ) ) ) ) L+m W@o ", +" v.L+m W@R@ "}; + +/* XPM */ +static const char * brick_xpm[] = { +"32 16 338 2", +" c #ECDAA8", +". c #EEDDA8", +"+ c #F0E0A8", +"@ c #F0E2A8", +"# c #F2E3A8", +"$ c #F2E4A8", +"% c #F1E3A8", +"& c #F1E2A8", +"* c #EEDEA8", +"= c #EEDBA8", +"- c #EBD9A8", +"; c #EAD6A8", +"> c #E9D4A8", +", c #E7D1A8", +"' c #E6CDA8", +") c #E6CFA8", +"! c #E7D0A8", +"~ c #E8D2A8", +"{ c #E6CEA8", +"] c #E4CCA8", +"^ c #E3CAA8", +"/ c #E2C7A8", +"( c #E1C6A8", +"_ c #E1C5A8", +": c #E4CBA8", +"< c #EBD7A8", +"[ c #EFDFA8", +"} c #473600", +"| c #ECDBA8", +"1 c #E7D083", +"2 c #EBD783", +"3 c #EDD983", +"4 c #EEDC83", +"5 c #F0DF83", +"6 c #F1E283", +"7 c #EDDA83", +"8 c #EBD683", +"9 c #E5CC83", +"0 c #E4C983", +"a c #E2C683", +"b c #E0C183", +"c c #DDBD83", +"d c #DEBE83", +"e c #E0C283", +"f c #DFBF83", +"g c #DCBC83", +"h c #D9B683", +"i c #D7B283", +"j c #D5AF83", +"k c #D6AF83", +"l c #D7B383", +"m c #654D00", +"n c #463400", +"o c #E9D283", +"p c #E4C84D", +"q c #E8CD4D", +"r c #EAD24D", +"s c #EDD84D", +"t c #F1DF4D", +"u c #F0DC4D", +"v c #EBD34D", +"w c #DFBE4D", +"x c #DAB64D", +"y c #D9B44D", +"z c #D8B24D", +"A c #D4AC4D", +"B c #D1A44D", +"C c #CFA14D", +"D c #D1A54D", +"E c #D2A64D", +"F c #CA984D", +"G c #C6924D", +"H c #C6904D", +"I c #C48F4D", +"J c #C6914D", +"K c #C9964D", +"L c #D7AF4D", +"M c #8D6900", +"N c #634B00", +"O c #EBD583", +"P c #E5CA4D", +"Q c #E2C000", +"R c #E4C400", +"S c #EBD100", +"T c #EFD800", +"U c #EDD400", +"V c #E6C800", +"W c #DCB600", +"X c #D4A800", +"Y c #CB9700", +"Z c #C48B00", +"` c #C38800", +" . c #C28700", +".. c #BC7C00", +"+. c #B87500", +"@. c #B97700", +"#. c #B77300", +"$. c #B46E00", +"%. c #AF6300", +"&. c #AB5E00", +"*. c #AD6000", +"=. c #AA5B00", +"-. c #A95A00", +";. c #AC5E00", +">. c #B36C00", +",. c #BB7900", +"'. c #C08400", +"). c #8A6400", +"!. c #634900", +"~. c #ECD883", +"{. c #E8CE4D", +"]. c #E3C300", +"^. c #E8CC00", +"/. c #F1DD00", +"(. c #EDD500", +"_. c #E5C600", +":. c #D4A700", +"<. c #CA9500", +"[. c #C08200", +"}. c #BD7E00", +"|. c #BC7B00", +"1. c #B67200", +"2. c #B36B00", +"3. c #B26A00", +"4. c #B06600", +"5. c #AB5F00", +"6. c #A65500", +"7. c #A45000", +"8. c #A65400", +"9. c #B06500", +"0. c #B57000", +"a. c #BA7800", +"b. c #886000", +"c. c #624800", +"d. c #E9D14D", +"e. c #E4C500", +"f. c #EBD200", +"g. c #F1DC00", +"h. c #F0DB00", +"i. c #ECD400", +"j. c #E2C200", +"k. c #D6AC00", +"l. c #C48A00", +"m. c #BF8200", +"n. c #B77400", +"o. c #B36A00", +"p. c #AF6500", +"q. c #AD6100", +"r. c #AC5F00", +"s. c #AF6400", +"t. c #AB5C00", +"u. c #A14A00", +"v. c #A04900", +"w. c #A45100", +"x. c #AD5F00", +"y. c #B56F00", +"z. c #835500", +"A. c #5E4000", +"B. c #432F00", +"C. c #F4E7A8", +"D. c #F0E083", +"E. c #EAD34D", +"F. c #E5C700", +"G. c #ECD300", +"H. c #EFD900", +"I. c #DAB300", +"J. c #CD9C00", +"K. c #BE8000", +"L. c #A95800", +"M. c #A85800", +"N. c #A75500", +"O. c #AA5C00", +"P. c #A75600", +"Q. c #A24C00", +"R. c #A55200", +"S. c #AB5D00", +"T. c #B06700", +"U. c #7E4D00", +"V. c #593800", +"W. c #3F2800", +"X. c #F5E8A8", +"Y. c #EBD74D", +"Z. c #E9CF00", +"`. c #E0BD00", +" + c #D7AE00", +".+ c #CE9D00", +"++ c #C89200", +"@+ c #C58C00", +"#+ c #BF8100", +"$+ c #A24D00", +"%+ c #A85700", +"&+ c #A95900", +"*+ c #B26900", +"=+ c #7D4B00", +"-+ c #583500", +";+ c #3D2600", +">+ c #F3E6A8", +",+ c #EED94D", +"'+ c #E9CE00", +")+ c #E5C500", +"!+ c #DBB500", +"~+ c #D1A100", +"{+ c #C79000", +"]+ c #C18400", +"^+ c #C08300", +"/+ c #B97500", +"(+ c #A04800", +"_+ c #9D4300", +":+ c #9F4700", +"<+ c #A34F00", +"[+ c #A65300", +"}+ c #A44F00", +"|+ c #AC6000", +"1+ c #AE6200", +"2+ c #B16700", +"3+ c #7C4A00", +"4+ c #583600", +"5+ c #3D2500", +"6+ c #EFDC4D", +"7+ c #D8AF00", +"8+ c #CF9F00", +"9+ c #C58D00", +"0+ c #BA7900", +"a+ c #B67100", +"b+ c #9C4100", +"c+ c #9C4200", +"d+ c #9E4500", +"e+ c #A14B00", +"f+ c #9F4800", +"g+ c #AE6400", +"h+ c #B46C00", +"i+ c #7D4C00", +"j+ c #F2E283", +"k+ c #E5C800", +"l+ c #E7CA00", +"m+ c #DEB900", +"n+ c #D6AA00", +"o+ c #D1A200", +"p+ c #C79100", +"q+ c #BB7C00", +"r+ c #B46F00", +"s+ c #B16900", +"t+ c #A34D00", +"u+ c #A04700", +"v+ c #9B4000", +"w+ c #9F4500", +"x+ c #9E4400", +"y+ c #A24E00", +"z+ c #7F5000", +"A+ c #5A3900", +"B+ c #3E2800", +"C+ c #F2E5A8", +"D+ c #EFDD83", +"E+ c #E7CD4D", +"F+ c #DDB800", +"G+ c #DBB400", +"H+ c #D2A300", +"I+ c #C99400", +"J+ c #9E4600", +"K+ c #9B4100", +"L+ c #993C00", +"M+ c #9F4600", +"N+ c #9A3F00", +"O+ c #5B3C00", +"P+ c #412D00", +"Q+ c #F0E1A8", +"R+ c #EAD483", +"S+ c #DDBC4D", +"T+ c #CF9E00", +"U+ c #D5AB00", +"V+ c #CE9C00", +"W+ c #C99200", +"X+ c #C28600", +"Y+ c #B97600", +"Z+ c #9B3F00", +"`+ c #B16800", +" @ c #805100", +".@ c #5D3F00", +"+@ c #443100", +"@@ c #8C6500", +"#@ c #8A6300", +"$@ c #917000", +"%@ c #927200", +"&@ c #906E00", +"*@ c #906F00", +"=@ c #8E6900", +"-@ c #885E00", +";@ c #825400", +">@ c #7B4800", +",@ c #753B00", +"'@ c #713400", +")@ c #6F3200", +"!@ c #703400", +"~@ c #713600", +"{@ c #703300", +"]@ c #6F3100", +"^@ c #723600", +"/@ c #753E00", +"(@ c #784200", +"_@ c #794500", +":@ c #835700", +"<@ c #5F4200", +"[@ c #443200", +"}@ c #604400", +"|@ c #5F4300", +"1@ c #624900", +"2@ c #634A00", +"3@ c #654C00", +"4@ c #5B3D00", +"5@ c #573400", +"6@ c #532D00", +"7@ c #512800", +"8@ c #4E2400", +"9@ c #502700", +"0@ c #502800", +"a@ c #502600", +"b@ c #522A00", +"c@ c #542F00", +"d@ c #553100", +"e@ c #573300", +"f@ c #593900", +"g@ c #5B3B00", +"h@ c #5C3D00", +"i@ c #5E4200", +"j@ c #604500", +"k@ c #433100", +"l@ c #422D00", +"m@ c #422F00", +"n@ c #3E2700", +"o@ c #3D2400", +"p@ c #3B2300", +"q@ c #391F00", +"r@ c #391D00", +"s@ c #391E00", +"t@ c #381C00", +"u@ c #381B00", +"v@ c #402B00", +"w@ c #453400", +" . + @ # $ % & + * = - ; > , ' ) ! ~ ! { ] ^ / ( _ : ~ < = [ } ", +"| 1 2 3 4 5 6 5 7 8 1 9 0 a b c d e e f g h i j k k l g 0 1 m n ", +"* o p q r s t u v p w x y z A B C D E C F G H I I J K C L M N } ", +"@ O P Q R S T U V W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.} ", +"% ~.{.].^.T /.(._.W :.<.[.}.|.1.2.2.$.3.4.5.=.6.7.8.9.0.a.b.c.n ", +"$ 4 d.e.f.g.h.i.j.k.Y l.m.n.o.p.q.r.s.4.&.t.6.u.v.w.x.>.y.z.A.B.", +"C.D.E.F.G.H.f.e.I.J.l.m.K.>.L.M.N.w.O.&.8.P.P.Q.v.R.S.T.2.U.V.W.", +"X.6 Y.V Z.^.`. +.+++@+#+K.2.R.Q.Q.$+M.M.$+7.%+P.N.M.&+*.*+=+-+;+", +">+6 ,+'+Z.)+!+~+{+]+^+}./+*+P.(+_+:+<+[+Q.}+-.|+*.1+3.3.2+3+4+5+", +"$ 6 6+S '+Q 7+8+9+0+0.a+>.1+%+u.b+c+d+e+f+Q.M.g+2+h+@.+.2.i+V.;+", +">+j+s k+l+m+n+o+p+q+r+s+*.6.t+u+c+v+_+w+x+_+y+1+*+>.h+2.*+z+A+B+", +"C+D+E+I.F+G+ +H+I+m.1.4.8.v.u+J+K+L+_+M+N+L+M+L.9.s.1+s.2+z+O+P+", +"Q+R+S+T+U+ +X V+W+X+Y+4.[+:+J+u.:+N+_+_+Z+d+$+N.S.S.g+2+`+ @.@+@", +"* 1 @@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@)@!@^@/@(@_@>@=+z+z+:@<@[@", +"| c.}@|@1@2@2@3@c.4@V.5@6@7@8@9@0@a@8@8@b@c@d@e@5@f@g@g@h@i@j@k@", +"l@m@B.B.B.[@[@[@P+n@;+o@p@q@r@s@s@t@u@t@s@o@n@n@B+v@l@B.B.[@w@[@"}; diff --git a/test/jkqtplot_test/EmfEngine/example/renderarea.cpp b/examples/jkqtplot_test/EmfEngine/example/renderarea.cpp similarity index 96% rename from test/jkqtplot_test/EmfEngine/example/renderarea.cpp rename to examples/jkqtplot_test/EmfEngine/example/renderarea.cpp index 8da2317e9b..7e84574de4 100644 --- a/test/jkqtplot_test/EmfEngine/example/renderarea.cpp +++ b/examples/jkqtplot_test/EmfEngine/example/renderarea.cpp @@ -1,135 +1,135 @@ -#include -#include "renderarea.h" -#include "pixmaps.h" - -RenderArea::RenderArea(QWidget *parent) - : QWidget(parent) -{ - setBackgroundRole(QPalette::Base); - setAutoFillBackground(true); - - setFixedWidth(600); - setFixedHeight(500); -} - -void RenderArea::draw(QPainter *painter) -{ - static const QPoint points[4] = { - QPoint(10, 80), - QPoint(20, 10), - QPoint(80, 30), - QPoint(90, 70) - }; - - QRect rect(10, 20, 80, 60); - - QPainterPath path; - path.moveTo(20, 80); - path.lineTo(20, 30); - path.cubicTo(80, 0, 50, 50, 80, 80); - - int startAngle = 20 * 16; - int arcLength = 120 * 16; - - QLinearGradient linearGrad(QPointF(0, 0), QPointF(100, 100)); - linearGrad.setColorAt(0, Qt::black); - linearGrad.setColorAt(1, Qt::red); - - QRadialGradient radialGrad(QPointF(50, 50), 40, QPointF(75, 50)); - radialGrad.setColorAt(0, Qt::white); - radialGrad.setColorAt(0.5, Qt::black); - radialGrad.setColorAt(1, Qt::red); - - /*QConicalGradient conGrad(QPointF(50, 50), 90); - conGrad.setColorAt(0, Qt::blue); - conGrad.setColorAt(0.5, Qt::red); - conGrad.setColorAt(1, Qt::green); - QBrush brush = QBrush(conGrad);*/ - - QBrush brush = QBrush(Qt::gray); - int brushStyle = Qt::NoBrush; - int penStyle = Qt::NoPen; - int shape = Rect; - int drawnRects = 0; - for (int x = 0; x < width(); x += 100){ - for (int y = 0; y < height(); y += 100){ - painter->save(); - painter->setRenderHint(QPainter::Antialiasing); - - shape = (shape + 1)%14; - - penStyle = (penStyle + 1)%4; - if(!penStyle) - penStyle = 1; - - if (shape == RoundedRect && drawnRects < 2){ - if (drawnRects == 0) - painter->setBrush(QBrush(linearGrad)); - else if (drawnRects == 1) - painter->setBrush(QBrush(radialGrad)); - drawnRects++; - } else { - brushStyle = (brushStyle + 1)%14; - if(!brushStyle) - brushStyle = 1; - brush.setStyle((Qt::BrushStyle)brushStyle); - painter->setBrush(brush); - } - - painter->setPen(QPen(Qt::black, 2, (Qt::PenStyle)penStyle, Qt::FlatCap, Qt::MiterJoin)); - painter->translate(x, y); - switch (shape) { - case Line: - painter->drawLine(rect.bottomLeft(), rect.topRight()); - break; - case Polyline: - painter->drawPolyline(points, 4); - break; - case Polygon: - painter->drawPolygon(points, 4); - break; - case Rect: - painter->drawRect(rect); - break; - case RoundedRect: - painter->drawRoundedRect(rect, 25, 25, Qt::RelativeSize); - break; - case Ellipse: - painter->drawEllipse(rect); - break; - case Arc: - painter->drawArc(rect, startAngle, arcLength); - break; - case Chord: - painter->drawChord(rect, startAngle, arcLength); - break; - case Pie: - painter->drawPie(rect, startAngle, arcLength); - break; - case Path: - painter->drawPath(path); - break; - case Text: - painter->drawText(rect, Qt::AlignCenter, "EmfEngine demo"); - break; - case Pixmap: - painter->drawPixmap(10, 10, QPixmap(qt_logo_xpm)); - break; - case TiledPixmap: - painter->drawTiledPixmap (QRect(10, 10, 64, 64), QPixmap(brick_xpm)); - break; - } - painter->restore(); - } - } - - painter->setPen(Qt::darkGray); - painter->setBrush(Qt::NoBrush); - painter->drawRect(QRect(9, 9, width() - 18, height() - 18)); -} - -void RenderArea::paintEvent(QPaintEvent * /* event */) -{ - QPainter painter(this); - draw(&painter); -} +#include +#include "renderarea.h" +#include "pixmaps.h" + +RenderArea::RenderArea(QWidget *parent) + : QWidget(parent) +{ + setBackgroundRole(QPalette::Base); + setAutoFillBackground(true); + + setFixedWidth(600); + setFixedHeight(500); +} + +void RenderArea::draw(QPainter *painter) +{ + static const QPoint points[4] = { + QPoint(10, 80), + QPoint(20, 10), + QPoint(80, 30), + QPoint(90, 70) + }; + + QRect rect(10, 20, 80, 60); + + QPainterPath path; + path.moveTo(20, 80); + path.lineTo(20, 30); + path.cubicTo(80, 0, 50, 50, 80, 80); + + int startAngle = 20 * 16; + int arcLength = 120 * 16; + + QLinearGradient linearGrad(QPointF(0, 0), QPointF(100, 100)); + linearGrad.setColorAt(0, Qt::black); + linearGrad.setColorAt(1, Qt::red); + + QRadialGradient radialGrad(QPointF(50, 50), 40, QPointF(75, 50)); + radialGrad.setColorAt(0, Qt::white); + radialGrad.setColorAt(0.5, Qt::black); + radialGrad.setColorAt(1, Qt::red); + + /*QConicalGradient conGrad(QPointF(50, 50), 90); + conGrad.setColorAt(0, Qt::blue); + conGrad.setColorAt(0.5, Qt::red); + conGrad.setColorAt(1, Qt::green); + QBrush brush = QBrush(conGrad);*/ + + QBrush brush = QBrush(Qt::gray); + int brushStyle = Qt::NoBrush; + int penStyle = Qt::NoPen; + int shape = Rect; + int drawnRects = 0; + for (int x = 0; x < width(); x += 100){ + for (int y = 0; y < height(); y += 100){ + painter->save(); + painter->setRenderHint(QPainter::Antialiasing); + + shape = (shape + 1)%14; + + penStyle = (penStyle + 1)%4; + if(!penStyle) + penStyle = 1; + + if (shape == RoundedRect && drawnRects < 2){ + if (drawnRects == 0) + painter->setBrush(QBrush(linearGrad)); + else if (drawnRects == 1) + painter->setBrush(QBrush(radialGrad)); + drawnRects++; + } else { + brushStyle = (brushStyle + 1)%14; + if(!brushStyle) + brushStyle = 1; + brush.setStyle((Qt::BrushStyle)brushStyle); + painter->setBrush(brush); + } + + painter->setPen(QPen(Qt::black, 2, (Qt::PenStyle)penStyle, Qt::FlatCap, Qt::MiterJoin)); + painter->translate(x, y); + switch (shape) { + case Line: + painter->drawLine(rect.bottomLeft(), rect.topRight()); + break; + case Polyline: + painter->drawPolyline(points, 4); + break; + case Polygon: + painter->drawPolygon(points, 4); + break; + case Rect: + painter->drawRect(rect); + break; + case RoundedRect: + painter->drawRoundedRect(rect, 25, 25, Qt::RelativeSize); + break; + case Ellipse: + painter->drawEllipse(rect); + break; + case Arc: + painter->drawArc(rect, startAngle, arcLength); + break; + case Chord: + painter->drawChord(rect, startAngle, arcLength); + break; + case Pie: + painter->drawPie(rect, startAngle, arcLength); + break; + case Path: + painter->drawPath(path); + break; + case Text: + painter->drawText(rect, Qt::AlignCenter, "EmfEngine demo"); + break; + case Pixmap: + painter->drawPixmap(10, 10, QPixmap(qt_logo_xpm)); + break; + case TiledPixmap: + painter->drawTiledPixmap (QRect(10, 10, 64, 64), QPixmap(brick_xpm)); + break; + } + painter->restore(); + } + } + + painter->setPen(Qt::darkGray); + painter->setBrush(Qt::NoBrush); + painter->drawRect(QRect(9, 9, width() - 18, height() - 18)); +} + +void RenderArea::paintEvent(QPaintEvent * /* event */) +{ + QPainter painter(this); + draw(&painter); +} diff --git a/test/jkqtplot_test/QTeXEngine/example/renderarea.h b/examples/jkqtplot_test/EmfEngine/example/renderarea.h similarity index 95% rename from test/jkqtplot_test/QTeXEngine/example/renderarea.h rename to examples/jkqtplot_test/EmfEngine/example/renderarea.h index bc0b00e0fa..52626f5f1b 100644 --- a/test/jkqtplot_test/QTeXEngine/example/renderarea.h +++ b/examples/jkqtplot_test/EmfEngine/example/renderarea.h @@ -1,19 +1,19 @@ -#ifndef RENDERAREA_H -#define RENDERAREA_H - -#include - -class RenderArea : public QWidget -{ -public: - enum Shape { Line, Polyline, Polygon, Rect, RoundedRect, Ellipse, Arc, - Chord, Pie, Path, Text, Pixmap, TiledPixmap }; - - RenderArea(QWidget *parent = 0); - void draw(QPainter *painter); - -protected: - void paintEvent(QPaintEvent *event); -}; - -#endif +#ifndef RENDERAREA_H +#define RENDERAREA_H + +#include + +class RenderArea : public QWidget +{ +public: + enum Shape { Line, Polyline, Polygon, Rect, RoundedRect, Ellipse, Arc, + Chord, Pie, Path, Text, Pixmap, TiledPixmap }; + + RenderArea(QWidget *parent = 0); + void draw(QPainter *painter); + +protected: + void paintEvent(QPaintEvent *event); +}; + +#endif diff --git a/test/jkqtplot_test/EmfEngine/src/EmfEngine.cpp b/examples/jkqtplot_test/EmfEngine/src/EmfEngine.cpp similarity index 96% rename from test/jkqtplot_test/EmfEngine/src/EmfEngine.cpp rename to examples/jkqtplot_test/EmfEngine/src/EmfEngine.cpp index 754b4332de..3e84eafda4 100644 --- a/test/jkqtplot_test/EmfEngine/src/EmfEngine.cpp +++ b/examples/jkqtplot_test/EmfEngine/src/EmfEngine.cpp @@ -1,659 +1,659 @@ -/*************************************************************************** - File : EmfEngine.cpp - Project : EmfEngine - -------------------------------------------------------------------- - Copyright : (C) 2009 - 2010 by Ion Vasilief - Email (use @ for *) : ion_vasilief*yahoo.fr - Description : Enables the export of QPainter grafics to - Windows Enhanced Metafiles (.emf) by using GDI calls - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - ***************************************************************************/ -#include "EmfEngine.h" - -EmfPaintEngine::EmfPaintEngine(const QString& f) : QPaintEngine(QPaintEngine::AllFeatures) -{ - fname = f; -} - -bool EmfPaintEngine::begin(QPaintDevice* p) -{ - if (!p) - return false; - - setPaintDevice(p); - - HWND desktop = GetDesktopWindow(); - HDC dc = GetDC(desktop); - PCSTR description = "Metafile created\0with EmfEngine\0"; - - metaDC = CreateEnhMetaFileA(dc, fname.toLocal8Bit().data(), &d_rect, description);//create null rectangle metafile - - d_rect.left = 0; - d_rect.top = 0; - d_rect.right = 100*p->width()*GetDeviceCaps(metaDC, HORZSIZE)/(double)GetDeviceCaps(metaDC, HORZRES); - d_rect.bottom = 100*p->height()*GetDeviceCaps(metaDC, VERTSIZE)/(double)GetDeviceCaps(metaDC, VERTRES); - - end();//delete the dummy metafile - - metaDC = CreateEnhMetaFileA(dc, fname.toLocal8Bit().data(), &d_rect, description); - - SetWindowExtEx(metaDC, p->width(), p->height(), 0); - SetViewportExtEx(metaDC, p->width(), p->height(), 0); - - return true; -} - -bool EmfPaintEngine::end() -{ - HENHMETAFILE metafile = CloseEnhMetaFile( metaDC ); - DeleteEnhMetaFile( metafile ); - DeleteDC( metaDC ); - return true; -} - -void EmfPaintEngine::drawPoints ( const QPointF * points, int pointCount ) -{ - setClipping(); - - QColor color = painter()->pen().color(); - HBRUSH wbrush = CreateSolidBrush(RGB(color.red(), color.green(), color.blue())); - SelectObject(metaDC, wbrush); - - int lw = painter()->pen().width(); - QMatrix m = painter()->worldMatrix(); - for (int i = 0; i < pointCount; i++){ - QPointF p = m.map(points[i]); - int x = qRound(p.x()); - int y = qRound(p.y()); - Rectangle(metaDC, x, y, x + lw, y + lw); - } - - resetClipping(); - DeleteObject(wbrush); -} - -void EmfPaintEngine::drawLines ( const QLineF * lines, int lineCount ) -{ - setClipping(); - - HPEN wpen = convertPen(painter()->pen()); - SelectObject(metaDC, wpen); - - QMatrix m = painter()->worldMatrix(); - - for (int i = 0; i < lineCount; i++) { - POINT *pts = new POINT[2]; - - QPointF p1 = m.map(lines[i].p1()); - QPointF p2 = m.map(lines[i].p2()); - - pts[0].x = qRound(p1.x()); - pts[0].y = qRound(p1.y()); - pts[1].x = qRound(p2.x()); - pts[1].y = qRound(p2.y()); - Polyline(metaDC, pts, 2); - delete [] pts; - } - - resetClipping(); - DeleteObject(wpen); -} - -void EmfPaintEngine::drawPolygon ( const QPointF * points, int pointCount, PolygonDrawMode mode ) -{ - setClipping(); - - HPEN wpen = convertPen(painter()->pen()); - SelectObject(metaDC, wpen); - HBRUSH wbrush = convertBrush(painter()->brush()); - SelectObject(metaDC, wbrush); - - POINT *pts = new POINT[pointCount]; - QMatrix m = painter()->worldMatrix(); - for (int i = 0; i < pointCount; i++){ - QPointF p = m.map (points[i]); - pts[i].x = qRound(p.x()); - pts[i].y = qRound(p.y()); - } - - if (mode == QPaintEngine::PolylineMode) - Polyline(metaDC, pts, pointCount); - else if (mode == QPaintEngine::OddEvenMode) - Polygon(metaDC, pts, pointCount); - else - qWarning("EmfEngine: drawPolygon with unsupported mode.\n"); - - resetClipping(); - delete [] pts; - DeleteObject(wpen); - DeleteObject(wbrush); -} - -void EmfPaintEngine::drawTextItem ( const QPointF & p, const QTextItem & textItem ) -{ - setClipping(); - - SetBkMode( metaDC, TRANSPARENT ); - - QFont f = textItem.font(); - QFontMetrics fm(f); - HFONT wfont = CreateFontA(fm.height() - 1, fm.averageCharWidth(), 0, 0, - 10*f.weight(), f.italic(), f.underline (), f.strikeOut(), - DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, DEFAULT_PITCH, f.family().toAscii().data()); - SelectObject( metaDC, wfont); - - QColor colour = painter()->pen().color(); - SetTextColor( metaDC, RGB(colour.red(), colour.green(), colour.blue())); - - QString text = textItem.text(); - int size = text.size(); - - QMatrix m = painter()->worldMatrix(); - - XFORM xf; - xf.eM11 = m.m11(); - xf.eM12 = m.m12(); - xf.eM21 = m.m21(); - xf.eM22 = m.m22(); - xf.eDx = m.dx(); - xf.eDy = m.dy(); - SetWorldTransform(metaDC, &xf); - -#ifdef Q_WS_WIN - wchar_t *wtext = (wchar_t *)malloc(size*sizeof(wchar_t)); - if (!wtext){ - qWarning("EmfEngine: Not enough memory in drawTextItem()."); - return; - } - - size = text.toWCharArray(wtext); - TextOutW(metaDC, qRound(p.x()), qRound(p.y() - 0.85*fm.height()), wtext, size); - free(wtext); -#else - TextOutA(metaDC, qRound(p.x()), qRound(p.y() - 0.85*fm.height()), text.toLocal8Bit().data(), size); -#endif - - xf.eM11 = 1.0; - xf.eM12 = 0.0; - xf.eM21 = 0.0; - xf.eM22 = 1.0; - xf.eDx = 0.0; - xf.eDy = 0.0; - SetWorldTransform(metaDC, &xf); - - resetClipping(); - DeleteObject(wfont); -} - -void EmfPaintEngine::drawRects ( const QRectF * rects, int rectCount ) -{ - setClipping(); - - HPEN wpen = convertPen(painter()->pen()); - SelectObject(metaDC, wpen); - HBRUSH wbrush = convertBrush(painter()->brush()); - SelectObject(metaDC, wbrush); - - QMatrix m = painter()->worldMatrix(); - for (int i = 0; i < rectCount; i++){ - QRectF r = m.mapRect(rects[i]); - Rectangle(metaDC, qRound(r.left()), qRound(r.top()), qRound(r.right()), qRound(r.bottom())); - } - - resetClipping(); - DeleteObject(wpen); - DeleteObject(wbrush); -} - -void EmfPaintEngine::drawEllipse ( const QRectF & rect ) -{ - setClipping(); - - HPEN wpen = convertPen(painter()->pen()); - SelectObject(metaDC, wpen); - HBRUSH wbrush = convertBrush(painter()->brush()); - SelectObject(metaDC, wbrush); - - QRectF r = painter()->worldMatrix().mapRect(rect); - Ellipse(metaDC, qRound(r.left()), qRound(r.top()), qRound(r.right()), qRound(r.bottom())); - - resetClipping(); - DeleteObject(wpen); - DeleteObject(wbrush); -} - -void EmfPaintEngine::drawPath ( const QPainterPath & path ) -{ - setClipping(); - - int points = path.elementCount(); - POINT *pts = new POINT[points]; - BYTE *types = new BYTE[points]; - - POINT *bzs = new POINT[3]; - int bez = 0; - - BeginPath(metaDC); - - QMatrix m = painter()->worldMatrix(); - for (int i = 0; i < points; i++){ - QPainterPath::Element el = path.elementAt(i); - QPointF p = m.map(QPointF(el.x, el.y)); - int x = qRound(p.x()); - int y = qRound(p.y()); - pts[i].x = x; - pts[i].y = y; - - switch(el.type){ - case QPainterPath::MoveToElement: - types[i] = PT_MOVETO; - #ifndef Q_WS_WIN - MoveToEx (metaDC, x, y, 0); - #endif - break; - - case QPainterPath::LineToElement: - types[i] = PT_LINETO; - #ifndef Q_WS_WIN - LineTo(metaDC, x, y); - #endif - break; - - case QPainterPath::CurveToElement: - types[i] = PT_BEZIERTO; - #ifndef Q_WS_WIN - bzs[bez] = pts[i]; - bez++; - #endif - break; - - case QPainterPath::CurveToDataElement: - types[i] = PT_BEZIERTO; - #ifndef Q_WS_WIN - bzs[bez] = pts[i]; - if (bez == 2){ - PolyBezierTo(metaDC, bzs, 3); - bez = 0; - } else - bez++; - #endif - break; - } - } - - HPEN wpen = convertPen(painter()->pen()); - SelectObject(metaDC, wpen); -#ifdef Q_WS_WIN - PolyDraw(metaDC, pts, types, points); -#else - StrokePath(metaDC); -#endif - - HBRUSH wbrush = convertBrush(painter()->brush()); - SelectObject(metaDC, wbrush); - - EndPath(metaDC); - - if(QPoint(pts[0].x, pts[0].y) == QPoint(pts[points - 1].x, pts[points - 1].y)) - StrokeAndFillPath(metaDC); - else { - FillPath(metaDC); - #ifdef Q_WS_WIN - PolyDraw(metaDC, pts, types, points); - #else - StrokePath(metaDC); - #endif - } - - resetClipping(); - DeleteObject(wbrush); - DeleteObject(wpen); - delete [] pts; - delete [] types; -} - -void EmfPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &) -{ - setClipping(); - - QMatrix m = painter()->worldMatrix(); - QPointF p = m.map(r.topLeft()); - int x = qRound(p.x()); - int y = qRound(p.y()); - int width = qRound(r.width()); - int height = qRound(r.height()); - -#ifdef Q_WS_WIN - HBITMAP hbtmp = nullptr; - DWORD op = SRCCOPY; - if (pm.hasAlpha()){ - QImage image = pm.scaled(width, height).toImage(); - image.invertPixels(); - hbtmp = QPixmap::fromImage (image).toWinHBITMAP(); - op = SRCINVERT; - } else - hbtmp = pm.scaled(width, height).toWinHBITMAP(); - - HDC hDC = CreateCompatibleDC(metaDC); - SelectObject(hDC, hbtmp); - - BitBlt(metaDC, x, y, width, height, hDC, 0, 0, op); - DeleteObject(hbtmp); - DeleteDC(hDC); -#else - QImage image = pm.scaled(width, height).toImage(); - for (int i = 0; i < width; i++){ - for (int j = 0; j < height; j++){ - QRgb rgb = image.pixel(i, j); - if (qAlpha(rgb) == 255) - SetPixel(metaDC, x + i, y + j, RGB(qRed(rgb), qGreen(rgb), qBlue(rgb))); - } - } -#endif - resetClipping(); -} - -void EmfPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap & pix, const QPointF &) -{ - setClipping(); - -#ifdef Q_WS_WIN - HBITMAP hBmp = pix.toWinHBITMAP(); - HBRUSH wbrush = CreatePatternBrush(hBmp); - - QMatrix m = painter()->worldMatrix(); - QRectF dr = m.mapRect(r); - - RECT rect; - rect.left = qRound(dr.left()); - rect.top = qRound(dr.top()); - rect.right = qRound(dr.right()); - rect.bottom = qRound(dr.bottom()); - - FillRect(metaDC, &rect, wbrush); - - DeleteObject(hBmp); - DeleteObject(wbrush); -#else - int width = qRound(r.width()); - int height = qRound(r.height()); - - QPixmap pixmap(width, height); - QPainter p(&pixmap); - p.drawTiledPixmap(0, 0, width, height, pix); - p.end(); - - drawPixmap(r, pixmap, QRectF()); -#endif - - resetClipping(); -} - -void EmfPaintEngine::drawImage(const QRectF & r, const QImage & image, const QRectF &, Qt::ImageConversionFlags flags) -{ - QMatrix m = painter()->worldMatrix(); - QPointF p = m.map(r.topLeft()); - int x = qRound(p.x()); - int y = qRound(p.y()); - int width = qRound(r.width()); - int height = qRound(r.height()); - -#ifdef Q_WS_WIN - setClipping(); - QPixmap pix = QPixmap::fromImage (image.scaled(width, height), flags); - - HBITMAP hbtmp = pix.toWinHBITMAP(); - HDC hDC = CreateCompatibleDC(metaDC); - SelectObject(hDC, hbtmp); - BitBlt(metaDC, x, y, width, height, hDC, 0, 0, SRCCOPY); - DeleteObject(hbtmp); - DeleteDC(hDC); - - resetClipping(); -#else - QImage imag = image.scaled(width, height); - for (int i = 0; i < width; i++){ - for (int j = 0; j < height; j++){ - QRgb rgb = imag.pixel(i, j); - if (qAlpha(rgb) == 255) - SetPixel(metaDC, x + i, y + j, RGB(qRed(rgb), qGreen(rgb), qBlue(rgb))); - } - } -#endif -} - -void EmfPaintEngine::setClipping() -{ -#ifdef Q_WS_WIN - if (painter()->hasClipping()) { - QRect rect = painter()->clipRegion().boundingRect(); - HRGN hrgn = CreateRectRgn(rect.left(), rect.top(), rect.right(), rect.bottom()); - SelectClipRgn(metaDC, hrgn); - DeleteObject(hrgn); - } -#endif -} - -void EmfPaintEngine::resetClipping() -{ -#ifdef Q_WS_WIN - if (painter()->hasClipping()) - SelectClipRgn(metaDC, nullptr); -#endif -} - -HPEN EmfPaintEngine::convertPen(const QPen& pen) -{ - INT style = PS_nullptr; - switch (pen.style()){ - case Qt::SolidLine: - style = PS_SOLID; - break; - - case Qt::DashLine: - style = PS_DASH; - break; - - case Qt::DotLine: - style = PS_DOT; - break; - - case Qt::DashDotLine: - style = PS_DASHDOT; - break; - - case Qt::DashDotDotLine: - style = PS_DASHDOTDOT; - break; - - default: - break; - } - - INT capStyle = PS_ENDCAP_FLAT; - switch (pen.capStyle()){ - case Qt::FlatCap: - break; - - case Qt::SquareCap: - capStyle = PS_ENDCAP_SQUARE; - break; - - case Qt::RoundCap: - capStyle = PS_ENDCAP_ROUND; - break; - - default: - break; - } - - INT joinStyle = PS_JOIN_MITER; - switch (pen.joinStyle()){ - case Qt::MiterJoin: - break; - - case Qt::BevelJoin: - joinStyle = PS_JOIN_BEVEL; - break; - - case Qt::RoundJoin: - joinStyle = PS_JOIN_ROUND; - break; - - case Qt::SvgMiterJoin: - joinStyle = PS_JOIN_MITER; - break; - - default: - break; - } - - LOGBRUSH lbrush = {BS_SOLID, RGB(pen.color().red(),pen.color().green(),pen.color().blue()), 0}; - return ExtCreatePen(PS_GEOMETRIC | style | capStyle | joinStyle, pen.width(), &lbrush, 0, nullptr); -} - -HBRUSH EmfPaintEngine::convertBrush(const QBrush& brush) -{ - LOGBRUSH lbrush = {BS_nullptr, 0, 0}; - - if (!brush.color().alpha()) - return CreateBrushIndirect( &lbrush ); - - if (brush.color().alpha() < 255){//semi-transparent brush color - qWarning ("Semi-transparent brushes are not supported by EmfEngine."); - - #ifdef Q_WS_WIN - QPixmap pix(4, 4); - pix.fill(Qt::white); - QPainter p; - p.begin(&pix); - p.setPen(QPen(Qt::NoPen)); - p.setBrush(brush); - p.drawRect(QRect(0, 0, 4, 4)); - p.end(); - - HBITMAP hBmp = pix.toWinHBITMAP(); - HBRUSH wbrush = CreatePatternBrush(hBmp); - DeleteObject(hBmp); - return wbrush; - #endif - } - - LONG lbHatch = HS_HORIZONTAL; - UINT lbStyle = BS_HATCHED; - switch(brush.style()){ - case Qt::NoBrush: - lbStyle = BS_nullptr; - break; - - case Qt::SolidPattern: - lbStyle = BS_SOLID; - break; - - case Qt::Dense1Pattern: - case Qt::Dense2Pattern: - case Qt::Dense3Pattern: - case Qt::Dense4Pattern: - case Qt::Dense5Pattern: - case Qt::Dense6Pattern: - case Qt::Dense7Pattern: - { - #ifdef Q_WS_WIN - QPixmap pix(4, 4); - pix.fill(Qt::white); - QPainter p; - p.begin(&pix); - p.setPen(QPen(Qt::NoPen)); - p.setBrush(brush); - p.drawRect(QRect(0, 0, 4, 4)); - p.end(); - - HBITMAP hbm = pix.toWinHBITMAP(); - HBRUSH wbrush = CreatePatternBrush(hbm); - DeleteObject(hbm); - return wbrush; - #endif - } - break; - - case Qt::HorPattern: - break; - - case Qt::VerPattern: - lbHatch = HS_VERTICAL; - break; - - case Qt::CrossPattern: - lbHatch = HS_CROSS; - break; - - case Qt::BDiagPattern: - lbHatch = HS_BDIAGONAL; - break; - - case Qt::FDiagPattern: - lbHatch = HS_FDIAGONAL; - break; - - case Qt::DiagCrossPattern: - lbHatch = HS_DIAGCROSS; - break; - - case Qt::LinearGradientPattern: - { - qWarning("EmfEngine: Qt::LinearGradientPattern is not supported."); - return CreateBrushIndirect( &lbrush ); - } - break; - - case Qt::ConicalGradientPattern: - { - qWarning("EmfEngine: Qt::ConicalGradientPattern is not supported."); - return CreateBrushIndirect( &lbrush ); - } - break; - - case Qt::RadialGradientPattern: - { - qWarning("EmfEngine: Qt::RadialGradientPattern is not supported."); - return CreateBrushIndirect( &lbrush ); - } - - case Qt::TexturePattern: - #ifdef Q_WS_WIN - { - HBITMAP hbm = brush.texture().toWinHBITMAP(); - HBRUSH wbrush = CreatePatternBrush(hbm); - DeleteObject(hbm); - return wbrush; - } - #endif - break; - - default: - lbStyle = BS_SOLID; - break; - } - - LOGBRUSH logbrush = {lbStyle, RGB(brush.color().red(), brush.color().green(), brush.color().blue()), lbHatch}; - return CreateBrushIndirect( &logbrush ); -} +/*************************************************************************** + File : EmfEngine.cpp + Project : EmfEngine + -------------------------------------------------------------------- + Copyright : (C) 2009 - 2010 by Ion Vasilief + Email (use @ for *) : ion_vasilief*yahoo.fr + Description : Enables the export of QPainter grafics to + Windows Enhanced Metafiles (.emf) by using GDI calls + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301 USA * + * * + ***************************************************************************/ +#include "EmfEngine.h" + +EmfPaintEngine::EmfPaintEngine(const QString& f) : QPaintEngine(QPaintEngine::AllFeatures) +{ + fname = f; +} + +bool EmfPaintEngine::begin(QPaintDevice* p) +{ + if (!p) + return false; + + setPaintDevice(p); + + HWND desktop = GetDesktopWindow(); + HDC dc = GetDC(desktop); + PCSTR description = "Metafile created\0with EmfEngine\0"; + + metaDC = CreateEnhMetaFileA(dc, fname.toLocal8Bit().data(), &d_rect, description);//create null rectangle metafile + + d_rect.left = 0; + d_rect.top = 0; + d_rect.right = 100*p->width()*GetDeviceCaps(metaDC, HORZSIZE)/(double)GetDeviceCaps(metaDC, HORZRES); + d_rect.bottom = 100*p->height()*GetDeviceCaps(metaDC, VERTSIZE)/(double)GetDeviceCaps(metaDC, VERTRES); + + end();//delete the dummy metafile + + metaDC = CreateEnhMetaFileA(dc, fname.toLocal8Bit().data(), &d_rect, description); + + SetWindowExtEx(metaDC, p->width(), p->height(), 0); + SetViewportExtEx(metaDC, p->width(), p->height(), 0); + + return true; +} + +bool EmfPaintEngine::end() +{ + HENHMETAFILE metafile = CloseEnhMetaFile( metaDC ); + DeleteEnhMetaFile( metafile ); + DeleteDC( metaDC ); + return true; +} + +void EmfPaintEngine::drawPoints ( const QPointF * points, int pointCount ) +{ + setClipping(); + + QColor color = painter()->pen().color(); + HBRUSH wbrush = CreateSolidBrush(RGB(color.red(), color.green(), color.blue())); + SelectObject(metaDC, wbrush); + + int lw = painter()->pen().width(); + QMatrix m = painter()->worldMatrix(); + for (int i = 0; i < pointCount; i++){ + QPointF p = m.map(points[i]); + int x = qRound(p.x()); + int y = qRound(p.y()); + Rectangle(metaDC, x, y, x + lw, y + lw); + } + + resetClipping(); + DeleteObject(wbrush); +} + +void EmfPaintEngine::drawLines ( const QLineF * lines, int lineCount ) +{ + setClipping(); + + HPEN wpen = convertPen(painter()->pen()); + SelectObject(metaDC, wpen); + + QMatrix m = painter()->worldMatrix(); + + for (int i = 0; i < lineCount; i++) { + POINT *pts = new POINT[2]; + + QPointF p1 = m.map(lines[i].p1()); + QPointF p2 = m.map(lines[i].p2()); + + pts[0].x = qRound(p1.x()); + pts[0].y = qRound(p1.y()); + pts[1].x = qRound(p2.x()); + pts[1].y = qRound(p2.y()); + Polyline(metaDC, pts, 2); + delete [] pts; + } + + resetClipping(); + DeleteObject(wpen); +} + +void EmfPaintEngine::drawPolygon ( const QPointF * points, int pointCount, PolygonDrawMode mode ) +{ + setClipping(); + + HPEN wpen = convertPen(painter()->pen()); + SelectObject(metaDC, wpen); + HBRUSH wbrush = convertBrush(painter()->brush()); + SelectObject(metaDC, wbrush); + + POINT *pts = new POINT[pointCount]; + QMatrix m = painter()->worldMatrix(); + for (int i = 0; i < pointCount; i++){ + QPointF p = m.map (points[i]); + pts[i].x = qRound(p.x()); + pts[i].y = qRound(p.y()); + } + + if (mode == QPaintEngine::PolylineMode) + Polyline(metaDC, pts, pointCount); + else if (mode == QPaintEngine::OddEvenMode) + Polygon(metaDC, pts, pointCount); + else + qWarning("EmfEngine: drawPolygon with unsupported mode.\n"); + + resetClipping(); + delete [] pts; + DeleteObject(wpen); + DeleteObject(wbrush); +} + +void EmfPaintEngine::drawTextItem ( const QPointF & p, const QTextItem & textItem ) +{ + setClipping(); + + SetBkMode( metaDC, TRANSPARENT ); + + QFont f = textItem.font(); + QFontMetrics fm(f); + HFONT wfont = CreateFontA(fm.height() - 1, fm.averageCharWidth(), 0, 0, + 10*f.weight(), f.italic(), f.underline (), f.strikeOut(), + DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, DEFAULT_PITCH, f.family().toAscii().data()); + SelectObject( metaDC, wfont); + + QColor colour = painter()->pen().color(); + SetTextColor( metaDC, RGB(colour.red(), colour.green(), colour.blue())); + + QString text = textItem.text(); + int size = text.size(); + + QMatrix m = painter()->worldMatrix(); + + XFORM xf; + xf.eM11 = m.m11(); + xf.eM12 = m.m12(); + xf.eM21 = m.m21(); + xf.eM22 = m.m22(); + xf.eDx = m.dx(); + xf.eDy = m.dy(); + SetWorldTransform(metaDC, &xf); + +#ifdef Q_WS_WIN + wchar_t *wtext = (wchar_t *)malloc(size*sizeof(wchar_t)); + if (!wtext){ + qWarning("EmfEngine: Not enough memory in drawTextItem()."); + return; + } + + size = text.toWCharArray(wtext); + TextOutW(metaDC, qRound(p.x()), qRound(p.y() - 0.85*fm.height()), wtext, size); + free(wtext); +#else + TextOutA(metaDC, qRound(p.x()), qRound(p.y() - 0.85*fm.height()), text.toLocal8Bit().data(), size); +#endif + + xf.eM11 = 1.0; + xf.eM12 = 0.0; + xf.eM21 = 0.0; + xf.eM22 = 1.0; + xf.eDx = 0.0; + xf.eDy = 0.0; + SetWorldTransform(metaDC, &xf); + + resetClipping(); + DeleteObject(wfont); +} + +void EmfPaintEngine::drawRects ( const QRectF * rects, int rectCount ) +{ + setClipping(); + + HPEN wpen = convertPen(painter()->pen()); + SelectObject(metaDC, wpen); + HBRUSH wbrush = convertBrush(painter()->brush()); + SelectObject(metaDC, wbrush); + + QMatrix m = painter()->worldMatrix(); + for (int i = 0; i < rectCount; i++){ + QRectF r = m.mapRect(rects[i]); + Rectangle(metaDC, qRound(r.left()), qRound(r.top()), qRound(r.right()), qRound(r.bottom())); + } + + resetClipping(); + DeleteObject(wpen); + DeleteObject(wbrush); +} + +void EmfPaintEngine::drawEllipse ( const QRectF & rect ) +{ + setClipping(); + + HPEN wpen = convertPen(painter()->pen()); + SelectObject(metaDC, wpen); + HBRUSH wbrush = convertBrush(painter()->brush()); + SelectObject(metaDC, wbrush); + + QRectF r = painter()->worldMatrix().mapRect(rect); + Ellipse(metaDC, qRound(r.left()), qRound(r.top()), qRound(r.right()), qRound(r.bottom())); + + resetClipping(); + DeleteObject(wpen); + DeleteObject(wbrush); +} + +void EmfPaintEngine::drawPath ( const QPainterPath & path ) +{ + setClipping(); + + int points = path.elementCount(); + POINT *pts = new POINT[points]; + BYTE *types = new BYTE[points]; + + POINT *bzs = new POINT[3]; + int bez = 0; + + BeginPath(metaDC); + + QMatrix m = painter()->worldMatrix(); + for (int i = 0; i < points; i++){ + QPainterPath::Element el = path.elementAt(i); + QPointF p = m.map(QPointF(el.x, el.y)); + int x = qRound(p.x()); + int y = qRound(p.y()); + pts[i].x = x; + pts[i].y = y; + + switch(el.type){ + case QPainterPath::MoveToElement: + types[i] = PT_MOVETO; + #ifndef Q_WS_WIN + MoveToEx (metaDC, x, y, 0); + #endif + break; + + case QPainterPath::LineToElement: + types[i] = PT_LINETO; + #ifndef Q_WS_WIN + LineTo(metaDC, x, y); + #endif + break; + + case QPainterPath::CurveToElement: + types[i] = PT_BEZIERTO; + #ifndef Q_WS_WIN + bzs[bez] = pts[i]; + bez++; + #endif + break; + + case QPainterPath::CurveToDataElement: + types[i] = PT_BEZIERTO; + #ifndef Q_WS_WIN + bzs[bez] = pts[i]; + if (bez == 2){ + PolyBezierTo(metaDC, bzs, 3); + bez = 0; + } else + bez++; + #endif + break; + } + } + + HPEN wpen = convertPen(painter()->pen()); + SelectObject(metaDC, wpen); +#ifdef Q_WS_WIN + PolyDraw(metaDC, pts, types, points); +#else + StrokePath(metaDC); +#endif + + HBRUSH wbrush = convertBrush(painter()->brush()); + SelectObject(metaDC, wbrush); + + EndPath(metaDC); + + if(QPoint(pts[0].x, pts[0].y) == QPoint(pts[points - 1].x, pts[points - 1].y)) + StrokeAndFillPath(metaDC); + else { + FillPath(metaDC); + #ifdef Q_WS_WIN + PolyDraw(metaDC, pts, types, points); + #else + StrokePath(metaDC); + #endif + } + + resetClipping(); + DeleteObject(wbrush); + DeleteObject(wpen); + delete [] pts; + delete [] types; +} + +void EmfPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &) +{ + setClipping(); + + QMatrix m = painter()->worldMatrix(); + QPointF p = m.map(r.topLeft()); + int x = qRound(p.x()); + int y = qRound(p.y()); + int width = qRound(r.width()); + int height = qRound(r.height()); + +#ifdef Q_WS_WIN + HBITMAP hbtmp = nullptr; + DWORD op = SRCCOPY; + if (pm.hasAlpha()){ + QImage image = pm.scaled(width, height).toImage(); + image.invertPixels(); + hbtmp = QPixmap::fromImage (image).toWinHBITMAP(); + op = SRCINVERT; + } else + hbtmp = pm.scaled(width, height).toWinHBITMAP(); + + HDC hDC = CreateCompatibleDC(metaDC); + SelectObject(hDC, hbtmp); + + BitBlt(metaDC, x, y, width, height, hDC, 0, 0, op); + DeleteObject(hbtmp); + DeleteDC(hDC); +#else + QImage image = pm.scaled(width, height).toImage(); + for (int i = 0; i < width; i++){ + for (int j = 0; j < height; j++){ + QRgb rgb = image.pixel(i, j); + if (qAlpha(rgb) == 255) + SetPixel(metaDC, x + i, y + j, RGB(qRed(rgb), qGreen(rgb), qBlue(rgb))); + } + } +#endif + resetClipping(); +} + +void EmfPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap & pix, const QPointF &) +{ + setClipping(); + +#ifdef Q_WS_WIN + HBITMAP hBmp = pix.toWinHBITMAP(); + HBRUSH wbrush = CreatePatternBrush(hBmp); + + QMatrix m = painter()->worldMatrix(); + QRectF dr = m.mapRect(r); + + RECT rect; + rect.left = qRound(dr.left()); + rect.top = qRound(dr.top()); + rect.right = qRound(dr.right()); + rect.bottom = qRound(dr.bottom()); + + FillRect(metaDC, &rect, wbrush); + + DeleteObject(hBmp); + DeleteObject(wbrush); +#else + int width = qRound(r.width()); + int height = qRound(r.height()); + + QPixmap pixmap(width, height); + QPainter p(&pixmap); + p.drawTiledPixmap(0, 0, width, height, pix); + p.end(); + + drawPixmap(r, pixmap, QRectF()); +#endif + + resetClipping(); +} + +void EmfPaintEngine::drawImage(const QRectF & r, const QImage & image, const QRectF &, Qt::ImageConversionFlags flags) +{ + QMatrix m = painter()->worldMatrix(); + QPointF p = m.map(r.topLeft()); + int x = qRound(p.x()); + int y = qRound(p.y()); + int width = qRound(r.width()); + int height = qRound(r.height()); + +#ifdef Q_WS_WIN + setClipping(); + QPixmap pix = QPixmap::fromImage (image.scaled(width, height), flags); + + HBITMAP hbtmp = pix.toWinHBITMAP(); + HDC hDC = CreateCompatibleDC(metaDC); + SelectObject(hDC, hbtmp); + BitBlt(metaDC, x, y, width, height, hDC, 0, 0, SRCCOPY); + DeleteObject(hbtmp); + DeleteDC(hDC); + + resetClipping(); +#else + QImage imag = image.scaled(width, height); + for (int i = 0; i < width; i++){ + for (int j = 0; j < height; j++){ + QRgb rgb = imag.pixel(i, j); + if (qAlpha(rgb) == 255) + SetPixel(metaDC, x + i, y + j, RGB(qRed(rgb), qGreen(rgb), qBlue(rgb))); + } + } +#endif +} + +void EmfPaintEngine::setClipping() +{ +#ifdef Q_WS_WIN + if (painter()->hasClipping()) { + QRect rect = painter()->clipRegion().boundingRect(); + HRGN hrgn = CreateRectRgn(rect.left(), rect.top(), rect.right(), rect.bottom()); + SelectClipRgn(metaDC, hrgn); + DeleteObject(hrgn); + } +#endif +} + +void EmfPaintEngine::resetClipping() +{ +#ifdef Q_WS_WIN + if (painter()->hasClipping()) + SelectClipRgn(metaDC, nullptr); +#endif +} + +HPEN EmfPaintEngine::convertPen(const QPen& pen) +{ + INT style = PS_nullptr; + switch (pen.style()){ + case Qt::SolidLine: + style = PS_SOLID; + break; + + case Qt::DashLine: + style = PS_DASH; + break; + + case Qt::DotLine: + style = PS_DOT; + break; + + case Qt::DashDotLine: + style = PS_DASHDOT; + break; + + case Qt::DashDotDotLine: + style = PS_DASHDOTDOT; + break; + + default: + break; + } + + INT capStyle = PS_ENDCAP_FLAT; + switch (pen.capStyle()){ + case Qt::FlatCap: + break; + + case Qt::SquareCap: + capStyle = PS_ENDCAP_SQUARE; + break; + + case Qt::RoundCap: + capStyle = PS_ENDCAP_ROUND; + break; + + default: + break; + } + + INT joinStyle = PS_JOIN_MITER; + switch (pen.joinStyle()){ + case Qt::MiterJoin: + break; + + case Qt::BevelJoin: + joinStyle = PS_JOIN_BEVEL; + break; + + case Qt::RoundJoin: + joinStyle = PS_JOIN_ROUND; + break; + + case Qt::SvgMiterJoin: + joinStyle = PS_JOIN_MITER; + break; + + default: + break; + } + + LOGBRUSH lbrush = {BS_SOLID, RGB(pen.color().red(),pen.color().green(),pen.color().blue()), 0}; + return ExtCreatePen(PS_GEOMETRIC | style | capStyle | joinStyle, pen.width(), &lbrush, 0, nullptr); +} + +HBRUSH EmfPaintEngine::convertBrush(const QBrush& brush) +{ + LOGBRUSH lbrush = {BS_nullptr, 0, 0}; + + if (!brush.color().alpha()) + return CreateBrushIndirect( &lbrush ); + + if (brush.color().alpha() < 255){//semi-transparent brush color + qWarning ("Semi-transparent brushes are not supported by EmfEngine."); + + #ifdef Q_WS_WIN + QPixmap pix(4, 4); + pix.fill(Qt::white); + QPainter p; + p.begin(&pix); + p.setPen(QPen(Qt::NoPen)); + p.setBrush(brush); + p.drawRect(QRect(0, 0, 4, 4)); + p.end(); + + HBITMAP hBmp = pix.toWinHBITMAP(); + HBRUSH wbrush = CreatePatternBrush(hBmp); + DeleteObject(hBmp); + return wbrush; + #endif + } + + LONG lbHatch = HS_HORIZONTAL; + UINT lbStyle = BS_HATCHED; + switch(brush.style()){ + case Qt::NoBrush: + lbStyle = BS_nullptr; + break; + + case Qt::SolidPattern: + lbStyle = BS_SOLID; + break; + + case Qt::Dense1Pattern: + case Qt::Dense2Pattern: + case Qt::Dense3Pattern: + case Qt::Dense4Pattern: + case Qt::Dense5Pattern: + case Qt::Dense6Pattern: + case Qt::Dense7Pattern: + { + #ifdef Q_WS_WIN + QPixmap pix(4, 4); + pix.fill(Qt::white); + QPainter p; + p.begin(&pix); + p.setPen(QPen(Qt::NoPen)); + p.setBrush(brush); + p.drawRect(QRect(0, 0, 4, 4)); + p.end(); + + HBITMAP hbm = pix.toWinHBITMAP(); + HBRUSH wbrush = CreatePatternBrush(hbm); + DeleteObject(hbm); + return wbrush; + #endif + } + break; + + case Qt::HorPattern: + break; + + case Qt::VerPattern: + lbHatch = HS_VERTICAL; + break; + + case Qt::CrossPattern: + lbHatch = HS_CROSS; + break; + + case Qt::BDiagPattern: + lbHatch = HS_BDIAGONAL; + break; + + case Qt::FDiagPattern: + lbHatch = HS_FDIAGONAL; + break; + + case Qt::DiagCrossPattern: + lbHatch = HS_DIAGCROSS; + break; + + case Qt::LinearGradientPattern: + { + qWarning("EmfEngine: Qt::LinearGradientPattern is not supported."); + return CreateBrushIndirect( &lbrush ); + } + break; + + case Qt::ConicalGradientPattern: + { + qWarning("EmfEngine: Qt::ConicalGradientPattern is not supported."); + return CreateBrushIndirect( &lbrush ); + } + break; + + case Qt::RadialGradientPattern: + { + qWarning("EmfEngine: Qt::RadialGradientPattern is not supported."); + return CreateBrushIndirect( &lbrush ); + } + + case Qt::TexturePattern: + #ifdef Q_WS_WIN + { + HBITMAP hbm = brush.texture().toWinHBITMAP(); + HBRUSH wbrush = CreatePatternBrush(hbm); + DeleteObject(hbm); + return wbrush; + } + #endif + break; + + default: + lbStyle = BS_SOLID; + break; + } + + LOGBRUSH logbrush = {lbStyle, RGB(brush.color().red(), brush.color().green(), brush.color().blue()), lbHatch}; + return CreateBrushIndirect( &logbrush ); +} diff --git a/test/jkqtplot_test/EmfEngine/src/EmfEngine.h b/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h similarity index 97% rename from test/jkqtplot_test/EmfEngine/src/EmfEngine.h rename to examples/jkqtplot_test/EmfEngine/src/EmfEngine.h index 1191e5176c..b434f1ce82 100644 --- a/test/jkqtplot_test/EmfEngine/src/EmfEngine.h +++ b/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h @@ -1,138 +1,138 @@ -/*************************************************************************** - File : EmfEngine.h - Project : EmfEngine - -------------------------------------------------------------------- - Copyright : (C) 2009 - 2010 by Ion Vasilief - Email (use @ for *) : ion_vasilief*yahoo.fr - Description : Enables the export of QPainter grafics to - Windows Enhanced Metafiles (.emf) - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - ***************************************************************************/ - -#ifndef EMFENGINE_H -#define EMFENGINE_H - -#include -#include - -#ifdef Q_WS_WIN - #include -#endif - -#ifdef EMFENGINE_DLL -# ifdef EMFENGINE_DLL_BUILD -# define EMFENGINELIB_EXPORT Q_DECL_EXPORT -# else -# define EMFENGINELIB_EXPORT Q_DECL_IMPORT -# endif -#else -# define EMFENGINELIB_EXPORT -#endif - -#ifdef HAVE_GDIPLUS - #include - using namespace Gdiplus; -#else - #ifdef Q_WS_X11 - #include - #endif - - #ifdef Q_WS_MAC - #include - #endif - - #undef min - #undef max -#endif - -class EmfPaintEngine : public QPaintEngine -{ -public: - EmfPaintEngine(const QString&); - ~EmfPaintEngine(){}; - virtual bool begin(QPaintDevice*); - virtual bool end(); - virtual void updateState( const QPaintEngineState & ) {}; - virtual void drawEllipse(const QRectF &); - virtual void drawImage(const QRectF& r, const QImage& im, const QRectF& sr) {drawPixmap(r,QPixmap::fromImage(im),sr);}; - virtual QPaintEngine::Type type() const {return QPaintEngine::User;}; - virtual void drawPoints ( const QPointF * points, int pointCount ); - virtual void drawLines ( const QLineF * , int ); - virtual void drawPath ( const QPainterPath & path ); - virtual void drawPolygon ( const QPointF * , int , PolygonDrawMode ); - virtual void drawTextItem ( const QPointF & , const QTextItem & ); - virtual void drawRects ( const QRectF * , int ); - virtual void drawPixmap ( const QRectF &, const QPixmap &, const QRectF &); - virtual void drawTiledPixmap(const QRectF &, const QPixmap &, const QPointF &); - virtual void drawImage(const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags); - -#ifdef HAVE_GDIPLUS - Graphics *graphicsObject(){return d_grx;}; - GraphicsPath *convertPath (const QPainterPath & path); -#endif - -private: -#ifdef HAVE_GDIPLUS - Metafile *metafile; - Graphics *d_grx; - GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - //! Converts a QPen to a GDI+ Pen structure - Pen *convertPen(const QPen& pen); - //! Converts a QBrush to a GDI+ Brush structure - Brush *convertBrush(const QBrush& brush, GraphicsPath *origPath = nullptr); - //! Draws pixmap pix in a given rectangle - void drawPixmap(const QPixmap &pix, const RectF &p); - //! Constructs a texture brush based on pixmap pix - TextureBrush *textureBrush(const QPixmap & pix); -#else - //! Converts a QPen to a HPEN structure - HPEN convertPen(const QPen&); - //! Converts a QBrush to a HBRUSH structure - HBRUSH convertBrush(const QBrush&); - //! Pointer to the metafile device context - HDC metaDC; - RECT d_rect; -#endif - //! Name of the output metafile - QString fname; - - void setClipping(); - void resetClipping(); -}; - -class EMFENGINELIB_EXPORT EmfPaintDevice : public QPaintDevice -{ -public: - EmfPaintDevice(const QSize& s, const QString& fileName); - ~EmfPaintDevice(); - virtual QPaintEngine * paintEngine () const; - -protected: - virtual int metric ( PaintDeviceMetric ) const; - -private: - //! Size in pixels - QSize d_size; - EmfPaintEngine* engine; -}; -#endif +/*************************************************************************** + File : EmfEngine.h + Project : EmfEngine + -------------------------------------------------------------------- + Copyright : (C) 2009 - 2010 by Ion Vasilief + Email (use @ for *) : ion_vasilief*yahoo.fr + Description : Enables the export of QPainter grafics to + Windows Enhanced Metafiles (.emf) + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301 USA * + * * + ***************************************************************************/ + +#ifndef EMFENGINE_H +#define EMFENGINE_H + +#include +#include + +#ifdef Q_WS_WIN + #include +#endif + +#ifdef EMFENGINE_DLL +# ifdef EMFENGINE_DLL_BUILD +# define EMFENGINELIB_EXPORT Q_DECL_EXPORT +# else +# define EMFENGINELIB_EXPORT Q_DECL_IMPORT +# endif +#else +# define EMFENGINELIB_EXPORT +#endif + +#ifdef HAVE_GDIPLUS + #include + using namespace Gdiplus; +#else + #ifdef Q_WS_X11 + #include + #endif + + #ifdef Q_WS_MAC + #include + #endif + + #undef min + #undef max +#endif + +class EmfPaintEngine : public QPaintEngine +{ +public: + EmfPaintEngine(const QString&); + ~EmfPaintEngine(){}; + virtual bool begin(QPaintDevice*); + virtual bool end(); + virtual void updateState( const QPaintEngineState & ) {}; + virtual void drawEllipse(const QRectF &); + virtual void drawImage(const QRectF& r, const QImage& im, const QRectF& sr) {drawPixmap(r,QPixmap::fromImage(im),sr);}; + virtual QPaintEngine::Type type() const {return QPaintEngine::User;}; + virtual void drawPoints ( const QPointF * points, int pointCount ); + virtual void drawLines ( const QLineF * , int ); + virtual void drawPath ( const QPainterPath & path ); + virtual void drawPolygon ( const QPointF * , int , PolygonDrawMode ); + virtual void drawTextItem ( const QPointF & , const QTextItem & ); + virtual void drawRects ( const QRectF * , int ); + virtual void drawPixmap ( const QRectF &, const QPixmap &, const QRectF &); + virtual void drawTiledPixmap(const QRectF &, const QPixmap &, const QPointF &); + virtual void drawImage(const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags); + +#ifdef HAVE_GDIPLUS + Graphics *graphicsObject(){return d_grx;}; + GraphicsPath *convertPath (const QPainterPath & path); +#endif + +private: +#ifdef HAVE_GDIPLUS + Metafile *metafile; + Graphics *d_grx; + GdiplusStartupInput gdiplusStartupInput; + ULONG_PTR gdiplusToken; + + //! Converts a QPen to a GDI+ Pen structure + Pen *convertPen(const QPen& pen); + //! Converts a QBrush to a GDI+ Brush structure + Brush *convertBrush(const QBrush& brush, GraphicsPath *origPath = nullptr); + //! Draws pixmap pix in a given rectangle + void drawPixmap(const QPixmap &pix, const RectF &p); + //! Constructs a texture brush based on pixmap pix + TextureBrush *textureBrush(const QPixmap & pix); +#else + //! Converts a QPen to a HPEN structure + HPEN convertPen(const QPen&); + //! Converts a QBrush to a HBRUSH structure + HBRUSH convertBrush(const QBrush&); + //! Pointer to the metafile device context + HDC metaDC; + RECT d_rect; +#endif + //! Name of the output metafile + QString fname; + + void setClipping(); + void resetClipping(); +}; + +class EMFENGINELIB_EXPORT EmfPaintDevice : public QPaintDevice +{ +public: + EmfPaintDevice(const QSize& s, const QString& fileName); + ~EmfPaintDevice(); + virtual QPaintEngine * paintEngine () const; + +protected: + virtual int metric ( PaintDeviceMetric ) const; + +private: + //! Size in pixels + QSize d_size; + EmfPaintEngine* engine; +}; +#endif diff --git a/test/jkqtplot_test/EmfEngine/src/EmfPaintDevice.cpp b/examples/jkqtplot_test/EmfEngine/src/EmfPaintDevice.cpp similarity index 97% rename from test/jkqtplot_test/EmfEngine/src/EmfPaintDevice.cpp rename to examples/jkqtplot_test/EmfEngine/src/EmfPaintDevice.cpp index e94daa52d4..efcee0999b 100644 --- a/test/jkqtplot_test/EmfEngine/src/EmfPaintDevice.cpp +++ b/examples/jkqtplot_test/EmfEngine/src/EmfPaintDevice.cpp @@ -1,78 +1,78 @@ -/*************************************************************************** - File : EmfPaintDevice.cpp - Project : EmfEngine - -------------------------------------------------------------------- - Copyright : (C) 2009 -2010 by Ion Vasilief - Email (use @ for *) : ion_vasilief*yahoo.fr - Description : Enables the export of QPainter grafics to - Windows Enhanced Metafiles (.emf) by using GDI calls - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - ***************************************************************************/ -#include "EmfEngine.h" - -#include -#include - -EmfPaintDevice::EmfPaintDevice(const QSize& s, const QString& fileName) : QPaintDevice(), -d_size(s) -{ - engine = new EmfPaintEngine(fileName); -} - -EmfPaintDevice::~EmfPaintDevice() -{ - delete engine; -} - -QPaintEngine * EmfPaintDevice::paintEngine () const -{ - return engine; -} - -int EmfPaintDevice::metric ( PaintDeviceMetric metric ) const -{ - int xdpi = QApplication::desktop()->logicalDpiX(); - int ydpi = QApplication::desktop()->logicalDpiY(); - - switch (metric){ - case QPaintDevice::PdmWidth: - return d_size.width(); - case QPaintDevice::PdmHeight: - return d_size.height(); - case QPaintDevice::PdmWidthMM: - return int(25.4*d_size.width()/(double)xdpi); - case QPaintDevice::PdmHeightMM: - return int(25.4*d_size.height()/(double)ydpi); - case QPaintDevice::PdmNumColors: - return 65536;//should it be millions? - case QPaintDevice::PdmDepth: - return 32; - case QPaintDevice::PdmDpiX: - case QPaintDevice::PdmPhysicalDpiX: - return xdpi; - case QPaintDevice::PdmDpiY: - case QPaintDevice::PdmPhysicalDpiY: - return ydpi; - default: - qWarning ("EmfPaintDevice::Strange metric asked"); - return 0; - } -} +/*************************************************************************** + File : EmfPaintDevice.cpp + Project : EmfEngine + -------------------------------------------------------------------- + Copyright : (C) 2009 -2010 by Ion Vasilief + Email (use @ for *) : ion_vasilief*yahoo.fr + Description : Enables the export of QPainter grafics to + Windows Enhanced Metafiles (.emf) by using GDI calls + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301 USA * + * * + ***************************************************************************/ +#include "EmfEngine.h" + +#include +#include + +EmfPaintDevice::EmfPaintDevice(const QSize& s, const QString& fileName) : QPaintDevice(), +d_size(s) +{ + engine = new EmfPaintEngine(fileName); +} + +EmfPaintDevice::~EmfPaintDevice() +{ + delete engine; +} + +QPaintEngine * EmfPaintDevice::paintEngine () const +{ + return engine; +} + +int EmfPaintDevice::metric ( PaintDeviceMetric metric ) const +{ + int xdpi = QApplication::desktop()->logicalDpiX(); + int ydpi = QApplication::desktop()->logicalDpiY(); + + switch (metric){ + case QPaintDevice::PdmWidth: + return d_size.width(); + case QPaintDevice::PdmHeight: + return d_size.height(); + case QPaintDevice::PdmWidthMM: + return int(25.4*d_size.width()/(double)xdpi); + case QPaintDevice::PdmHeightMM: + return int(25.4*d_size.height()/(double)ydpi); + case QPaintDevice::PdmNumColors: + return 65536;//should it be millions? + case QPaintDevice::PdmDepth: + return 32; + case QPaintDevice::PdmDpiX: + case QPaintDevice::PdmPhysicalDpiX: + return xdpi; + case QPaintDevice::PdmDpiY: + case QPaintDevice::PdmPhysicalDpiY: + return ydpi; + default: + qWarning ("EmfPaintDevice::Strange metric asked"); + return 0; + } +} diff --git a/test/jkqtplot_test/EmfEngine/src/src.pro b/examples/jkqtplot_test/EmfEngine/src/src.pro similarity index 95% rename from test/jkqtplot_test/EmfEngine/src/src.pro rename to examples/jkqtplot_test/EmfEngine/src/src.pro index 04eb2dcb7c..c7909b765f 100644 --- a/test/jkqtplot_test/EmfEngine/src/src.pro +++ b/examples/jkqtplot_test/EmfEngine/src/src.pro @@ -1,26 +1,26 @@ -# qmake project file for building the EmfEngine libraries - -include( ../config.pri ) - -TARGET = EmfEngine -TEMPLATE = lib - -MOC_DIR = ../tmp -OBJECTS_DIR = ../tmp -DESTDIR = ../ - -contains(CONFIG, EmfEngineDll) { - CONFIG += dll - DEFINES += EMFENGINE_DLL EMFENGINE_DLL_BUILD -} else { - CONFIG += staticlib -} - -HEADERS = EmfEngine.h - -SOURCES += EmfEngine.cpp -SOURCES += EmfPaintDevice.cpp - -win32: LIBS += -lgdi32 -unix: LIBS += /usr/local/lib/libEMF.a -unix: INCLUDEPATH += /usr/local/include/libEMF +# qmake project file for building the EmfEngine libraries + +include( ../config.pri ) + +TARGET = EmfEngine +TEMPLATE = lib + +MOC_DIR = ../tmp +OBJECTS_DIR = ../tmp +DESTDIR = ../ + +contains(CONFIG, EmfEngineDll) { + CONFIG += dll + DEFINES += EMFENGINE_DLL EMFENGINE_DLL_BUILD +} else { + CONFIG += staticlib +} + +HEADERS = EmfEngine.h + +SOURCES += EmfEngine.cpp +SOURCES += EmfPaintDevice.cpp + +win32: LIBS += -lgdi32 +unix: LIBS += /usr/local/lib/libEMF.a +unix: INCLUDEPATH += /usr/local/include/libEMF diff --git a/test/jkqtplot_test/QTeXEngine/CHANGES.txt b/examples/jkqtplot_test/QTeXEngine/CHANGES.txt similarity index 85% rename from test/jkqtplot_test/QTeXEngine/CHANGES.txt rename to examples/jkqtplot_test/QTeXEngine/CHANGES.txt index 596001efe6..17d116a237 100644 --- a/test/jkqtplot_test/QTeXEngine/CHANGES.txt +++ b/examples/jkqtplot_test/QTeXEngine/CHANGES.txt @@ -1,16 +1,16 @@ -QTeXEngine GNU GPL v. 3.0 ------------------------- - -09/11/2010 - Release 0.3: - Fixed a bug leading to the creation of empty drawing paths. - ------------------------- - -17/08/2009 - Release 0.2: -- Improved handling of text strings. -- Added several useful output options. -- Added Doxygen configuration files. - ------------------------- - +QTeXEngine GNU GPL v. 3.0 +------------------------ + +09/11/2010 - Release 0.3: + Fixed a bug leading to the creation of empty drawing paths. + +------------------------ + +17/08/2009 - Release 0.2: +- Improved handling of text strings. +- Added several useful output options. +- Added Doxygen configuration files. + +------------------------ + 05/08/2009 - Release 0.1: Initial release. \ No newline at end of file diff --git a/test/jkqtplot_test/QTeXEngine/COPYING.txt b/examples/jkqtplot_test/QTeXEngine/COPYING.txt similarity index 100% rename from test/jkqtplot_test/QTeXEngine/COPYING.txt rename to examples/jkqtplot_test/QTeXEngine/COPYING.txt diff --git a/test/jkqtplot_test/QTeXEngine/QTeXEngine.pro b/examples/jkqtplot_test/QTeXEngine/QTeXEngine.pro similarity index 84% rename from test/jkqtplot_test/QTeXEngine/QTeXEngine.pro rename to examples/jkqtplot_test/QTeXEngine/QTeXEngine.pro index 979aa5f314..47053a1854 100644 --- a/test/jkqtplot_test/QTeXEngine/QTeXEngine.pro +++ b/examples/jkqtplot_test/QTeXEngine/QTeXEngine.pro @@ -1,8 +1,8 @@ -include( config.pri ) - -TEMPLATE = subdirs - -SUBDIRS = \ - src \ - example \ +include( config.pri ) + +TEMPLATE = subdirs + +SUBDIRS = \ + src \ + example \ test \ No newline at end of file diff --git a/test/jkqtplot_test/QTeXEngine/README.txt b/examples/jkqtplot_test/QTeXEngine/README.txt similarity index 97% rename from test/jkqtplot_test/QTeXEngine/README.txt rename to examples/jkqtplot_test/QTeXEngine/README.txt index f07fa16d5b..0572cc900a 100644 --- a/test/jkqtplot_test/QTeXEngine/README.txt +++ b/examples/jkqtplot_test/QTeXEngine/README.txt @@ -1,28 +1,28 @@ -QTeXEngine GNU GPL v. 3.0 ------------------------- -AUTHOR: Ion Vasilief ------------------------- -FEATURES: QTeXEngine enables Qt based applications to easily export graphics created using the - QPainter class to the .tex format using Pgf/TikZ packages (http://sourceforge.net/projects/pgf/). ---------------------------------------------------------------------------- -DEPENDENCIES: You need Qt (http://www.qtsoftware.com) installed on your system in order to build QTeXEngine. ---------------------------------------------------------------------------- -COMPILING: QTeXEngine uses qmake for the building process. - qmake is part of a Qt distribution: - qmake reads project files, that contain the options and rules how to build a certain project. - A project file ends with the suffix "*.pro". Please read the qmake documentation for more details. - -After installing Qt on your system, type the following command lines: - - $ qmake - $ make - -if you use MinGW, or: - - $ qmake -tp vc -r - -if you use Microsoft Visual Studio (this will generate Visual Studio .vcproj project files in the "src" and "example" folders). - ---------------------------------------------------------------------------- -USE: a short demo application is provided in the "example" folder of the source archive. ---------------------------------------------------------------------------- +QTeXEngine GNU GPL v. 3.0 +------------------------ +AUTHOR: Ion Vasilief +------------------------ +FEATURES: QTeXEngine enables Qt based applications to easily export graphics created using the + QPainter class to the .tex format using Pgf/TikZ packages (http://sourceforge.net/projects/pgf/). +--------------------------------------------------------------------------- +DEPENDENCIES: You need Qt (http://www.qtsoftware.com) installed on your system in order to build QTeXEngine. +--------------------------------------------------------------------------- +COMPILING: QTeXEngine uses qmake for the building process. + qmake is part of a Qt distribution: + qmake reads project files, that contain the options and rules how to build a certain project. + A project file ends with the suffix "*.pro". Please read the qmake documentation for more details. + +After installing Qt on your system, type the following command lines: + + $ qmake + $ make + +if you use MinGW, or: + + $ qmake -tp vc -r + +if you use Microsoft Visual Studio (this will generate Visual Studio .vcproj project files in the "src" and "example" folders). + +--------------------------------------------------------------------------- +USE: a short demo application is provided in the "example" folder of the source archive. +--------------------------------------------------------------------------- diff --git a/test/jkqtplot_test/QTeXEngine/config.pri b/examples/jkqtplot_test/QTeXEngine/config.pri similarity index 95% rename from test/jkqtplot_test/QTeXEngine/config.pri rename to examples/jkqtplot_test/QTeXEngine/config.pri index 5d53579c83..b5433e2bcd 100644 --- a/test/jkqtplot_test/QTeXEngine/config.pri +++ b/examples/jkqtplot_test/QTeXEngine/config.pri @@ -1,9 +1,9 @@ -CONFIG += qt warn_on thread -CONFIG += release - -# Comment the lines bellow if you want to build QTeXEngine statically -#CONFIG += QTeXEngineDll - - - - +CONFIG += qt warn_on thread +CONFIG += release + +# Comment the lines bellow if you want to build QTeXEngine statically +#CONFIG += QTeXEngineDll + + + + diff --git a/test/jkqtplot_test/QTeXEngine/doc/Doxyfile b/examples/jkqtplot_test/QTeXEngine/doc/Doxyfile similarity index 97% rename from test/jkqtplot_test/QTeXEngine/doc/Doxyfile rename to examples/jkqtplot_test/QTeXEngine/doc/Doxyfile index e8be17b4eb..229b66af13 100644 --- a/test/jkqtplot_test/QTeXEngine/doc/Doxyfile +++ b/examples/jkqtplot_test/QTeXEngine/doc/Doxyfile @@ -1,222 +1,222 @@ -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = QTeXEngine -PROJECT_NUMBER = 0.2 -OUTPUT_DIRECTORY = . -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = YES -INHERIT_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 4 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = YES -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../src . -FILE_PATTERNS = *.cpp \ - *.h \ - *.txt \ - *.dox -RECURSIVE = yes -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = *moc_* -EXAMPLE_PATH = ../README.txt ../COPYING.txt -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -# recommendation: install graphviz and use HAVE_DOT = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = QTeXEngine +PROJECT_NUMBER = 0.2 +OUTPUT_DIRECTORY = . +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = YES +INHERIT_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 4 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = YES +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = ../src . +FILE_PATTERNS = *.cpp \ + *.h \ + *.txt \ + *.dox +RECURSIVE = yes +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = *moc_* +EXAMPLE_PATH = ../README.txt ../COPYING.txt +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +# recommendation: install graphviz and use HAVE_DOT = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- SEARCHENGINE = NO diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/QTeXEngine_8h-source.html b/examples/jkqtplot_test/QTeXEngine/doc/html/QTeXEngine_8h-source.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/QTeXEngine_8h-source.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/QTeXEngine_8h-source.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/QTeXEngine_8h.html b/examples/jkqtplot_test/QTeXEngine/doc/html/QTeXEngine_8h.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/QTeXEngine_8h.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/QTeXEngine_8h.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/QTeXPaintDevice_8cpp.html b/examples/jkqtplot_test/QTeXEngine/doc/html/QTeXPaintDevice_8cpp.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/QTeXPaintDevice_8cpp.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/QTeXPaintDevice_8cpp.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/QTeXPaintEngine_8cpp.html b/examples/jkqtplot_test/QTeXEngine/doc/html/QTeXPaintEngine_8cpp.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/QTeXPaintEngine_8cpp.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/QTeXPaintEngine_8cpp.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/annotated.html b/examples/jkqtplot_test/QTeXEngine/doc/html/annotated.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/annotated.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/annotated.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintDevice-members.html b/examples/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintDevice-members.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintDevice-members.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintDevice-members.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintDevice.html b/examples/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintDevice.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintDevice.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintDevice.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintEngine-members.html b/examples/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintEngine-members.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintEngine-members.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintEngine-members.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintEngine.html b/examples/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintEngine.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintEngine.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/classQTeXPaintEngine.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/classes.html b/examples/jkqtplot_test/QTeXEngine/doc/html/classes.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/classes.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/classes.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/dir_def0c14f7261295f36d3de237dcfedeb.html b/examples/jkqtplot_test/QTeXEngine/doc/html/dir_def0c14f7261295f36d3de237dcfedeb.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/dir_def0c14f7261295f36d3de237dcfedeb.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/dir_def0c14f7261295f36d3de237dcfedeb.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/dirs.html b/examples/jkqtplot_test/QTeXEngine/doc/html/dirs.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/dirs.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/dirs.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/doxygen.css b/examples/jkqtplot_test/QTeXEngine/doc/html/doxygen.css similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/doxygen.css rename to examples/jkqtplot_test/QTeXEngine/doc/html/doxygen.css diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/doxygen.png b/examples/jkqtplot_test/QTeXEngine/doc/html/doxygen.png similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/doxygen.png rename to examples/jkqtplot_test/QTeXEngine/doc/html/doxygen.png diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/files.html b/examples/jkqtplot_test/QTeXEngine/doc/html/files.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/files.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/files.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/functions.html b/examples/jkqtplot_test/QTeXEngine/doc/html/functions.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/functions.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/functions.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/functions_enum.html b/examples/jkqtplot_test/QTeXEngine/doc/html/functions_enum.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/functions_enum.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/functions_enum.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/functions_eval.html b/examples/jkqtplot_test/QTeXEngine/doc/html/functions_eval.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/functions_eval.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/functions_eval.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/functions_func.html b/examples/jkqtplot_test/QTeXEngine/doc/html/functions_func.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/functions_func.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/functions_func.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/functions_vars.html b/examples/jkqtplot_test/QTeXEngine/doc/html/functions_vars.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/functions_vars.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/functions_vars.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/gtexenginelicense.html b/examples/jkqtplot_test/QTeXEngine/doc/html/gtexenginelicense.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/gtexenginelicense.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/gtexenginelicense.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/index.html b/examples/jkqtplot_test/QTeXEngine/doc/html/index.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/index.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/index.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/pages.html b/examples/jkqtplot_test/QTeXEngine/doc/html/pages.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/pages.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/pages.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/qtexengine_8dox.html b/examples/jkqtplot_test/QTeXEngine/doc/html/qtexengine_8dox.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/qtexengine_8dox.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/qtexengine_8dox.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/qtexengineinstall.html b/examples/jkqtplot_test/QTeXEngine/doc/html/qtexengineinstall.html similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/qtexengineinstall.html rename to examples/jkqtplot_test/QTeXEngine/doc/html/qtexengineinstall.html diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/tab_b.gif b/examples/jkqtplot_test/QTeXEngine/doc/html/tab_b.gif similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/tab_b.gif rename to examples/jkqtplot_test/QTeXEngine/doc/html/tab_b.gif diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/tab_l.gif b/examples/jkqtplot_test/QTeXEngine/doc/html/tab_l.gif similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/tab_l.gif rename to examples/jkqtplot_test/QTeXEngine/doc/html/tab_l.gif diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/tab_r.gif b/examples/jkqtplot_test/QTeXEngine/doc/html/tab_r.gif similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/tab_r.gif rename to examples/jkqtplot_test/QTeXEngine/doc/html/tab_r.gif diff --git a/test/jkqtplot_test/QTeXEngine/doc/html/tabs.css b/examples/jkqtplot_test/QTeXEngine/doc/html/tabs.css similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/html/tabs.css rename to examples/jkqtplot_test/QTeXEngine/doc/html/tabs.css diff --git a/test/jkqtplot_test/QTeXEngine/doc/qtexengine.dox b/examples/jkqtplot_test/QTeXEngine/doc/qtexengine.dox similarity index 100% rename from test/jkqtplot_test/QTeXEngine/doc/qtexengine.dox rename to examples/jkqtplot_test/QTeXEngine/doc/qtexengine.dox diff --git a/test/jkqtplot_test/QTeXEngine/example/example.pro b/examples/jkqtplot_test/QTeXEngine/example/example.pro similarity index 95% rename from test/jkqtplot_test/QTeXEngine/example/example.pro rename to examples/jkqtplot_test/QTeXEngine/example/example.pro index c8c62e9a9c..8f071bb0ec 100644 --- a/test/jkqtplot_test/QTeXEngine/example/example.pro +++ b/examples/jkqtplot_test/QTeXEngine/example/example.pro @@ -1,15 +1,15 @@ -TARGET = example -TEMPLATE = app -CONFIG += warn_on release thread - -MOC_DIR = ../tmp -OBJECTS_DIR = ../tmp -DESTDIR = ./ - -INCLUDEPATH += ../src -LIBS += ../libQTeXEngine.a - -HEADERS = renderarea.h \ - pixmaps.h -SOURCES = main.cpp \ - renderarea.cpp +TARGET = example +TEMPLATE = app +CONFIG += warn_on release thread + +MOC_DIR = ../tmp +OBJECTS_DIR = ../tmp +DESTDIR = ./ + +INCLUDEPATH += ../src +LIBS += ../libQTeXEngine.a + +HEADERS = renderarea.h \ + pixmaps.h +SOURCES = main.cpp \ + renderarea.cpp diff --git a/test/jkqtplot_test/QTeXEngine/example/main.cpp b/examples/jkqtplot_test/QTeXEngine/example/main.cpp similarity index 95% rename from test/jkqtplot_test/QTeXEngine/example/main.cpp rename to examples/jkqtplot_test/QTeXEngine/example/main.cpp index 7e3d9cd2c9..33a076e2dd 100644 --- a/test/jkqtplot_test/QTeXEngine/example/main.cpp +++ b/examples/jkqtplot_test/QTeXEngine/example/main.cpp @@ -1,21 +1,21 @@ -#include -#include "renderarea.h" -#include - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - RenderArea area; - - area.setGeometry(100, 100, 600, 500); - area.show(); - - QTeXPaintDevice tex(QString("example.tex"), QSize(600, 500)); - tex.setDocumentMode(); - QPainter paint; - paint.begin(&tex); - area.draw(&paint); - paint.end(); - - return app.exec(); -} +#include +#include "renderarea.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + RenderArea area; + + area.setGeometry(100, 100, 600, 500); + area.show(); + + QTeXPaintDevice tex(QString("example.tex"), QSize(600, 500)); + tex.setDocumentMode(); + QPainter paint; + paint.begin(&tex); + area.draw(&paint); + paint.end(); + + return app.exec(); +} diff --git a/test/jkqtplot_test/QTeXEngine/example/pixmaps.h b/examples/jkqtplot_test/QTeXEngine/example/pixmaps.h similarity index 96% rename from test/jkqtplot_test/QTeXEngine/example/pixmaps.h rename to examples/jkqtplot_test/QTeXEngine/example/pixmaps.h index 86a2aca988..2cda3c22dc 100644 --- a/test/jkqtplot_test/QTeXEngine/example/pixmaps.h +++ b/examples/jkqtplot_test/QTeXEngine/example/pixmaps.h @@ -1,805 +1,805 @@ -/* XPM */ -static const char * qt_logo_xpm[] = { -"69 80 364 2", -" c None", -". c #0C481E", -"+ c #135020", -"@ c #3F832C", -"# c #4D932F", -"$ c #509730", -"% c #559C31", -"& c #5AA233", -"* c #569E32", -"= c #4D942F", -"- c #468B2E", -"; c #41852C", -"> c #0E4B1F", -", c #347629", -"' c #60A934", -") c #66B036", -"! c #63AC35", -"~ c #579F32", -"{ c #4E9430", -"] c #478C2E", -"^ c #41862C", -"/ c #124F20", -"( c #59A133", -"_ c #64AD35", -": c #58A032", -"< c #4F9530", -"[ c #488D2E", -"} c #42862C", -"| c #4A8F2E", -"1 c #64AE36", -"2 c #509630", -"3 c #488E2E", -"4 c #42872C", -"5 c #317328", -"6 c #65AF36", -"7 c #5AA333", -"8 c #498E2E", -"9 c #43872D", -"0 c #175521", -"a c #63AD35", -"b c #5BA333", -"c c #519830", -"d c #498F2E", -"e c #43882D", -"f c #2E6F27", -"g c #5CA533", -"h c #529931", -"i c #4A902F", -"j c #44882D", -"k c #40842C", -"l c #5DA634", -"m c #539A31", -"n c #4B902F", -"o c #44892D", -"p c #5FA734", -"q c #549B31", -"r c #0D491E", -"s c #589E37", -"t c #70B04C", -"u c #83BE5D", -"v c #7CBB53", -"w c #6DB43F", -"x c #63AD36", -"y c #286926", -"z c #26622B", -"A c #699665", -"B c #D0E0CF", -"C c #FFFFFF", -"D c #FEFEFD", -"E c #E5F2DD", -"F c #C4E1B2", -"G c #9DCD7F", -"H c #69B23A", -"I c #185722", -"J c #114E20", -"K c #7FA67A", -"L c #EEF6E8", -"M c #A7D18B", -"N c #6BB23C", -"O c #3A7D2B", -"P c #0D481E", -"Q c #1E5A26", -"R c #D4E2D1", -"S c #E0EFD6", -"T c #76B84A", -"U c #63AB35", -"V c #397C2A", -"W c #8DBE74", -"X c #9ECD80", -"Y c #8EC56B", -"Z c #7DBC55", -"` c #6DB33F", -" . c #3F842C", -".. c #175323", -"+. c #D2E1D0", -"@. c #EFF7EA", -"#. c #83BF5D", -"$. c #0D491F", -"%. c #EAF1E9", -"&. c #CBE4BA", -"*. c #B9D1B6", -"=. c #EFF7EB", -"-. c #72B646", -";. c #235F2A", -">. c #65B036", -",. c #1C5A22", -"'. c #487E48", -"). c #F8FAF9", -"!. c #ADC6AB", -"~. c #B7CFB4", -"{. c #D3E8C5", -"]. c #67B037", -"^. c #246324", -"/. c #4F844E", -"(. c #104D20", -"_. c #DBE8D9", -":. c #CCE5BC", -"<. c #7BBB52", -"[. c #114E1F", -"}. c #2A662F", -"|. c #A2C09D", -"1. c #A1CE83", -"2. c #64AE35", -"3. c #0F4D1F", -"4. c #8DB289", -"5. c #65AF35", -"6. c #165321", -"7. c #588A56", -"8. c #E6F2DE", -"9. c #6CB33E", -"0. c #0C491E", -"a. c #104B1F", -"b. c #CCDDC8", -"c. c #E8F3E0", -"d. c #539B31", -"e. c #DCE8DB", -"f. c #BCD3B8", -"g. c #81BE59", -"h. c #2C6D26", -"i. c #2E6932", -"j. c #95C873", -"k. c #3E832B", -"l. c #1C5926", -"m. c #347529", -"n. c #1B5825", -"o. c #EBF4E4", -"p. c #98B993", -"q. c #D4E9C7", -"r. c #296A26", -"s. c #457B44", -"t. c #558853", -"u. c #C9E3B8", -"v. c #155220", -"w. c #568A54", -"x. c #FAFDF9", -"y. c #2D6A2D", -"z. c #0F4B1E", -"A. c #53864F", -"B. c #D9E6D7", -"C. c #BCD2B9", -"D. c #D5E3D2", -"E. c #DAECCF", -"F. c #8DC469", -"G. c #82BF5B", -"H. c #77B94D", -"I. c #589F33", -"J. c #A6C3A1", -"K. c #A7D28C", -"L. c #276826", -"M. c #2D6831", -"N. c #659363", -"O. c #51854F", -"P. c #C5E1B3", -"Q. c #E3EBE0", -"R. c #86C161", -"S. c #FDFEFD", -"T. c #A8C5A1", -"U. c #C6E2B4", -"V. c #145122", -"W. c #FEFFFE", -"X. c #6AB23B", -"Y. c #C5D8C1", -"Z. c #CFE2C8", -"`. c #2C6C27", -" + c #2B6530", -".+ c #F8FBF6", -"++ c #5BA334", -"@+ c #91B48C", -"#+ c #E2EFDA", -"$+ c #1D5B22", -"%+ c #497F49", -"&+ c #F1F8ED", -"*+ c #82AA7F", -"=+ c #F1F8EC", -"-+ c #458536", -";+ c #2F6A33", -">+ c #417841", -",+ c #E7F0E2", -"'+ c #BDD8B3", -")+ c #C3DAB9", -"!+ c #CBDFC4", -"~+ c #DBE9D3", -"{+ c #B7D9A1", -"]+ c #649360", -"^+ c #EAF4E3", -"/+ c #78A274", -"(+ c #478C2D", -"_+ c #6F9C6C", -":+ c #E3F1DB", -"<+ c #0E4A1E", -"[+ c #6D9B69", -"}+ c #7DA578", -"|+ c #DCEDD1", -"1+ c #639260", -"2+ c #7FBD57", -"3+ c #61AA35", -"4+ c #88AE84", -"5+ c #D5E9C8", -"6+ c #598B57", -"7+ c #8CC468", -"8+ c #97B792", -"9+ c #CEE6BF", -"0+ c #1A5821", -"a+ c #9ACB7A", -"b+ c #5AA132", -"c+ c #C8E2B6", -"d+ c #1E5D23", -"e+ c #477D46", -"f+ c #5FA834", -"g+ c #90B38B", -"h+ c #1E5C22", -"i+ c #487D47", -"j+ c #A9D28D", -"k+ c #7AA476", -"l+ c #D1E7C3", -"m+ c #51844E", -"n+ c #9ECD7F", -"o+ c #679563", -"p+ c #D7EBCB", -"q+ c #175421", -"r+ c #93C771", -"s+ c #185621", -"t+ c #558752", -"u+ c #DEEED4", -"v+ c #61915E", -"w+ c #88C263", -"x+ c #1F5E24", -"y+ c #437B44", -"z+ c #E5F1DC", -"A+ c #0F4C1F", -"B+ c #6A9867", -"C+ c #276625", -"D+ c #356E38", -"E+ c #749F70", -"F+ c #73B747", -"G+ c #2D6E27", -"H+ c #28642E", -"I+ c #62AB34", -"J+ c #68B139", -"K+ c #1D5A26", -"L+ c #5EA734", -"M+ c #F7FBF4", -"N+ c #145021", -"O+ c #9EBD99", -"P+ c #E7EFE5", -"Q+ c #91C66F", -"R+ c #DEE9DC", -"S+ c #C2DFAF", -"T+ c #B0D698", -"U+ c #357829", -"V+ c #195524", -"W+ c #99CA79", -"X+ c #578955", -"Y+ c #D0E7C1", -"Z+ c #37703A", -"`+ c #71B645", -" @ c #D1E7C2", -".@ c #E0EFD7", -"+@ c #478D2E", -"@@ c #EBF5E5", -"#@ c #4B902E", -"$@ c #80BE59", -"%@ c #579E32", -"&@ c #ADC7A8", -"*@ c #B8DAA1", -"=@ c #F9FBF8", -"-@ c #6EB440", -";@ c #155321", -">@ c #D6EAC9", -",@ c #3D743E", -"'@ c #C1DFB1", -")@ c #538E44", -"!@ c #437B42", -"~@ c #CCDEC7", -"{@ c #377A2A", -"]@ c #195623", -"^@ c #FCFDFB", -"/@ c #94C873", -"(@ c #4B922F", -"_@ c #67B138", -":@ c #62AB35", -"<@ c #FBFDF9", -"[@ c #5EA634", -"}@ c #7EA77A", -"|@ c #F0F7EB", -"1@ c #8FC56D", -"2@ c #3C7E2A", -"3@ c #427941", -"4@ c #97C977", -"5@ c #6A9866", -"6@ c #E7EEE5", -"7@ c #E4ECE2", -"8@ c #D9EBCD", -"9@ c #EBF2EB", -"0@ c #66AF36", -"a@ c #236324", -"b@ c #387139", -"c@ c #BADBA4", -"d@ c #1F5E23", -"e@ c #4A8049", -"f@ c #F2F8EE", -"g@ c #83BF5C", -"h@ c #2F6C31", -"i@ c #C7DAC3", -"j@ c #EDF6E7", -"k@ c #9DCC7E", -"l@ c #74B749", -"m@ c #F2F7F2", -"n@ c #E1F0D8", -"o@ c #78B94E", -"p@ c #AAC5A6", -"q@ c #A5D189", -"r@ c #6AB23C", -"s@ c #62AD35", -"t@ c #266725", -"u@ c #FDFEFC", -"v@ c #6C9A68", -"w@ c #29642E", -"x@ c #CEE6BE", -"y@ c #62AC35", -"z@ c #AFD595", -"A@ c #77A172", -"B@ c #D5E8CD", -"C@ c #B6D9A1", -"D@ c #25602B", -"E@ c #FAFCFA", -"F@ c #185521", -"G@ c #5B8C59", -"H@ c #A2C19E", -"I@ c #155221", -"J@ c #8CB284", -"K@ c #3D812B", -"L@ c #417F37", -"M@ c #679A5C", -"N@ c #97BF8A", -"O@ c #C8E1B7", -"P@ c #BBDCA5", -"Q@ c #89C264", -"R@ c #45892D", -"S@ c #5BA433", -"T@ c #519831", -"U@ c #5CA433", -"V@ c #5DA534", -"W@ c #4B912F", -" . . + @ # $ % & * = - ; ", -" . . . . > , ' ) ) ) ) ) ) ) ) ) ) ! ~ { ] ^ ", -" . . . . / ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) _ : < [ } ", -" . . . . . | ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 ( 2 3 4 ", -" . . . . . 5 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 7 $ 8 9 ", -" . . . . 0 a ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 b c d e ", -" . . . . . f ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) g h i j ", -" . . . . . k ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) l m n o ", -" . . . . . h ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) p q ", -" . . . . r ! ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' * s t u v w ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) x 3 y z A B C C C C D E F G H ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) c I J K C C C C C C C C C C C L M N ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) O P Q R C C C C C C C C C C C C C C S T ) ) ) ) ) ) ) ) U V V W X Y Z ` ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) .. ..+.C C C C C C C C C C C C C C C C @.#.) ) ) ) ) ) ) { . $.%.C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) # P $.*.C C C C C C C C C C C C C C C C C C =.-.) ) ) ) ) ) V . ;.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) >.,.. '.C C C C C C C C C ).!.~.C C C C C C C C {.].) ) ) ) ) ^.. /.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) e . (._.C C C C C C C C :.<.e [.}.|.C C C C C C C 1.) ) ) ) 2.3.. 4.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) 5.6.. 7.C C C C C C C C 8.9.) ) h 0.a.b.C C C C C C c.].) ) ) d.. . e.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) $ . . f.C C C C C C C C g.) ) ) ) h.. i.C C C C C C C j.) ) ) k.. l.C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) m.. n.C C C C C C C C o.) ) ) ) ) 7 . . p.C C C C C C q.) ) ) r.. s.C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) 0 . t.C C C C C C C C u.) ) ) ) ) ) v.. w.C C C C C C x.y.z.A.B.C.D.C C C C C E.F.G.H.` ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) I.. . J.C C C C C C C C K.) ) ) ) ) ) L.. M.C C C C C C C N.. O.C C C C C C C C C C C C C P.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) 3 . . Q.C C C C C C C C R.) ) ) ) ) ) O . J S.C C C C C C T.. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) O . V.C C C C C C C C W.X.) ) ) ) ) ) # . . Y.C C C C C C Z.. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) `.. +C C C C C C C C .+) ) ) ) ) ) ) ++. . @+C C C C C C #+. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) $+. %+C C C C C C C C &+) ) ) ) ) ) ) ' . . *+C C C C C C =+{ -+;+>+C C C C C C ,+'+)+!+~+{+) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) + . ]+C C C C C C C C ^+) ) ) ) ) ) ) 1 . . /+C C C C C C S.].(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) z.. _+C C C C C C C C :+) ) ) ) ) ) ) ) <+. [+C C C C C C C -.(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) 2.. . }+C C C C C C C C |+) ) ) ) ) ) ) ) [.. 1+C C C C C C C 2+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) 3+. . 4+C C C C C C C C 5+) ) ) ) ) ) ) ) 6.. 6+C C C C C C C 7+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) g . . 8+C C C C C C C C 9+) ) ) ) ) ) ) ) 0+. /.C C C C C C C a+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) b+. . |.C C C C C C C C c+) ) ) ) ) ) ) ) d+. e+C C C C C C C M (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) f+. . g+C C C C C C C C &.) ) ) ) ) ) ) ) h+. i+C C C C C C C j+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) 5.0.. k+C C C C C C C C l+) ) ) ) ) ) ) ) 0+. m+C C C C C C C n+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) [.. o+C C C C C C C C p+) ) ) ) ) ) ) ) q+. 7.C C C C C C C r+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) s+. t+C C C C C C C C u+) ) ) ) ) ) ) ) / . v+C C C C C C C w+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) x+. y+C C C C C C C C z+) ) ) ) ) ) ) ) A+. B+C C C C C C C Z (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) C+. D+C C C C C C C C o.) ) ) ) ) ) ) >.. . E+C C C C C C C F+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) G+. H+C C C C C C C C &+) ) ) ) ) ) ) I+. . K C C C C C C C J+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) m.. K+C C C C C C C C .+) ) ) ) ) ) ) L+. . 4+C C C C C C M+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) O . N+C C C C C C C C C F+) ) ) ) ) ) : . . O+C C C C C C c.) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) (+. 0.P+C C C C C C C C Q+) ) ) ) ) ) (+. . R+C C C C C C S+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) g . . p.C C C C C C C C T+) ) ) ) ) ) U+. V+C C C C C C C W+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) 0 . X+C C C C C C C C Y+) ) ) ) ) ) ^.. Z+C C C C C C D `+) (+. / C C C C C C @) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) G+. H+C C C C C C C C @.) ) ) ) ) ) / . ]+C C C C C C .@) ) +@. / C C C C C C @@) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) #@. $.D.C C C C C C C C $@) ) ) ) %@. . &@C C C C C C *@) ) = . $.=@C C C C C W.-@) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) 5.;@. v+C C C C C C C C >@) ) ) ) L.. ,@C C C C C C C Y ) ) ~ . . R C C C C C C '@)@!@/+~@) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) {@. ]@^@C C C C C C C C /@) ) (@. / _.C C C C C C 8._@) ) :@. . &@C C C C C C C C C C <@) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) [@[.. }@C C C C C C C C |@1@2@(.3@*.C C C C C C C 4@) ) ) ) ,.. 5@C C C C C C C C C C x.) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) } . / e.C C C C C C C C C 6@7@C C C C C C C C 8@) ) ) ) ) 8 . N+9@C C C C C C C C C <@) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) 0@a@. b@S.C C C C C C C C C C C C C C C C C L F+) ) ) ) ) 0@y . '.=@C C C C C C C z+c@) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) 3+d@. e@C C C C C C C C C C C C C C C C f@g@) ) ) ) ) ) ) ) j ^.h@g+i@=@j@P.k@l@) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) 3+a@. %+m@C C C C C C C C C C C C C n@o@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0@9 [.K+p@C C C C C C C C C C o.q@r@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) s@[ t@;.A P+C C C C C C u@-@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 [.. v@C C C C C C C r+) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) `.. w@C C C C C C C x@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) y@ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) [ . P _.C C C C C C C z@F+) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ~ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) :@z.. A@C C C C C C C C D B@C@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) < ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) f . D@E@C C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) - ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3+F@. G@C C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) y@ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) m <+P H@C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) n ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) # $+I@J@^@C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0@= K@L@M@N@O@U.P@M Q@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3+ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) L+ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 ~ o ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 b c i R@ ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 S@T@i o ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) U@h i o ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) g h i o ", -" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) V@h i o ", -" . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) V@m n o ", -" . . / ) ) ) ) ) ) ) ) ) ) ) ) l m n o ", -" . / ) ) ) ) ) ) L+m W@o ", -" v.L+m W@R@ "}; - -/* XPM */ -static const char * brick_xpm[] = { -"32 16 338 2", -" c #ECDAA8", -". c #EEDDA8", -"+ c #F0E0A8", -"@ c #F0E2A8", -"# c #F2E3A8", -"$ c #F2E4A8", -"% c #F1E3A8", -"& c #F1E2A8", -"* c #EEDEA8", -"= c #EEDBA8", -"- c #EBD9A8", -"; c #EAD6A8", -"> c #E9D4A8", -", c #E7D1A8", -"' c #E6CDA8", -") c #E6CFA8", -"! c #E7D0A8", -"~ c #E8D2A8", -"{ c #E6CEA8", -"] c #E4CCA8", -"^ c #E3CAA8", -"/ c #E2C7A8", -"( c #E1C6A8", -"_ c #E1C5A8", -": c #E4CBA8", -"< c #EBD7A8", -"[ c #EFDFA8", -"} c #473600", -"| c #ECDBA8", -"1 c #E7D083", -"2 c #EBD783", -"3 c #EDD983", -"4 c #EEDC83", -"5 c #F0DF83", -"6 c #F1E283", -"7 c #EDDA83", -"8 c #EBD683", -"9 c #E5CC83", -"0 c #E4C983", -"a c #E2C683", -"b c #E0C183", -"c c #DDBD83", -"d c #DEBE83", -"e c #E0C283", -"f c #DFBF83", -"g c #DCBC83", -"h c #D9B683", -"i c #D7B283", -"j c #D5AF83", -"k c #D6AF83", -"l c #D7B383", -"m c #654D00", -"n c #463400", -"o c #E9D283", -"p c #E4C84D", -"q c #E8CD4D", -"r c #EAD24D", -"s c #EDD84D", -"t c #F1DF4D", -"u c #F0DC4D", -"v c #EBD34D", -"w c #DFBE4D", -"x c #DAB64D", -"y c #D9B44D", -"z c #D8B24D", -"A c #D4AC4D", -"B c #D1A44D", -"C c #CFA14D", -"D c #D1A54D", -"E c #D2A64D", -"F c #CA984D", -"G c #C6924D", -"H c #C6904D", -"I c #C48F4D", -"J c #C6914D", -"K c #C9964D", -"L c #D7AF4D", -"M c #8D6900", -"N c #634B00", -"O c #EBD583", -"P c #E5CA4D", -"Q c #E2C000", -"R c #E4C400", -"S c #EBD100", -"T c #EFD800", -"U c #EDD400", -"V c #E6C800", -"W c #DCB600", -"X c #D4A800", -"Y c #CB9700", -"Z c #C48B00", -"` c #C38800", -" . c #C28700", -".. c #BC7C00", -"+. c #B87500", -"@. c #B97700", -"#. c #B77300", -"$. c #B46E00", -"%. c #AF6300", -"&. c #AB5E00", -"*. c #AD6000", -"=. c #AA5B00", -"-. c #A95A00", -";. c #AC5E00", -">. c #B36C00", -",. c #BB7900", -"'. c #C08400", -"). c #8A6400", -"!. c #634900", -"~. c #ECD883", -"{. c #E8CE4D", -"]. c #E3C300", -"^. c #E8CC00", -"/. c #F1DD00", -"(. c #EDD500", -"_. c #E5C600", -":. c #D4A700", -"<. c #CA9500", -"[. c #C08200", -"}. c #BD7E00", -"|. c #BC7B00", -"1. c #B67200", -"2. c #B36B00", -"3. c #B26A00", -"4. c #B06600", -"5. c #AB5F00", -"6. c #A65500", -"7. c #A45000", -"8. c #A65400", -"9. c #B06500", -"0. c #B57000", -"a. c #BA7800", -"b. c #886000", -"c. c #624800", -"d. c #E9D14D", -"e. c #E4C500", -"f. c #EBD200", -"g. c #F1DC00", -"h. c #F0DB00", -"i. c #ECD400", -"j. c #E2C200", -"k. c #D6AC00", -"l. c #C48A00", -"m. c #BF8200", -"n. c #B77400", -"o. c #B36A00", -"p. c #AF6500", -"q. c #AD6100", -"r. c #AC5F00", -"s. c #AF6400", -"t. c #AB5C00", -"u. c #A14A00", -"v. c #A04900", -"w. c #A45100", -"x. c #AD5F00", -"y. c #B56F00", -"z. c #835500", -"A. c #5E4000", -"B. c #432F00", -"C. c #F4E7A8", -"D. c #F0E083", -"E. c #EAD34D", -"F. c #E5C700", -"G. c #ECD300", -"H. c #EFD900", -"I. c #DAB300", -"J. c #CD9C00", -"K. c #BE8000", -"L. c #A95800", -"M. c #A85800", -"N. c #A75500", -"O. c #AA5C00", -"P. c #A75600", -"Q. c #A24C00", -"R. c #A55200", -"S. c #AB5D00", -"T. c #B06700", -"U. c #7E4D00", -"V. c #593800", -"W. c #3F2800", -"X. c #F5E8A8", -"Y. c #EBD74D", -"Z. c #E9CF00", -"`. c #E0BD00", -" + c #D7AE00", -".+ c #CE9D00", -"++ c #C89200", -"@+ c #C58C00", -"#+ c #BF8100", -"$+ c #A24D00", -"%+ c #A85700", -"&+ c #A95900", -"*+ c #B26900", -"=+ c #7D4B00", -"-+ c #583500", -";+ c #3D2600", -">+ c #F3E6A8", -",+ c #EED94D", -"'+ c #E9CE00", -")+ c #E5C500", -"!+ c #DBB500", -"~+ c #D1A100", -"{+ c #C79000", -"]+ c #C18400", -"^+ c #C08300", -"/+ c #B97500", -"(+ c #A04800", -"_+ c #9D4300", -":+ c #9F4700", -"<+ c #A34F00", -"[+ c #A65300", -"}+ c #A44F00", -"|+ c #AC6000", -"1+ c #AE6200", -"2+ c #B16700", -"3+ c #7C4A00", -"4+ c #583600", -"5+ c #3D2500", -"6+ c #EFDC4D", -"7+ c #D8AF00", -"8+ c #CF9F00", -"9+ c #C58D00", -"0+ c #BA7900", -"a+ c #B67100", -"b+ c #9C4100", -"c+ c #9C4200", -"d+ c #9E4500", -"e+ c #A14B00", -"f+ c #9F4800", -"g+ c #AE6400", -"h+ c #B46C00", -"i+ c #7D4C00", -"j+ c #F2E283", -"k+ c #E5C800", -"l+ c #E7CA00", -"m+ c #DEB900", -"n+ c #D6AA00", -"o+ c #D1A200", -"p+ c #C79100", -"q+ c #BB7C00", -"r+ c #B46F00", -"s+ c #B16900", -"t+ c #A34D00", -"u+ c #A04700", -"v+ c #9B4000", -"w+ c #9F4500", -"x+ c #9E4400", -"y+ c #A24E00", -"z+ c #7F5000", -"A+ c #5A3900", -"B+ c #3E2800", -"C+ c #F2E5A8", -"D+ c #EFDD83", -"E+ c #E7CD4D", -"F+ c #DDB800", -"G+ c #DBB400", -"H+ c #D2A300", -"I+ c #C99400", -"J+ c #9E4600", -"K+ c #9B4100", -"L+ c #993C00", -"M+ c #9F4600", -"N+ c #9A3F00", -"O+ c #5B3C00", -"P+ c #412D00", -"Q+ c #F0E1A8", -"R+ c #EAD483", -"S+ c #DDBC4D", -"T+ c #CF9E00", -"U+ c #D5AB00", -"V+ c #CE9C00", -"W+ c #C99200", -"X+ c #C28600", -"Y+ c #B97600", -"Z+ c #9B3F00", -"`+ c #B16800", -" @ c #805100", -".@ c #5D3F00", -"+@ c #443100", -"@@ c #8C6500", -"#@ c #8A6300", -"$@ c #917000", -"%@ c #927200", -"&@ c #906E00", -"*@ c #906F00", -"=@ c #8E6900", -"-@ c #885E00", -";@ c #825400", -">@ c #7B4800", -",@ c #753B00", -"'@ c #713400", -")@ c #6F3200", -"!@ c #703400", -"~@ c #713600", -"{@ c #703300", -"]@ c #6F3100", -"^@ c #723600", -"/@ c #753E00", -"(@ c #784200", -"_@ c #794500", -":@ c #835700", -"<@ c #5F4200", -"[@ c #443200", -"}@ c #604400", -"|@ c #5F4300", -"1@ c #624900", -"2@ c #634A00", -"3@ c #654C00", -"4@ c #5B3D00", -"5@ c #573400", -"6@ c #532D00", -"7@ c #512800", -"8@ c #4E2400", -"9@ c #502700", -"0@ c #502800", -"a@ c #502600", -"b@ c #522A00", -"c@ c #542F00", -"d@ c #553100", -"e@ c #573300", -"f@ c #593900", -"g@ c #5B3B00", -"h@ c #5C3D00", -"i@ c #5E4200", -"j@ c #604500", -"k@ c #433100", -"l@ c #422D00", -"m@ c #422F00", -"n@ c #3E2700", -"o@ c #3D2400", -"p@ c #3B2300", -"q@ c #391F00", -"r@ c #391D00", -"s@ c #391E00", -"t@ c #381C00", -"u@ c #381B00", -"v@ c #402B00", -"w@ c #453400", -" . + @ # $ % & + * = - ; > , ' ) ! ~ ! { ] ^ / ( _ : ~ < = [ } ", -"| 1 2 3 4 5 6 5 7 8 1 9 0 a b c d e e f g h i j k k l g 0 1 m n ", -"* o p q r s t u v p w x y z A B C D E C F G H I I J K C L M N } ", -"@ O P Q R S T U V W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.} ", -"% ~.{.].^.T /.(._.W :.<.[.}.|.1.2.2.$.3.4.5.=.6.7.8.9.0.a.b.c.n ", -"$ 4 d.e.f.g.h.i.j.k.Y l.m.n.o.p.q.r.s.4.&.t.6.u.v.w.x.>.y.z.A.B.", -"C.D.E.F.G.H.f.e.I.J.l.m.K.>.L.M.N.w.O.&.8.P.P.Q.v.R.S.T.2.U.V.W.", -"X.6 Y.V Z.^.`. +.+++@+#+K.2.R.Q.Q.$+M.M.$+7.%+P.N.M.&+*.*+=+-+;+", -">+6 ,+'+Z.)+!+~+{+]+^+}./+*+P.(+_+:+<+[+Q.}+-.|+*.1+3.3.2+3+4+5+", -"$ 6 6+S '+Q 7+8+9+0+0.a+>.1+%+u.b+c+d+e+f+Q.M.g+2+h+@.+.2.i+V.;+", -">+j+s k+l+m+n+o+p+q+r+s+*.6.t+u+c+v+_+w+x+_+y+1+*+>.h+2.*+z+A+B+", -"C+D+E+I.F+G+ +H+I+m.1.4.8.v.u+J+K+L+_+M+N+L+M+L.9.s.1+s.2+z+O+P+", -"Q+R+S+T+U+ +X V+W+X+Y+4.[+:+J+u.:+N+_+_+Z+d+$+N.S.S.g+2+`+ @.@+@", -"* 1 @@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@)@!@^@/@(@_@>@=+z+z+:@<@[@", -"| c.}@|@1@2@2@3@c.4@V.5@6@7@8@9@0@a@8@8@b@c@d@e@5@f@g@g@h@i@j@k@", -"l@m@B.B.B.[@[@[@P+n@;+o@p@q@r@s@s@t@u@t@s@o@n@n@B+v@l@B.B.[@w@[@"}; +/* XPM */ +static const char * qt_logo_xpm[] = { +"69 80 364 2", +" c None", +". c #0C481E", +"+ c #135020", +"@ c #3F832C", +"# c #4D932F", +"$ c #509730", +"% c #559C31", +"& c #5AA233", +"* c #569E32", +"= c #4D942F", +"- c #468B2E", +"; c #41852C", +"> c #0E4B1F", +", c #347629", +"' c #60A934", +") c #66B036", +"! c #63AC35", +"~ c #579F32", +"{ c #4E9430", +"] c #478C2E", +"^ c #41862C", +"/ c #124F20", +"( c #59A133", +"_ c #64AD35", +": c #58A032", +"< c #4F9530", +"[ c #488D2E", +"} c #42862C", +"| c #4A8F2E", +"1 c #64AE36", +"2 c #509630", +"3 c #488E2E", +"4 c #42872C", +"5 c #317328", +"6 c #65AF36", +"7 c #5AA333", +"8 c #498E2E", +"9 c #43872D", +"0 c #175521", +"a c #63AD35", +"b c #5BA333", +"c c #519830", +"d c #498F2E", +"e c #43882D", +"f c #2E6F27", +"g c #5CA533", +"h c #529931", +"i c #4A902F", +"j c #44882D", +"k c #40842C", +"l c #5DA634", +"m c #539A31", +"n c #4B902F", +"o c #44892D", +"p c #5FA734", +"q c #549B31", +"r c #0D491E", +"s c #589E37", +"t c #70B04C", +"u c #83BE5D", +"v c #7CBB53", +"w c #6DB43F", +"x c #63AD36", +"y c #286926", +"z c #26622B", +"A c #699665", +"B c #D0E0CF", +"C c #FFFFFF", +"D c #FEFEFD", +"E c #E5F2DD", +"F c #C4E1B2", +"G c #9DCD7F", +"H c #69B23A", +"I c #185722", +"J c #114E20", +"K c #7FA67A", +"L c #EEF6E8", +"M c #A7D18B", +"N c #6BB23C", +"O c #3A7D2B", +"P c #0D481E", +"Q c #1E5A26", +"R c #D4E2D1", +"S c #E0EFD6", +"T c #76B84A", +"U c #63AB35", +"V c #397C2A", +"W c #8DBE74", +"X c #9ECD80", +"Y c #8EC56B", +"Z c #7DBC55", +"` c #6DB33F", +" . c #3F842C", +".. c #175323", +"+. c #D2E1D0", +"@. c #EFF7EA", +"#. c #83BF5D", +"$. c #0D491F", +"%. c #EAF1E9", +"&. c #CBE4BA", +"*. c #B9D1B6", +"=. c #EFF7EB", +"-. c #72B646", +";. c #235F2A", +">. c #65B036", +",. c #1C5A22", +"'. c #487E48", +"). c #F8FAF9", +"!. c #ADC6AB", +"~. c #B7CFB4", +"{. c #D3E8C5", +"]. c #67B037", +"^. c #246324", +"/. c #4F844E", +"(. c #104D20", +"_. c #DBE8D9", +":. c #CCE5BC", +"<. c #7BBB52", +"[. c #114E1F", +"}. c #2A662F", +"|. c #A2C09D", +"1. c #A1CE83", +"2. c #64AE35", +"3. c #0F4D1F", +"4. c #8DB289", +"5. c #65AF35", +"6. c #165321", +"7. c #588A56", +"8. c #E6F2DE", +"9. c #6CB33E", +"0. c #0C491E", +"a. c #104B1F", +"b. c #CCDDC8", +"c. c #E8F3E0", +"d. c #539B31", +"e. c #DCE8DB", +"f. c #BCD3B8", +"g. c #81BE59", +"h. c #2C6D26", +"i. c #2E6932", +"j. c #95C873", +"k. c #3E832B", +"l. c #1C5926", +"m. c #347529", +"n. c #1B5825", +"o. c #EBF4E4", +"p. c #98B993", +"q. c #D4E9C7", +"r. c #296A26", +"s. c #457B44", +"t. c #558853", +"u. c #C9E3B8", +"v. c #155220", +"w. c #568A54", +"x. c #FAFDF9", +"y. c #2D6A2D", +"z. c #0F4B1E", +"A. c #53864F", +"B. c #D9E6D7", +"C. c #BCD2B9", +"D. c #D5E3D2", +"E. c #DAECCF", +"F. c #8DC469", +"G. c #82BF5B", +"H. c #77B94D", +"I. c #589F33", +"J. c #A6C3A1", +"K. c #A7D28C", +"L. c #276826", +"M. c #2D6831", +"N. c #659363", +"O. c #51854F", +"P. c #C5E1B3", +"Q. c #E3EBE0", +"R. c #86C161", +"S. c #FDFEFD", +"T. c #A8C5A1", +"U. c #C6E2B4", +"V. c #145122", +"W. c #FEFFFE", +"X. c #6AB23B", +"Y. c #C5D8C1", +"Z. c #CFE2C8", +"`. c #2C6C27", +" + c #2B6530", +".+ c #F8FBF6", +"++ c #5BA334", +"@+ c #91B48C", +"#+ c #E2EFDA", +"$+ c #1D5B22", +"%+ c #497F49", +"&+ c #F1F8ED", +"*+ c #82AA7F", +"=+ c #F1F8EC", +"-+ c #458536", +";+ c #2F6A33", +">+ c #417841", +",+ c #E7F0E2", +"'+ c #BDD8B3", +")+ c #C3DAB9", +"!+ c #CBDFC4", +"~+ c #DBE9D3", +"{+ c #B7D9A1", +"]+ c #649360", +"^+ c #EAF4E3", +"/+ c #78A274", +"(+ c #478C2D", +"_+ c #6F9C6C", +":+ c #E3F1DB", +"<+ c #0E4A1E", +"[+ c #6D9B69", +"}+ c #7DA578", +"|+ c #DCEDD1", +"1+ c #639260", +"2+ c #7FBD57", +"3+ c #61AA35", +"4+ c #88AE84", +"5+ c #D5E9C8", +"6+ c #598B57", +"7+ c #8CC468", +"8+ c #97B792", +"9+ c #CEE6BF", +"0+ c #1A5821", +"a+ c #9ACB7A", +"b+ c #5AA132", +"c+ c #C8E2B6", +"d+ c #1E5D23", +"e+ c #477D46", +"f+ c #5FA834", +"g+ c #90B38B", +"h+ c #1E5C22", +"i+ c #487D47", +"j+ c #A9D28D", +"k+ c #7AA476", +"l+ c #D1E7C3", +"m+ c #51844E", +"n+ c #9ECD7F", +"o+ c #679563", +"p+ c #D7EBCB", +"q+ c #175421", +"r+ c #93C771", +"s+ c #185621", +"t+ c #558752", +"u+ c #DEEED4", +"v+ c #61915E", +"w+ c #88C263", +"x+ c #1F5E24", +"y+ c #437B44", +"z+ c #E5F1DC", +"A+ c #0F4C1F", +"B+ c #6A9867", +"C+ c #276625", +"D+ c #356E38", +"E+ c #749F70", +"F+ c #73B747", +"G+ c #2D6E27", +"H+ c #28642E", +"I+ c #62AB34", +"J+ c #68B139", +"K+ c #1D5A26", +"L+ c #5EA734", +"M+ c #F7FBF4", +"N+ c #145021", +"O+ c #9EBD99", +"P+ c #E7EFE5", +"Q+ c #91C66F", +"R+ c #DEE9DC", +"S+ c #C2DFAF", +"T+ c #B0D698", +"U+ c #357829", +"V+ c #195524", +"W+ c #99CA79", +"X+ c #578955", +"Y+ c #D0E7C1", +"Z+ c #37703A", +"`+ c #71B645", +" @ c #D1E7C2", +".@ c #E0EFD7", +"+@ c #478D2E", +"@@ c #EBF5E5", +"#@ c #4B902E", +"$@ c #80BE59", +"%@ c #579E32", +"&@ c #ADC7A8", +"*@ c #B8DAA1", +"=@ c #F9FBF8", +"-@ c #6EB440", +";@ c #155321", +">@ c #D6EAC9", +",@ c #3D743E", +"'@ c #C1DFB1", +")@ c #538E44", +"!@ c #437B42", +"~@ c #CCDEC7", +"{@ c #377A2A", +"]@ c #195623", +"^@ c #FCFDFB", +"/@ c #94C873", +"(@ c #4B922F", +"_@ c #67B138", +":@ c #62AB35", +"<@ c #FBFDF9", +"[@ c #5EA634", +"}@ c #7EA77A", +"|@ c #F0F7EB", +"1@ c #8FC56D", +"2@ c #3C7E2A", +"3@ c #427941", +"4@ c #97C977", +"5@ c #6A9866", +"6@ c #E7EEE5", +"7@ c #E4ECE2", +"8@ c #D9EBCD", +"9@ c #EBF2EB", +"0@ c #66AF36", +"a@ c #236324", +"b@ c #387139", +"c@ c #BADBA4", +"d@ c #1F5E23", +"e@ c #4A8049", +"f@ c #F2F8EE", +"g@ c #83BF5C", +"h@ c #2F6C31", +"i@ c #C7DAC3", +"j@ c #EDF6E7", +"k@ c #9DCC7E", +"l@ c #74B749", +"m@ c #F2F7F2", +"n@ c #E1F0D8", +"o@ c #78B94E", +"p@ c #AAC5A6", +"q@ c #A5D189", +"r@ c #6AB23C", +"s@ c #62AD35", +"t@ c #266725", +"u@ c #FDFEFC", +"v@ c #6C9A68", +"w@ c #29642E", +"x@ c #CEE6BE", +"y@ c #62AC35", +"z@ c #AFD595", +"A@ c #77A172", +"B@ c #D5E8CD", +"C@ c #B6D9A1", +"D@ c #25602B", +"E@ c #FAFCFA", +"F@ c #185521", +"G@ c #5B8C59", +"H@ c #A2C19E", +"I@ c #155221", +"J@ c #8CB284", +"K@ c #3D812B", +"L@ c #417F37", +"M@ c #679A5C", +"N@ c #97BF8A", +"O@ c #C8E1B7", +"P@ c #BBDCA5", +"Q@ c #89C264", +"R@ c #45892D", +"S@ c #5BA433", +"T@ c #519831", +"U@ c #5CA433", +"V@ c #5DA534", +"W@ c #4B912F", +" . . + @ # $ % & * = - ; ", +" . . . . > , ' ) ) ) ) ) ) ) ) ) ) ! ~ { ] ^ ", +" . . . . / ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) _ : < [ } ", +" . . . . . | ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 ( 2 3 4 ", +" . . . . . 5 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 7 $ 8 9 ", +" . . . . 0 a ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 b c d e ", +" . . . . . f ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) g h i j ", +" . . . . . k ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) l m n o ", +" . . . . . h ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) p q ", +" . . . . r ! ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' * s t u v w ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) x 3 y z A B C C C C D E F G H ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) c I J K C C C C C C C C C C C L M N ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) O P Q R C C C C C C C C C C C C C C S T ) ) ) ) ) ) ) ) U V V W X Y Z ` ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) .. ..+.C C C C C C C C C C C C C C C C @.#.) ) ) ) ) ) ) { . $.%.C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) # P $.*.C C C C C C C C C C C C C C C C C C =.-.) ) ) ) ) ) V . ;.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) >.,.. '.C C C C C C C C C ).!.~.C C C C C C C C {.].) ) ) ) ) ^.. /.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) e . (._.C C C C C C C C :.<.e [.}.|.C C C C C C C 1.) ) ) ) 2.3.. 4.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) 5.6.. 7.C C C C C C C C 8.9.) ) h 0.a.b.C C C C C C c.].) ) ) d.. . e.C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) $ . . f.C C C C C C C C g.) ) ) ) h.. i.C C C C C C C j.) ) ) k.. l.C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) m.. n.C C C C C C C C o.) ) ) ) ) 7 . . p.C C C C C C q.) ) ) r.. s.C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) 0 . t.C C C C C C C C u.) ) ) ) ) ) v.. w.C C C C C C x.y.z.A.B.C.D.C C C C C E.F.G.H.` ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) I.. . J.C C C C C C C C K.) ) ) ) ) ) L.. M.C C C C C C C N.. O.C C C C C C C C C C C C C P.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) 3 . . Q.C C C C C C C C R.) ) ) ) ) ) O . J S.C C C C C C T.. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) O . V.C C C C C C C C W.X.) ) ) ) ) ) # . . Y.C C C C C C Z.. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) `.. +C C C C C C C C .+) ) ) ) ) ) ) ++. . @+C C C C C C #+. O.C C C C C C C C C C C C C U.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) $+. %+C C C C C C C C &+) ) ) ) ) ) ) ' . . *+C C C C C C =+{ -+;+>+C C C C C C ,+'+)+!+~+{+) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) + . ]+C C C C C C C C ^+) ) ) ) ) ) ) 1 . . /+C C C C C C S.].(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) z.. _+C C C C C C C C :+) ) ) ) ) ) ) ) <+. [+C C C C C C C -.(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) 2.. . }+C C C C C C C C |+) ) ) ) ) ) ) ) [.. 1+C C C C C C C 2+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) 3+. . 4+C C C C C C C C 5+) ) ) ) ) ) ) ) 6.. 6+C C C C C C C 7+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) g . . 8+C C C C C C C C 9+) ) ) ) ) ) ) ) 0+. /.C C C C C C C a+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) b+. . |.C C C C C C C C c+) ) ) ) ) ) ) ) d+. e+C C C C C C C M (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) f+. . g+C C C C C C C C &.) ) ) ) ) ) ) ) h+. i+C C C C C C C j+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) 5.0.. k+C C C C C C C C l+) ) ) ) ) ) ) ) 0+. m+C C C C C C C n+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) [.. o+C C C C C C C C p+) ) ) ) ) ) ) ) q+. 7.C C C C C C C r+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) s+. t+C C C C C C C C u+) ) ) ) ) ) ) ) / . v+C C C C C C C w+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) x+. y+C C C C C C C C z+) ) ) ) ) ) ) ) A+. B+C C C C C C C Z (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) C+. D+C C C C C C C C o.) ) ) ) ) ) ) >.. . E+C C C C C C C F+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) G+. H+C C C C C C C C &+) ) ) ) ) ) ) I+. . K C C C C C C C J+(+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) m.. K+C C C C C C C C .+) ) ) ) ) ) ) L+. . 4+C C C C C C M+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) O . N+C C C C C C C C C F+) ) ) ) ) ) : . . O+C C C C C C c.) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) (+. 0.P+C C C C C C C C Q+) ) ) ) ) ) (+. . R+C C C C C C S+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) g . . p.C C C C C C C C T+) ) ) ) ) ) U+. V+C C C C C C C W+) (+. / C C C C C C &.) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) 0 . X+C C C C C C C C Y+) ) ) ) ) ) ^.. Z+C C C C C C D `+) (+. / C C C C C C @) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) G+. H+C C C C C C C C @.) ) ) ) ) ) / . ]+C C C C C C .@) ) +@. / C C C C C C @@) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) #@. $.D.C C C C C C C C $@) ) ) ) %@. . &@C C C C C C *@) ) = . $.=@C C C C C W.-@) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) 5.;@. v+C C C C C C C C >@) ) ) ) L.. ,@C C C C C C C Y ) ) ~ . . R C C C C C C '@)@!@/+~@) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) {@. ]@^@C C C C C C C C /@) ) (@. / _.C C C C C C 8._@) ) :@. . &@C C C C C C C C C C <@) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) [@[.. }@C C C C C C C C |@1@2@(.3@*.C C C C C C C 4@) ) ) ) ,.. 5@C C C C C C C C C C x.) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) } . / e.C C C C C C C C C 6@7@C C C C C C C C 8@) ) ) ) ) 8 . N+9@C C C C C C C C C <@) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) 0@a@. b@S.C C C C C C C C C C C C C C C C C L F+) ) ) ) ) 0@y . '.=@C C C C C C C z+c@) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) 3+d@. e@C C C C C C C C C C C C C C C C f@g@) ) ) ) ) ) ) ) j ^.h@g+i@=@j@P.k@l@) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) 3+a@. %+m@C C C C C C C C C C C C C n@o@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0@9 [.K+p@C C C C C C C C C C o.q@r@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) s@[ t@;.A P+C C C C C C u@-@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 1 [.. v@C C C C C C C r+) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) `.. w@C C C C C C C x@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) y@ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) [ . P _.C C C C C C C z@F+) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ~ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) :@z.. A@C C C C C C C C D B@C@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) < ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) f . D@E@C C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) - ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3+F@. G@C C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) y@ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) m <+P H@C C C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) n ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) # $+I@J@^@C C C C C C 8@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 0@= K@L@M@N@O@U.P@M Q@) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 3+ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) L+ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 ~ o ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 b c i R@ ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 6 S@T@i o ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) U@h i o ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) g h i o ", +" . . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) V@h i o ", +" . . . / ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) V@m n o ", +" . . / ) ) ) ) ) ) ) ) ) ) ) ) l m n o ", +" . / ) ) ) ) ) ) L+m W@o ", +" v.L+m W@R@ "}; + +/* XPM */ +static const char * brick_xpm[] = { +"32 16 338 2", +" c #ECDAA8", +". c #EEDDA8", +"+ c #F0E0A8", +"@ c #F0E2A8", +"# c #F2E3A8", +"$ c #F2E4A8", +"% c #F1E3A8", +"& c #F1E2A8", +"* c #EEDEA8", +"= c #EEDBA8", +"- c #EBD9A8", +"; c #EAD6A8", +"> c #E9D4A8", +", c #E7D1A8", +"' c #E6CDA8", +") c #E6CFA8", +"! c #E7D0A8", +"~ c #E8D2A8", +"{ c #E6CEA8", +"] c #E4CCA8", +"^ c #E3CAA8", +"/ c #E2C7A8", +"( c #E1C6A8", +"_ c #E1C5A8", +": c #E4CBA8", +"< c #EBD7A8", +"[ c #EFDFA8", +"} c #473600", +"| c #ECDBA8", +"1 c #E7D083", +"2 c #EBD783", +"3 c #EDD983", +"4 c #EEDC83", +"5 c #F0DF83", +"6 c #F1E283", +"7 c #EDDA83", +"8 c #EBD683", +"9 c #E5CC83", +"0 c #E4C983", +"a c #E2C683", +"b c #E0C183", +"c c #DDBD83", +"d c #DEBE83", +"e c #E0C283", +"f c #DFBF83", +"g c #DCBC83", +"h c #D9B683", +"i c #D7B283", +"j c #D5AF83", +"k c #D6AF83", +"l c #D7B383", +"m c #654D00", +"n c #463400", +"o c #E9D283", +"p c #E4C84D", +"q c #E8CD4D", +"r c #EAD24D", +"s c #EDD84D", +"t c #F1DF4D", +"u c #F0DC4D", +"v c #EBD34D", +"w c #DFBE4D", +"x c #DAB64D", +"y c #D9B44D", +"z c #D8B24D", +"A c #D4AC4D", +"B c #D1A44D", +"C c #CFA14D", +"D c #D1A54D", +"E c #D2A64D", +"F c #CA984D", +"G c #C6924D", +"H c #C6904D", +"I c #C48F4D", +"J c #C6914D", +"K c #C9964D", +"L c #D7AF4D", +"M c #8D6900", +"N c #634B00", +"O c #EBD583", +"P c #E5CA4D", +"Q c #E2C000", +"R c #E4C400", +"S c #EBD100", +"T c #EFD800", +"U c #EDD400", +"V c #E6C800", +"W c #DCB600", +"X c #D4A800", +"Y c #CB9700", +"Z c #C48B00", +"` c #C38800", +" . c #C28700", +".. c #BC7C00", +"+. c #B87500", +"@. c #B97700", +"#. c #B77300", +"$. c #B46E00", +"%. c #AF6300", +"&. c #AB5E00", +"*. c #AD6000", +"=. c #AA5B00", +"-. c #A95A00", +";. c #AC5E00", +">. c #B36C00", +",. c #BB7900", +"'. c #C08400", +"). c #8A6400", +"!. c #634900", +"~. c #ECD883", +"{. c #E8CE4D", +"]. c #E3C300", +"^. c #E8CC00", +"/. c #F1DD00", +"(. c #EDD500", +"_. c #E5C600", +":. c #D4A700", +"<. c #CA9500", +"[. c #C08200", +"}. c #BD7E00", +"|. c #BC7B00", +"1. c #B67200", +"2. c #B36B00", +"3. c #B26A00", +"4. c #B06600", +"5. c #AB5F00", +"6. c #A65500", +"7. c #A45000", +"8. c #A65400", +"9. c #B06500", +"0. c #B57000", +"a. c #BA7800", +"b. c #886000", +"c. c #624800", +"d. c #E9D14D", +"e. c #E4C500", +"f. c #EBD200", +"g. c #F1DC00", +"h. c #F0DB00", +"i. c #ECD400", +"j. c #E2C200", +"k. c #D6AC00", +"l. c #C48A00", +"m. c #BF8200", +"n. c #B77400", +"o. c #B36A00", +"p. c #AF6500", +"q. c #AD6100", +"r. c #AC5F00", +"s. c #AF6400", +"t. c #AB5C00", +"u. c #A14A00", +"v. c #A04900", +"w. c #A45100", +"x. c #AD5F00", +"y. c #B56F00", +"z. c #835500", +"A. c #5E4000", +"B. c #432F00", +"C. c #F4E7A8", +"D. c #F0E083", +"E. c #EAD34D", +"F. c #E5C700", +"G. c #ECD300", +"H. c #EFD900", +"I. c #DAB300", +"J. c #CD9C00", +"K. c #BE8000", +"L. c #A95800", +"M. c #A85800", +"N. c #A75500", +"O. c #AA5C00", +"P. c #A75600", +"Q. c #A24C00", +"R. c #A55200", +"S. c #AB5D00", +"T. c #B06700", +"U. c #7E4D00", +"V. c #593800", +"W. c #3F2800", +"X. c #F5E8A8", +"Y. c #EBD74D", +"Z. c #E9CF00", +"`. c #E0BD00", +" + c #D7AE00", +".+ c #CE9D00", +"++ c #C89200", +"@+ c #C58C00", +"#+ c #BF8100", +"$+ c #A24D00", +"%+ c #A85700", +"&+ c #A95900", +"*+ c #B26900", +"=+ c #7D4B00", +"-+ c #583500", +";+ c #3D2600", +">+ c #F3E6A8", +",+ c #EED94D", +"'+ c #E9CE00", +")+ c #E5C500", +"!+ c #DBB500", +"~+ c #D1A100", +"{+ c #C79000", +"]+ c #C18400", +"^+ c #C08300", +"/+ c #B97500", +"(+ c #A04800", +"_+ c #9D4300", +":+ c #9F4700", +"<+ c #A34F00", +"[+ c #A65300", +"}+ c #A44F00", +"|+ c #AC6000", +"1+ c #AE6200", +"2+ c #B16700", +"3+ c #7C4A00", +"4+ c #583600", +"5+ c #3D2500", +"6+ c #EFDC4D", +"7+ c #D8AF00", +"8+ c #CF9F00", +"9+ c #C58D00", +"0+ c #BA7900", +"a+ c #B67100", +"b+ c #9C4100", +"c+ c #9C4200", +"d+ c #9E4500", +"e+ c #A14B00", +"f+ c #9F4800", +"g+ c #AE6400", +"h+ c #B46C00", +"i+ c #7D4C00", +"j+ c #F2E283", +"k+ c #E5C800", +"l+ c #E7CA00", +"m+ c #DEB900", +"n+ c #D6AA00", +"o+ c #D1A200", +"p+ c #C79100", +"q+ c #BB7C00", +"r+ c #B46F00", +"s+ c #B16900", +"t+ c #A34D00", +"u+ c #A04700", +"v+ c #9B4000", +"w+ c #9F4500", +"x+ c #9E4400", +"y+ c #A24E00", +"z+ c #7F5000", +"A+ c #5A3900", +"B+ c #3E2800", +"C+ c #F2E5A8", +"D+ c #EFDD83", +"E+ c #E7CD4D", +"F+ c #DDB800", +"G+ c #DBB400", +"H+ c #D2A300", +"I+ c #C99400", +"J+ c #9E4600", +"K+ c #9B4100", +"L+ c #993C00", +"M+ c #9F4600", +"N+ c #9A3F00", +"O+ c #5B3C00", +"P+ c #412D00", +"Q+ c #F0E1A8", +"R+ c #EAD483", +"S+ c #DDBC4D", +"T+ c #CF9E00", +"U+ c #D5AB00", +"V+ c #CE9C00", +"W+ c #C99200", +"X+ c #C28600", +"Y+ c #B97600", +"Z+ c #9B3F00", +"`+ c #B16800", +" @ c #805100", +".@ c #5D3F00", +"+@ c #443100", +"@@ c #8C6500", +"#@ c #8A6300", +"$@ c #917000", +"%@ c #927200", +"&@ c #906E00", +"*@ c #906F00", +"=@ c #8E6900", +"-@ c #885E00", +";@ c #825400", +">@ c #7B4800", +",@ c #753B00", +"'@ c #713400", +")@ c #6F3200", +"!@ c #703400", +"~@ c #713600", +"{@ c #703300", +"]@ c #6F3100", +"^@ c #723600", +"/@ c #753E00", +"(@ c #784200", +"_@ c #794500", +":@ c #835700", +"<@ c #5F4200", +"[@ c #443200", +"}@ c #604400", +"|@ c #5F4300", +"1@ c #624900", +"2@ c #634A00", +"3@ c #654C00", +"4@ c #5B3D00", +"5@ c #573400", +"6@ c #532D00", +"7@ c #512800", +"8@ c #4E2400", +"9@ c #502700", +"0@ c #502800", +"a@ c #502600", +"b@ c #522A00", +"c@ c #542F00", +"d@ c #553100", +"e@ c #573300", +"f@ c #593900", +"g@ c #5B3B00", +"h@ c #5C3D00", +"i@ c #5E4200", +"j@ c #604500", +"k@ c #433100", +"l@ c #422D00", +"m@ c #422F00", +"n@ c #3E2700", +"o@ c #3D2400", +"p@ c #3B2300", +"q@ c #391F00", +"r@ c #391D00", +"s@ c #391E00", +"t@ c #381C00", +"u@ c #381B00", +"v@ c #402B00", +"w@ c #453400", +" . + @ # $ % & + * = - ; > , ' ) ! ~ ! { ] ^ / ( _ : ~ < = [ } ", +"| 1 2 3 4 5 6 5 7 8 1 9 0 a b c d e e f g h i j k k l g 0 1 m n ", +"* o p q r s t u v p w x y z A B C D E C F G H I I J K C L M N } ", +"@ O P Q R S T U V W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.} ", +"% ~.{.].^.T /.(._.W :.<.[.}.|.1.2.2.$.3.4.5.=.6.7.8.9.0.a.b.c.n ", +"$ 4 d.e.f.g.h.i.j.k.Y l.m.n.o.p.q.r.s.4.&.t.6.u.v.w.x.>.y.z.A.B.", +"C.D.E.F.G.H.f.e.I.J.l.m.K.>.L.M.N.w.O.&.8.P.P.Q.v.R.S.T.2.U.V.W.", +"X.6 Y.V Z.^.`. +.+++@+#+K.2.R.Q.Q.$+M.M.$+7.%+P.N.M.&+*.*+=+-+;+", +">+6 ,+'+Z.)+!+~+{+]+^+}./+*+P.(+_+:+<+[+Q.}+-.|+*.1+3.3.2+3+4+5+", +"$ 6 6+S '+Q 7+8+9+0+0.a+>.1+%+u.b+c+d+e+f+Q.M.g+2+h+@.+.2.i+V.;+", +">+j+s k+l+m+n+o+p+q+r+s+*.6.t+u+c+v+_+w+x+_+y+1+*+>.h+2.*+z+A+B+", +"C+D+E+I.F+G+ +H+I+m.1.4.8.v.u+J+K+L+_+M+N+L+M+L.9.s.1+s.2+z+O+P+", +"Q+R+S+T+U+ +X V+W+X+Y+4.[+:+J+u.:+N+_+_+Z+d+$+N.S.S.g+2+`+ @.@+@", +"* 1 @@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@)@!@^@/@(@_@>@=+z+z+:@<@[@", +"| c.}@|@1@2@2@3@c.4@V.5@6@7@8@9@0@a@8@8@b@c@d@e@5@f@g@g@h@i@j@k@", +"l@m@B.B.B.[@[@[@P+n@;+o@p@q@r@s@s@t@u@t@s@o@n@n@B+v@l@B.B.[@w@[@"}; diff --git a/test/jkqtplot_test/QTeXEngine/example/renderarea.cpp b/examples/jkqtplot_test/QTeXEngine/example/renderarea.cpp similarity index 96% rename from test/jkqtplot_test/QTeXEngine/example/renderarea.cpp rename to examples/jkqtplot_test/QTeXEngine/example/renderarea.cpp index 4c4068ff10..9518250e13 100644 --- a/test/jkqtplot_test/QTeXEngine/example/renderarea.cpp +++ b/examples/jkqtplot_test/QTeXEngine/example/renderarea.cpp @@ -1,134 +1,134 @@ -#include -#include "renderarea.h" -#include "pixmaps.h" - -RenderArea::RenderArea(QWidget *parent) - : QWidget(parent) -{ - setBackgroundRole(QPalette::Base); - setAutoFillBackground(true); - - setFixedWidth(600); - setFixedHeight(500); -} - -void RenderArea::draw(QPainter *painter) -{ - static const QPoint points[4] = { - QPoint(10, 80), - QPoint(20, 10), - QPoint(80, 30), - QPoint(90, 70) - }; - - QRect rect(10, 20, 80, 60); - - QPainterPath path; - path.moveTo(20, 80); - path.lineTo(20, 30); - path.cubicTo(80, 0, 50, 50, 80, 80); - - int startAngle = 20 * 16; - int arcLength = 120 * 16; - - QLinearGradient linearGrad(QPointF(0, 0), QPointF(100, 100)); - linearGrad.setColorAt(0, Qt::black); - linearGrad.setColorAt(1, Qt::red); - - QRadialGradient radialGrad(QPointF(50, 50), 50, QPointF(50, 50)); - radialGrad.setColorAt(0, Qt::red); - radialGrad.setColorAt(1, Qt::green); - - /*QConicalGradient conGrad(QPointF(50, 50), 90); - conGrad.setColorAt(0, Qt::blue); - conGrad.setColorAt(0.5, Qt::red); - conGrad.setColorAt(1, Qt::green); - QBrush brush = QBrush(conGrad);*/ - - QBrush brush = QBrush(Qt::gray); - int brushStyle = Qt::NoBrush; - int penStyle = Qt::NoPen; - int shape = Rect; - int drawnRects = 0; - for (int x = 0; x < width(); x += 100){ - for (int y = 0; y < height(); y += 100){ - painter->save(); - painter->setRenderHint(QPainter::Antialiasing); - - shape = (shape + 1)%14; - - penStyle = (penStyle + 1)%4; - if(!penStyle) - penStyle = 1; - - if (shape == RoundedRect && drawnRects < 2){ - if (drawnRects == 0) - painter->setBrush(QBrush(linearGrad)); - else if (drawnRects == 1) - painter->setBrush(QBrush(radialGrad)); - drawnRects++; - } else { - brushStyle = (brushStyle + 1)%14; - if(!brushStyle) - brushStyle = 1; - brush.setStyle((Qt::BrushStyle)brushStyle); - painter->setBrush(brush); - } - - painter->setPen(QPen(Qt::black, 2, (Qt::PenStyle)penStyle, Qt::FlatCap, Qt::MiterJoin)); - painter->translate(x, y); - switch (shape) { - case Line: - painter->drawLine(rect.bottomLeft(), rect.topRight()); - break; - case Polyline: - painter->drawPolyline(points, 4); - break; - case Polygon: - painter->drawPolygon(points, 4); - break; - case Rect: - painter->drawRect(rect); - break; - case RoundedRect: - painter->drawRoundedRect(rect, 25, 25, Qt::RelativeSize); - break; - case Ellipse: - painter->drawEllipse(rect); - break; - case Arc: - painter->drawArc(rect, startAngle, arcLength); - break; - case Chord: - painter->drawChord(rect, startAngle, arcLength); - break; - case Pie: - painter->drawPie(rect, startAngle, arcLength); - break; - case Path: - painter->drawPath(path); - break; - case Text: - painter->drawText(rect, Qt::AlignCenter, "QTeXEngine"); - break; - case Pixmap: - painter->drawPixmap(10, 10, QPixmap(qt_logo_xpm)); - break; - case TiledPixmap: - painter->drawTiledPixmap (QRect(10, 10, 64, 64), QPixmap(brick_xpm)); - break; - } - painter->restore(); - } - } - - painter->setPen(Qt::darkGray); - painter->setBrush(Qt::NoBrush); - painter->drawRect(QRect(9, 9, width() - 18, height() - 18)); -} - -void RenderArea::paintEvent(QPaintEvent * /* event */) -{ - QPainter painter(this); - draw(&painter); -} +#include +#include "renderarea.h" +#include "pixmaps.h" + +RenderArea::RenderArea(QWidget *parent) + : QWidget(parent) +{ + setBackgroundRole(QPalette::Base); + setAutoFillBackground(true); + + setFixedWidth(600); + setFixedHeight(500); +} + +void RenderArea::draw(QPainter *painter) +{ + static const QPoint points[4] = { + QPoint(10, 80), + QPoint(20, 10), + QPoint(80, 30), + QPoint(90, 70) + }; + + QRect rect(10, 20, 80, 60); + + QPainterPath path; + path.moveTo(20, 80); + path.lineTo(20, 30); + path.cubicTo(80, 0, 50, 50, 80, 80); + + int startAngle = 20 * 16; + int arcLength = 120 * 16; + + QLinearGradient linearGrad(QPointF(0, 0), QPointF(100, 100)); + linearGrad.setColorAt(0, Qt::black); + linearGrad.setColorAt(1, Qt::red); + + QRadialGradient radialGrad(QPointF(50, 50), 50, QPointF(50, 50)); + radialGrad.setColorAt(0, Qt::red); + radialGrad.setColorAt(1, Qt::green); + + /*QConicalGradient conGrad(QPointF(50, 50), 90); + conGrad.setColorAt(0, Qt::blue); + conGrad.setColorAt(0.5, Qt::red); + conGrad.setColorAt(1, Qt::green); + QBrush brush = QBrush(conGrad);*/ + + QBrush brush = QBrush(Qt::gray); + int brushStyle = Qt::NoBrush; + int penStyle = Qt::NoPen; + int shape = Rect; + int drawnRects = 0; + for (int x = 0; x < width(); x += 100){ + for (int y = 0; y < height(); y += 100){ + painter->save(); + painter->setRenderHint(QPainter::Antialiasing); + + shape = (shape + 1)%14; + + penStyle = (penStyle + 1)%4; + if(!penStyle) + penStyle = 1; + + if (shape == RoundedRect && drawnRects < 2){ + if (drawnRects == 0) + painter->setBrush(QBrush(linearGrad)); + else if (drawnRects == 1) + painter->setBrush(QBrush(radialGrad)); + drawnRects++; + } else { + brushStyle = (brushStyle + 1)%14; + if(!brushStyle) + brushStyle = 1; + brush.setStyle((Qt::BrushStyle)brushStyle); + painter->setBrush(brush); + } + + painter->setPen(QPen(Qt::black, 2, (Qt::PenStyle)penStyle, Qt::FlatCap, Qt::MiterJoin)); + painter->translate(x, y); + switch (shape) { + case Line: + painter->drawLine(rect.bottomLeft(), rect.topRight()); + break; + case Polyline: + painter->drawPolyline(points, 4); + break; + case Polygon: + painter->drawPolygon(points, 4); + break; + case Rect: + painter->drawRect(rect); + break; + case RoundedRect: + painter->drawRoundedRect(rect, 25, 25, Qt::RelativeSize); + break; + case Ellipse: + painter->drawEllipse(rect); + break; + case Arc: + painter->drawArc(rect, startAngle, arcLength); + break; + case Chord: + painter->drawChord(rect, startAngle, arcLength); + break; + case Pie: + painter->drawPie(rect, startAngle, arcLength); + break; + case Path: + painter->drawPath(path); + break; + case Text: + painter->drawText(rect, Qt::AlignCenter, "QTeXEngine"); + break; + case Pixmap: + painter->drawPixmap(10, 10, QPixmap(qt_logo_xpm)); + break; + case TiledPixmap: + painter->drawTiledPixmap (QRect(10, 10, 64, 64), QPixmap(brick_xpm)); + break; + } + painter->restore(); + } + } + + painter->setPen(Qt::darkGray); + painter->setBrush(Qt::NoBrush); + painter->drawRect(QRect(9, 9, width() - 18, height() - 18)); +} + +void RenderArea::paintEvent(QPaintEvent * /* event */) +{ + QPainter painter(this); + draw(&painter); +} diff --git a/test/jkqtplot_test/EmfEngine/example/renderarea.h b/examples/jkqtplot_test/QTeXEngine/example/renderarea.h similarity index 95% rename from test/jkqtplot_test/EmfEngine/example/renderarea.h rename to examples/jkqtplot_test/QTeXEngine/example/renderarea.h index bc0b00e0fa..52626f5f1b 100644 --- a/test/jkqtplot_test/EmfEngine/example/renderarea.h +++ b/examples/jkqtplot_test/QTeXEngine/example/renderarea.h @@ -1,19 +1,19 @@ -#ifndef RENDERAREA_H -#define RENDERAREA_H - -#include - -class RenderArea : public QWidget -{ -public: - enum Shape { Line, Polyline, Polygon, Rect, RoundedRect, Ellipse, Arc, - Chord, Pie, Path, Text, Pixmap, TiledPixmap }; - - RenderArea(QWidget *parent = 0); - void draw(QPainter *painter); - -protected: - void paintEvent(QPaintEvent *event); -}; - -#endif +#ifndef RENDERAREA_H +#define RENDERAREA_H + +#include + +class RenderArea : public QWidget +{ +public: + enum Shape { Line, Polyline, Polygon, Rect, RoundedRect, Ellipse, Arc, + Chord, Pie, Path, Text, Pixmap, TiledPixmap }; + + RenderArea(QWidget *parent = 0); + void draw(QPainter *painter); + +protected: + void paintEvent(QPaintEvent *event); +}; + +#endif diff --git a/test/jkqtplot_test/QTeXEngine/src/QTeXEngine.h b/examples/jkqtplot_test/QTeXEngine/src/QTeXEngine.h similarity index 97% rename from test/jkqtplot_test/QTeXEngine/src/QTeXEngine.h rename to examples/jkqtplot_test/QTeXEngine/src/QTeXEngine.h index b6ad0f0db8..8fd55e22cf 100644 --- a/test/jkqtplot_test/QTeXEngine/src/QTeXEngine.h +++ b/examples/jkqtplot_test/QTeXEngine/src/QTeXEngine.h @@ -1,166 +1,166 @@ -/*************************************************************************** - File : QTeXEngine.h - Project : QTeXEngine GNU GPL v. 3.0 - -------------------------------------------------------------------- - Copyright : (C) 2009 by Ion Vasilief - Email (use @ for *) : ion_vasilief*yahoo.fr - Description : Enables the export of QPainter grafics to .tex files - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - ***************************************************************************/ - -#ifndef Q_TEX_ENGINE_H -#define Q_TEX_ENGINE_H - -#include -#include -#include - -class QFile; -class QTeXPaintEngine; - -class QTeXPaintDevice : public QPaintDevice -{ -public: - enum Unit{pt, bp, mm, cm, in, ex, em}; - enum OutputMode{Tikz, Pgf}; - - QTeXPaintDevice(const QString& fileName, const QSize& s = QSize(), Unit u = pt); - ~QTeXPaintDevice(); - - virtual QPaintEngine * paintEngine () const; - //! Set color mode (Color or GrayScale) - void setColorMode(QPrinter::ColorMode mode); - //! Set output mode (Tikz or Pgf) - void setOutputMode(OutputMode mode); - //! Set length unit - void setUnit(Unit u); - //! Set size - void setSize(const QSize& s){d_size = s;}; - //! Enables/Disables document tags - void setDocumentMode(bool on = true); - //! Enables/Disables escaping of special characters in texts - void setEscapeTextMode(bool on = true); - //! Enables/Disables exporting of font sizes - void exportFontSizes(bool on = true); - //! Set horizontal alignment - void setTextHorizontalAlignment(Qt::Alignment alignment); - -protected: - virtual int metric ( PaintDeviceMetric ) const; - -private: - //! Size in pixels - QSize d_size; - QTeXPaintEngine* engine; -}; - -class QTeXPaintEngine : public QPaintEngine -{ -public: - QTeXPaintEngine(const QString&, QTeXPaintDevice::Unit u = QTeXPaintDevice::pt); - ~QTeXPaintEngine(){}; - virtual bool begin(QPaintDevice*); - virtual bool end(); - virtual void updateState( const QPaintEngineState & ) {}; - virtual void drawEllipse(const QRectF &); - virtual QPaintEngine::Type type() const {return QPaintEngine::User;}; - virtual void drawPoints ( const QPointF * points, int pointCount ); - virtual void drawLines ( const QLineF * , int ); - virtual void drawPath ( const QPainterPath & path ); - virtual void drawPolygon ( const QPointF * , int , PolygonDrawMode ); - virtual void drawTextItem ( const QPointF & , const QTextItem & ); - virtual void drawRects ( const QRectF * , int ); - virtual void drawPixmap ( const QRectF &, const QPixmap &, const QRectF &); - virtual void drawImage(const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags); - - //! Set length unit - void setUnit(QTeXPaintDevice::Unit u){d_unit = u;}; - //! Enables/Disables gray scale output - void setGrayScale(bool on = true){d_gray_scale = on;}; - //! Set output syntax - void setOutputMode(QTeXPaintDevice::OutputMode mode){d_pgf_mode = (mode == QTeXPaintDevice::Pgf) ? true : false;}; - void setDocumentMode(bool on = true){d_document_mode = on;}; - //! Enables/Disables escaping of special characters in texts - void setEscapeTextMode(bool on = true){d_escape_text = on;}; - void exportFontSizes(bool on = true){d_font_size = on;}; - void setTextHorizontalAlignment(Qt::Alignment alignment){d_horizontal_alignment = alignment;}; - -private: - enum Shape{Line, Polygon, Polyline, Rect, Ellipse, Path, Points}; - //! Returns true if draw operation has NoBrush and NoPen - bool emptyStringOperation(); - QString unit(); - double unitFactor(); - double resFactorX(); - double resFactorY(); - - QString pgfPoint(const QPointF& p); - QString tikzPoint(const QPointF& p); - - QPointF convertPoint(const QPointF& p); - QString color(const QColor& col); - QString defineColor(const QColor& c, const QString& name); - - QString pgfPen(const QPen& pen); - QString tikzPen(const QPen& pen); - - QString pgfBrush(const QBrush& brush); - QString tikzBrush(const QBrush& brush); - - QString beginScope(); - QString endScope(); - - QString clipPath(); - bool changedClipping(); - - QString path(const QPainterPath & path); - QString pgfPath(const QPainterPath & path); - QString tikzPath(const QPainterPath & path); - - QString drawShape(Shape shape, const QString & path); - QString drawPgfShape(Shape shape, const QString & path); - QString drawTikzShape(Shape shape, const QString & path); - - //! Draws pixmap pix in a given rectangle - void drawPixmap(const QPixmap &pix, const QRectF &p); - void writeToFile(const QString& s); - QString indentString(const QString& s); - //! Returns true if a new color command should be added - bool addNewBrushColor(); - bool addNewPatternColor(); - bool addNewPenColor(); - - QFile *file; - //! Name of the output file - QString fname; - int d_pixmap_index; - bool d_pgf_mode; - bool d_open_scope; - bool d_gray_scale; - bool d_document_mode; - bool d_escape_text; - bool d_font_size; - QPainterPath d_clip_path; - QColor d_current_color, d_pattern_color; - QTeXPaintDevice::Unit d_unit; - Qt::Alignment d_horizontal_alignment; -}; -#endif +/*************************************************************************** + File : QTeXEngine.h + Project : QTeXEngine GNU GPL v. 3.0 + -------------------------------------------------------------------- + Copyright : (C) 2009 by Ion Vasilief + Email (use @ for *) : ion_vasilief*yahoo.fr + Description : Enables the export of QPainter grafics to .tex files + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301 USA * + * * + ***************************************************************************/ + +#ifndef Q_TEX_ENGINE_H +#define Q_TEX_ENGINE_H + +#include +#include +#include + +class QFile; +class QTeXPaintEngine; + +class QTeXPaintDevice : public QPaintDevice +{ +public: + enum Unit{pt, bp, mm, cm, in, ex, em}; + enum OutputMode{Tikz, Pgf}; + + QTeXPaintDevice(const QString& fileName, const QSize& s = QSize(), Unit u = pt); + ~QTeXPaintDevice(); + + virtual QPaintEngine * paintEngine () const; + //! Set color mode (Color or GrayScale) + void setColorMode(QPrinter::ColorMode mode); + //! Set output mode (Tikz or Pgf) + void setOutputMode(OutputMode mode); + //! Set length unit + void setUnit(Unit u); + //! Set size + void setSize(const QSize& s){d_size = s;}; + //! Enables/Disables document tags + void setDocumentMode(bool on = true); + //! Enables/Disables escaping of special characters in texts + void setEscapeTextMode(bool on = true); + //! Enables/Disables exporting of font sizes + void exportFontSizes(bool on = true); + //! Set horizontal alignment + void setTextHorizontalAlignment(Qt::Alignment alignment); + +protected: + virtual int metric ( PaintDeviceMetric ) const; + +private: + //! Size in pixels + QSize d_size; + QTeXPaintEngine* engine; +}; + +class QTeXPaintEngine : public QPaintEngine +{ +public: + QTeXPaintEngine(const QString&, QTeXPaintDevice::Unit u = QTeXPaintDevice::pt); + ~QTeXPaintEngine(){}; + virtual bool begin(QPaintDevice*); + virtual bool end(); + virtual void updateState( const QPaintEngineState & ) {}; + virtual void drawEllipse(const QRectF &); + virtual QPaintEngine::Type type() const {return QPaintEngine::User;}; + virtual void drawPoints ( const QPointF * points, int pointCount ); + virtual void drawLines ( const QLineF * , int ); + virtual void drawPath ( const QPainterPath & path ); + virtual void drawPolygon ( const QPointF * , int , PolygonDrawMode ); + virtual void drawTextItem ( const QPointF & , const QTextItem & ); + virtual void drawRects ( const QRectF * , int ); + virtual void drawPixmap ( const QRectF &, const QPixmap &, const QRectF &); + virtual void drawImage(const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags); + + //! Set length unit + void setUnit(QTeXPaintDevice::Unit u){d_unit = u;}; + //! Enables/Disables gray scale output + void setGrayScale(bool on = true){d_gray_scale = on;}; + //! Set output syntax + void setOutputMode(QTeXPaintDevice::OutputMode mode){d_pgf_mode = (mode == QTeXPaintDevice::Pgf) ? true : false;}; + void setDocumentMode(bool on = true){d_document_mode = on;}; + //! Enables/Disables escaping of special characters in texts + void setEscapeTextMode(bool on = true){d_escape_text = on;}; + void exportFontSizes(bool on = true){d_font_size = on;}; + void setTextHorizontalAlignment(Qt::Alignment alignment){d_horizontal_alignment = alignment;}; + +private: + enum Shape{Line, Polygon, Polyline, Rect, Ellipse, Path, Points}; + //! Returns true if draw operation has NoBrush and NoPen + bool emptyStringOperation(); + QString unit(); + double unitFactor(); + double resFactorX(); + double resFactorY(); + + QString pgfPoint(const QPointF& p); + QString tikzPoint(const QPointF& p); + + QPointF convertPoint(const QPointF& p); + QString color(const QColor& col); + QString defineColor(const QColor& c, const QString& name); + + QString pgfPen(const QPen& pen); + QString tikzPen(const QPen& pen); + + QString pgfBrush(const QBrush& brush); + QString tikzBrush(const QBrush& brush); + + QString beginScope(); + QString endScope(); + + QString clipPath(); + bool changedClipping(); + + QString path(const QPainterPath & path); + QString pgfPath(const QPainterPath & path); + QString tikzPath(const QPainterPath & path); + + QString drawShape(Shape shape, const QString & path); + QString drawPgfShape(Shape shape, const QString & path); + QString drawTikzShape(Shape shape, const QString & path); + + //! Draws pixmap pix in a given rectangle + void drawPixmap(const QPixmap &pix, const QRectF &p); + void writeToFile(const QString& s); + QString indentString(const QString& s); + //! Returns true if a new color command should be added + bool addNewBrushColor(); + bool addNewPatternColor(); + bool addNewPenColor(); + + QFile *file; + //! Name of the output file + QString fname; + int d_pixmap_index; + bool d_pgf_mode; + bool d_open_scope; + bool d_gray_scale; + bool d_document_mode; + bool d_escape_text; + bool d_font_size; + QPainterPath d_clip_path; + QColor d_current_color, d_pattern_color; + QTeXPaintDevice::Unit d_unit; + Qt::Alignment d_horizontal_alignment; +}; +#endif diff --git a/test/jkqtplot_test/QTeXEngine/src/QTeXPaintDevice.cpp b/examples/jkqtplot_test/QTeXEngine/src/QTeXPaintDevice.cpp similarity index 97% rename from test/jkqtplot_test/QTeXEngine/src/QTeXPaintDevice.cpp rename to examples/jkqtplot_test/QTeXEngine/src/QTeXPaintDevice.cpp index 04ca7be415..e42630abe0 100644 --- a/test/jkqtplot_test/QTeXEngine/src/QTeXPaintDevice.cpp +++ b/examples/jkqtplot_test/QTeXEngine/src/QTeXPaintDevice.cpp @@ -1,118 +1,118 @@ -/*************************************************************************** - File : QTeXPaintDevice.cpp - Project : QTeXEngine GNU GPL v. 3.0 - -------------------------------------------------------------------- - Copyright : (C) 2009 by Ion Vasilief - Email (use @ for *) : ion_vasilief*yahoo.fr - Description : Enables the export of QPainter grafics to .tex files - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - ***************************************************************************/ - -#include "QTeXEngine.h" - -#include -#include - -QTeXPaintDevice::QTeXPaintDevice(const QString& fileName, const QSize& s, Unit u) -: QPaintDevice() -{ - d_size = s; - - if (!d_size.isValid()) - d_size = QSize(500, 400); - - engine = new QTeXPaintEngine(fileName, u); -} - -QTeXPaintDevice::~QTeXPaintDevice() -{ - delete engine; -} - -QPaintEngine * QTeXPaintDevice::paintEngine () const -{ - return engine; -} - -void QTeXPaintDevice::setColorMode(QPrinter::ColorMode mode) -{ - engine->setGrayScale(mode == QPrinter::GrayScale); -} - -void QTeXPaintDevice::setOutputMode(OutputMode mode) -{ - engine->setOutputMode(mode); -} - -void QTeXPaintDevice::setUnit(Unit u) -{ - engine->setUnit(u); -} - -void QTeXPaintDevice::setDocumentMode(bool on) -{ - engine->setDocumentMode(on); -} - -void QTeXPaintDevice::setEscapeTextMode(bool on) -{ - engine->setEscapeTextMode(on); -} - -void QTeXPaintDevice::exportFontSizes(bool on) -{ - engine->exportFontSizes(on); -} - -void QTeXPaintDevice::setTextHorizontalAlignment(Qt::Alignment alignment) -{ - engine->setTextHorizontalAlignment(alignment); -} - -int QTeXPaintDevice::metric ( PaintDeviceMetric metric ) const -{ - QDesktopWidget *desktop = QApplication::desktop(); - int dpi_x = desktop->logicalDpiX(); - int dpi_y = desktop->logicalDpiY(); - switch (metric){ - case QPaintDevice::PdmWidth: - return d_size.width(); - case QPaintDevice::PdmHeight: - return d_size.height(); - case QPaintDevice::PdmWidthMM: - return int(25.4*d_size.width()/(double)dpi_x); - case QPaintDevice::PdmHeightMM: - return int(25.4*d_size.height()/(double)dpi_y); - case QPaintDevice::PdmNumColors: - return 65536;//should it be millions? - case QPaintDevice::PdmDepth: - return 32; - case QPaintDevice::PdmDpiX: - case QPaintDevice::PdmPhysicalDpiX: - return dpi_x; - case QPaintDevice::PdmDpiY: - case QPaintDevice::PdmPhysicalDpiY: - return dpi_y; - default: - qWarning ("QTeXPaintDevice::Unknown metric asked"); - return 0; - } -} +/*************************************************************************** + File : QTeXPaintDevice.cpp + Project : QTeXEngine GNU GPL v. 3.0 + -------------------------------------------------------------------- + Copyright : (C) 2009 by Ion Vasilief + Email (use @ for *) : ion_vasilief*yahoo.fr + Description : Enables the export of QPainter grafics to .tex files + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301 USA * + * * + ***************************************************************************/ + +#include "QTeXEngine.h" + +#include +#include + +QTeXPaintDevice::QTeXPaintDevice(const QString& fileName, const QSize& s, Unit u) +: QPaintDevice() +{ + d_size = s; + + if (!d_size.isValid()) + d_size = QSize(500, 400); + + engine = new QTeXPaintEngine(fileName, u); +} + +QTeXPaintDevice::~QTeXPaintDevice() +{ + delete engine; +} + +QPaintEngine * QTeXPaintDevice::paintEngine () const +{ + return engine; +} + +void QTeXPaintDevice::setColorMode(QPrinter::ColorMode mode) +{ + engine->setGrayScale(mode == QPrinter::GrayScale); +} + +void QTeXPaintDevice::setOutputMode(OutputMode mode) +{ + engine->setOutputMode(mode); +} + +void QTeXPaintDevice::setUnit(Unit u) +{ + engine->setUnit(u); +} + +void QTeXPaintDevice::setDocumentMode(bool on) +{ + engine->setDocumentMode(on); +} + +void QTeXPaintDevice::setEscapeTextMode(bool on) +{ + engine->setEscapeTextMode(on); +} + +void QTeXPaintDevice::exportFontSizes(bool on) +{ + engine->exportFontSizes(on); +} + +void QTeXPaintDevice::setTextHorizontalAlignment(Qt::Alignment alignment) +{ + engine->setTextHorizontalAlignment(alignment); +} + +int QTeXPaintDevice::metric ( PaintDeviceMetric metric ) const +{ + QDesktopWidget *desktop = QApplication::desktop(); + int dpi_x = desktop->logicalDpiX(); + int dpi_y = desktop->logicalDpiY(); + switch (metric){ + case QPaintDevice::PdmWidth: + return d_size.width(); + case QPaintDevice::PdmHeight: + return d_size.height(); + case QPaintDevice::PdmWidthMM: + return int(25.4*d_size.width()/(double)dpi_x); + case QPaintDevice::PdmHeightMM: + return int(25.4*d_size.height()/(double)dpi_y); + case QPaintDevice::PdmNumColors: + return 65536;//should it be millions? + case QPaintDevice::PdmDepth: + return 32; + case QPaintDevice::PdmDpiX: + case QPaintDevice::PdmPhysicalDpiX: + return dpi_x; + case QPaintDevice::PdmDpiY: + case QPaintDevice::PdmPhysicalDpiY: + return dpi_y; + default: + qWarning ("QTeXPaintDevice::Unknown metric asked"); + return 0; + } +} diff --git a/test/jkqtplot_test/QTeXEngine/src/QTeXPaintEngine.cpp b/examples/jkqtplot_test/QTeXEngine/src/QTeXPaintEngine.cpp similarity index 95% rename from test/jkqtplot_test/QTeXEngine/src/QTeXPaintEngine.cpp rename to examples/jkqtplot_test/QTeXEngine/src/QTeXPaintEngine.cpp index 2032bd78a2..8fcc1dfea5 100644 --- a/test/jkqtplot_test/QTeXEngine/src/QTeXPaintEngine.cpp +++ b/examples/jkqtplot_test/QTeXEngine/src/QTeXPaintEngine.cpp @@ -1,1121 +1,1121 @@ -/*************************************************************************** - File : QTeXPaintEngine.cpp - Project : QTeXEngine GNU GPL v. 3.0 - -------------------------------------------------------------------- - Copyright : (C) 2009 by Ion Vasilief - Email (use @ for *) : ion_vasilief*yahoo.fr - Description : Enables the export of QPainter grafics to .tex files - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - ***************************************************************************/ - -#include "QTeXEngine.h" - -#include -#include -#include -#include - -QTeXPaintEngine::QTeXPaintEngine(const QString& f, QTeXPaintDevice::Unit u) -: QPaintEngine(QPaintEngine::AllFeatures), -fname(f), -d_pixmap_index(1), -d_unit(u) -{ - d_pgf_mode = false; - d_open_scope = false; - d_gray_scale = false; - d_document_mode = false; - d_escape_text = true; - d_font_size = true; - d_clip_path = QPainterPath(); - d_current_color = QColor(); - d_pattern_color = QColor(); - d_horizontal_alignment = Qt::AlignHCenter; -} - -bool QTeXPaintEngine::begin(QPaintDevice* p) -{ - setPaintDevice(p); - file = new QFile(fname); - if (file->open(QIODevice::WriteOnly)){ - QTextStream t(file); - t.setCodec("UTF-8"); - if (d_document_mode){ - t << "\\documentclass{article}\n"; - t << "\\usepackage[left=0.2cm,top=0.1cm,right=0.2cm,nohead,nofoot]{geometry}\n"; - - if (d_pgf_mode){ - t << "\\usepackage{pgf}\n"; - t << "\\usepgflibrary{patterns}\n"; - } else { - t << "\\usepackage{tikz}\n"; - t << "\\usetikzlibrary{patterns}\n"; - } - - t << "\\usepackage{ulem}\n";//used for striked out fonts (\sout command) - t << "\\begin{document}\n"; - } - - QString pictureEnv = "\\begin{tikzpicture}{0"; - if (d_pgf_mode) - pictureEnv = "\\begin{pgfpicture}{0"; - - QString u = unit(); - t << pictureEnv + u + "}{0" + u + "}{"; - t << QString::number(p->width()) + u + "}{"; - t << QString::number(p->height()) + u + "}\n"; - - if (!d_pgf_mode){ - QPainterPath path; - path.addRect(QRect(0, 0, p->width(), p->height())); - t << "\t\\clip" + tikzPath(path); - } - return true; - } - - delete file; - return false; -} - -bool QTeXPaintEngine::end() -{ - QTextStream t(file); - t.setCodec("UTF-8"); - if (d_open_scope) - t << endScope(); - - if (d_pgf_mode) - t << "\\end{pgfpicture}\n"; - else - t << "\\end{tikzpicture}\n"; - - if (d_document_mode) - t << "\\end{document}\n"; - - file->close(); - return true; -} - -void QTeXPaintEngine::drawPoints ( const QPointF * points, int pointCount ) -{ - if (emptyStringOperation()) - return; - - QMatrix m = painter()->worldMatrix(); - double lw = painter()->pen().widthF(); - - QString s = QString::null; - if (addNewPenColor()){ - d_current_color = painter()->pen().color(); - s = color(d_current_color); - } - - for (int i = 0; i < pointCount; i++){ - QPointF p = m.map(points[i]); - if (d_pgf_mode){ - QString path = pgfPoint(convertPoint(p)); - path += pgfPoint(QPointF(lw, lw)) + "\n"; - s += "\\pgfrect[fill]" + path; - } else { - QString path = tikzPoint(convertPoint(p)); - path += " rectangle " + tikzPoint(convertPoint(QPointF(p.x() + lw, p.y() + lw))) + ";\n"; - s += "\\fill " + path; - } - } - - writeToFile(s); -} - -void QTeXPaintEngine::drawLines ( const QLineF * lines, int lineCount ) -{ - if (painter()->pen().style() == Qt::NoPen) - return; - - QString s; - for (int i = 0; i < lineCount; i++){ - QPainterPath path(lines[i].p1()); - path.lineTo(lines[i].p2()); - - s += drawShape(Line, this->path(path)); - } - - writeToFile(s); -} - -void QTeXPaintEngine::drawPolygon ( const QPointF * points, int pointCount, PolygonDrawMode mode ) -{ - if (emptyStringOperation()) - return; - - QVector pts; - for (int i = 0; i < pointCount; i++) - pts << points[i]; - - QPainterPath path; - path.addPolygon(QPolygonF(pts)); - if (mode != QPaintEngine::PolylineMode) - path.closeSubpath (); - - QString s;; - if (mode != QPaintEngine::PolylineMode){ - path.closeSubpath (); - s += drawShape(Polygon, this->path(path)); - } else - s += drawShape(Polyline, this->path(path)); - - writeToFile(s); -} - -void QTeXPaintEngine::drawTextItem ( const QPointF & p, const QTextItem & textItem ) -{ - QString s = QString::null; - if (addNewPenColor()){ - s = color(painter()->pen().color()); - d_current_color = painter()->pen().color(); - } - - QMatrix m = painter()->worldMatrix(); - - s += "\\pgftext["; - - QPointF origin = p; - switch(d_horizontal_alignment){ - case Qt::AlignLeft: - s += "left"; - break; - - case Qt::AlignHCenter: - case Qt::AlignJustify: - origin = QPointF(p.x() + 0.5*textItem.width(), p.y()); - s += "center"; - break; - - case Qt::AlignRight: - origin = QPointF(p.x() + textItem.width(), p.y()); - s += "right"; - break; - - default: - break; - } - - s += ", base, at="; - s += pgfPoint(convertPoint(m.map(origin))); - - if (painter()->transform().isRotating ()){ - double angle = 180.0/M_PI*acos(m.m11()); - if (m.m11() != 0.0 && m.m12() > 0) - angle = -angle; - s += ",rotate=" + QString::number(angle); - } - s += "]{"; - - QFont f = textItem.font(); - if (d_font_size) - s += "\\fontsize{" + QString::number(int(f.pointSizeF())) + "}{0}\\selectfont{"; - - if (f.underline()) - s += "\\underline{"; - if (f.italic()) - s += "\\textit{"; - if (f.bold()) - s += "\\textbf{"; - if (f.strikeOut()) - s += "\\sout{"; - - QString text = textItem.text(); - text.remove(QRegExp("~\\")); - if (d_escape_text){ - text.replace("$", "\\$"); - text.replace("_", "\\_"); - text.replace("{", "\\{"); - text.replace("}", "\\}"); - text.replace("^", "\\^"); - text.replace("&", "\\&"); - text.replace("%", "\\%"); - text.replace("#", "\\#"); - } - - s += text; - if (d_font_size) - s += "}"; - - if (f.italic()) - s += "}"; - if (f.bold()) - s += "}"; - if (f.underline()) - s += "}"; - if (f.strikeOut()) - s += "}"; - - s += "}\n"; - - writeToFile(s); -} - -void QTeXPaintEngine::drawRects ( const QRectF * rects, int rectCount ) -{ - if (emptyStringOperation()) - return; - - QString s; - for (int i = 0; i < rectCount; i++){ - QPainterPath path; - path.addPolygon(QPolygonF(rects[i])); - s += drawShape(Path, this->path(path)); - } - - writeToFile(s); -} - -void QTeXPaintEngine::drawEllipse ( const QRectF & rect ) -{ - if (emptyStringOperation()) - return; - - QPointF p = painter()->worldMatrix().map(rect.bottomLeft()); - - QString path; - if (d_pgf_mode){ - path = pgfPoint(convertPoint(QPointF(p.x() + 0.5*rect.width(), p.y() - 0.5*rect.height()))); - path += pgfPoint(QPointF(0, 0.5*rect.height()*resFactorY())); - path += pgfPoint(QPointF(0.5*rect.width()*resFactorX(), 0)) + "\n"; - } else { - path = tikzPoint(convertPoint(QPointF(p.x() + 0.5*rect.width(), p.y() - 0.5*rect.height()))); - path += " ellipse ("; - QString u = unit(); - path += QString::number(0.5*rect.width()*resFactorX()) + u + " and "; - path += QString::number(0.5*rect.height()*resFactorY()) + u + ");\n"; - } - - writeToFile(drawShape(Ellipse, path)); -} - -void QTeXPaintEngine::drawPath ( const QPainterPath & path ) -{ - if (emptyStringOperation()) - return; - - writeToFile(drawShape(Path, this->path(path))); -} - -QString QTeXPaintEngine::drawPgfShape(Shape shape, const QString & path) -{ - if (path.isEmpty()) - return QString::null; - - QString stroke_command = path + "\\pgfstroke\n"; - QString fill_command = path + "\\pgffill\n"; - switch(shape){ - case Line: - case Polygon: - case Polyline: - case Path: - case Points: - break; - - case Rect: - stroke_command = "\\pgfrect[stroke]" + path; - fill_command = "\\pgfrect[fill]" + path; - break; - - case Ellipse: - stroke_command = "\\pgfellipse[stroke]" + path; - fill_command = "\\pgfellipse[fill]" + path; - break; - } - - QString s = QString::null; - if (shape != Line && shape != Polyline && painter()->brush().style() != Qt::NoBrush){ - // fill the background - s += pgfBrush(painter()->brush()); - s += fill_command; - } - - if (painter()->pen().style() != Qt::NoPen){// draw the contour - s += pgfPen(painter()->pen()); - s += stroke_command; - } - - return s; -} - -QString QTeXPaintEngine::drawShape(Shape shape, const QString & path) -{ - if (d_pgf_mode) - return drawPgfShape(shape, path); - - return drawTikzShape(shape, path); -} - -QString QTeXPaintEngine::drawTikzShape(Shape shape, const QString & path) -{ - QString s = QString::null; - if (path.isEmpty()) - return s; - - if (shape != Line && shape != Polyline && painter()->brush().style() != Qt::NoBrush) - // fill the background - s += tikzBrush(painter()->brush()) + path; - if (painter()->pen().style() != Qt::NoPen)// draw the contour - s += tikzPen(painter()->pen()) + path; - - return s; -} - -void QTeXPaintEngine::drawImage(const QRectF & r, const QImage & image, const QRectF & sr, Qt::ImageConversionFlags flags) -{ - drawPixmap(QPixmap::fromImage(image, flags).copy(sr.toAlignedRect()), r); -} - -void QTeXPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) -{ - drawPixmap(pm.copy(sr.toAlignedRect()), r); -} - -void QTeXPaintEngine::drawPixmap(const QPixmap &pix, const QRectF &r) -{ - QFileInfo fi(*file); - - QString base = fi.baseName() + "-images-"; - base += QDateTime::currentDateTime().toString("ddMMyy-hhmmss"); - if (!fi.dir().exists(base)){ - if (!fi.dir().mkdir(base)) - return; - } - - QString name = fi.dir().absolutePath(); - name += "/" + base + "/image" + QString::number(d_pixmap_index); - name = QDir::cleanPath(name); - if (!pix.save(name + ".png", "PNG")) - return; - - d_pixmap_index++; - - QTextStream t(file); - t.setCodec("UTF-8"); - - t << "\\pgfputat"; - t << pgfPoint(convertPoint(painter()->worldMatrix().map(r.bottomLeft()))); - t << "{\\pgfimage[interpolate=false,width="; - - QString u = unit(); - t << QString::number(r.width()*resFactorX()) + u + ",height="; - t << QString::number(r.height()*resFactorY()) + u + "]{"; - t << name; - t << "}}\n"; -} - -QString QTeXPaintEngine::clipPath() -{ - if (painter()->hasClipping()){ - QPainterPath path = painter()->clipPath().simplified(); - if (path.elementCount() > 1000)//latex has a limited main memory size - return QString::null; - - if (d_pgf_mode) - return pgfPath(path) + "\\pgfclip\n"; - else - return "\\clip" + tikzPath(path); - } - return QString::null; -} - -QString QTeXPaintEngine::defineColor(const QColor& c, const QString& name) -{ - QString col = "\\definecolor{" + name + "}{"; - if (d_gray_scale){ - col += "gray}{"; - double gray = qGray(c.rgb())/255.0; - col += QString::number(gray) + "}\n"; - } else { - col += "rgb}{"; - col += QString::number(c.redF()) + ","; - col += QString::number(c.greenF()) + ","; - col += QString::number(c.blueF()) + "}\n"; - } - return col; -} - -QString QTeXPaintEngine::tikzBrush(const QBrush& brush) -{ - QString options = QString::null; - if (addNewPatternColor()){ - options = defineColor(brush.color(), "c"); - d_pattern_color = brush.color(); - } - - options += "\\fill [pattern color=c, pattern="; - - switch(brush.style()){ - case Qt::NoBrush: - return QString::null; - break; - - case Qt::SolidPattern: - { - QString s = QString::null; - if (addNewBrushColor()){ - d_current_color = brush.color(); - s = color(brush.color()); - } - - s += "\\fill"; - - double alpha = painter()->brush().color().alphaF(); - if(alpha > 0.0 && alpha < 1.0) - s += "[opacity=" + QString::number(alpha) + "]"; - - return s; - } - break; - - case Qt::Dense1Pattern: - case Qt::Dense2Pattern: - case Qt::Dense3Pattern: - case Qt::Dense4Pattern: - options += "crosshatch dots"; - break; - - case Qt::Dense5Pattern: - case Qt::Dense6Pattern: - case Qt::Dense7Pattern: - options += "dots"; - break; - - case Qt::HorPattern: - options += "horizontal lines"; - break; - case Qt::VerPattern: - options += "vertical lines"; - break; - case Qt::CrossPattern: - options += "grid"; - break; - case Qt::BDiagPattern: - options += "north east lines"; - break; - case Qt::FDiagPattern: - options += "north west lines"; - break; - case Qt::DiagCrossPattern: - options += "crosshatch"; - break; - - case Qt::LinearGradientPattern: - { - const QLinearGradient *qtgradient = (const QLinearGradient *)brush.gradient(); - QGradientStops stops = qtgradient->stops(); - - QString lc = defineColor(stops.first().second, "lc"); - QString rc = defineColor(stops.last().second, "rc"); - - QMatrix m = painter()->worldMatrix(); - QPointF sp = m.map(qtgradient->start()); - QPointF ep = m.map(qtgradient->finalStop()); - - options = lc + rc + "\\fill ["; - options += "left color=lc, "; - options += "right color=rc, "; - options += "shading angle=" + QString::number(-QLineF(sp, ep).angle()); - } - break; - - case Qt::RadialGradientPattern: - { - const QRadialGradient *qtgradient = (const QRadialGradient *)brush.gradient(); - QGradientStops stops = qtgradient->stops(); - - QString colors; - int count = stops.count(); - colors += defineColor(stops[0].second, "c1"); - colors += defineColor(stops[count - 1].second, "c2"); - - /*for (int i = 0; i < count; i++){ - QGradientStop stop = stops[i]; - colors += defineColor(stop.second, "c" + QString::number(i + 1)); - }*/ - - options = colors + "\\fill ["; - options += "inner color=c1, "; - options += "outer color=c2, "; - options += "shading=radial"; - qWarning("QTeXEngine: Uncentered Qt::RadialGradientPattern with more than two colors not supported."); - - } - break; - - case Qt::ConicalGradientPattern: - { - qWarning("QTeXEngine: Qt::ConicalGradientPattern is not supported."); - return QString::null; - } - break; - - default: - break; - } - return options + "]"; -} - -QString QTeXPaintEngine::pgfBrush(const QBrush& brush) -{ - QString s = QString::null; - QColor c = brush.color(); - QString col = defineColor(c, "c"); - QString command = "\\pgfsetfillpattern{"; - switch(brush.style()){ - case Qt::NoBrush: - break; - - case Qt::SolidPattern: - s += color(c); - break; - - case Qt::Dense1Pattern: - case Qt::Dense2Pattern: - case Qt::Dense3Pattern: - case Qt::Dense4Pattern: - s += col + command + "crosshatch dots}{c}\n"; - break; - - case Qt::Dense5Pattern: - case Qt::Dense6Pattern: - case Qt::Dense7Pattern: - s += col + command + "dots}{c}\n"; - break; - - case Qt::HorPattern: - s += col + command + "horizontal lines}{c}\n"; - break; - case Qt::VerPattern: - s += col + command + "vertical lines}{c}\n"; - break; - case Qt::CrossPattern: - s += col + command + "grid}{c}\n"; - break; - case Qt::BDiagPattern: - s += col + command + "north east lines}{c}\n"; - break; - case Qt::FDiagPattern: - s += col + command + "north west lines}{c}\n"; - break; - case Qt::DiagCrossPattern: - s += col + command + "crosshatch}{c}\n"; - break; - - default: - break; - } - return s; -} - -QString QTeXPaintEngine::path(const QPainterPath & path) -{ - if (path.isEmpty ()) - return QString::null; - - if (d_pgf_mode) - return pgfPath(path); - - return tikzPath(path); -} - -QString QTeXPaintEngine::pgfPath(const QPainterPath & path) -{ - QString s = QString::null; - int points = path.elementCount(); - QMatrix m = painter()->worldMatrix(); - int curvePoints = 0; - for (int i = 0; i < points; i++){ - QPainterPath::Element el = path.elementAt(i); - QPointF p = m.map(QPointF(el.x, el.y)); - - switch(el.type){ - case QPainterPath::MoveToElement: - s += "\\pgfmoveto" + pgfPoint(convertPoint(p)) + "\n"; - break; - - case QPainterPath::LineToElement: - s += "\\pgflineto" + pgfPoint(convertPoint(p)) + "\n"; - break; - - case QPainterPath::CurveToElement: - s += "\\pgfcurveto" + pgfPoint(convertPoint(p)); - curvePoints = 0; - break; - - case QPainterPath::CurveToDataElement: - s += pgfPoint(convertPoint(p)); - curvePoints++; - if (curvePoints == 2) - s += "\n"; - break; - } - } - return s; -} - -QString QTeXPaintEngine::tikzPath(const QPainterPath & path) -{ - QString s = QString::null; - if (path.isEmpty()) - return s; - - int points = path.elementCount(); - QMatrix m = painter()->worldMatrix(); - int curvePoints = 0; - for (int i = 0; i < points; i++){ - QPainterPath::Element el = path.elementAt(i); - QPointF p = m.map(QPointF(el.x, el.y)); - switch(el.type){ - case QPainterPath::MoveToElement: - s += tikzPoint(convertPoint(p)); - break; - - case QPainterPath::LineToElement: - s += " -- " + tikzPoint(convertPoint(p)); - break; - - case QPainterPath::CurveToElement: - s += " .. controls " + tikzPoint(convertPoint(p)); - curvePoints = 0; - break; - - case QPainterPath::CurveToDataElement: - curvePoints++; - if (curvePoints == 1) - s += " and " + tikzPoint(convertPoint(p)); - else if (curvePoints == 2) - s += " .. " + tikzPoint(convertPoint(p)); - break; - } - } - return s + ";\n"; -} - -QPointF QTeXPaintEngine::convertPoint( const QPointF& p) -{ - return QPointF(resFactorX()*p.x(), paintDevice()->height() - resFactorY()*p.y()); -} - -double QTeXPaintEngine::unitFactor() -{ - double factor = 1.0; - switch (d_unit){ - case QTeXPaintDevice::pt: - factor = 72.27; - break; - case QTeXPaintDevice::bp: - factor = 72; - break; - case QTeXPaintDevice::mm: - factor = 25.4; - break; - case QTeXPaintDevice::cm: - factor = 2.54; - break; - case QTeXPaintDevice::in: - case QTeXPaintDevice::ex: - case QTeXPaintDevice::em: - break; - } - return factor; -} - -double QTeXPaintEngine::resFactorX() -{ - return unitFactor()/(double)paintDevice()->logicalDpiX(); -} - -double QTeXPaintEngine::resFactorY() -{ - return unitFactor()/(double)paintDevice()->logicalDpiY(); -} - -QString QTeXPaintEngine::pgfPoint( const QPointF& p) -{ - QString u = unit(); - QString s = "{\\pgfpoint{" + QString::number(p.x()); - s += u + "}{" + QString::number(p.y()) + u + "}}"; - return s; -} - -QString QTeXPaintEngine::tikzPoint(const QPointF & p) -{ - QString u = unit(); - QString s = "(" + QString::number(p.x()); - s += u + "," + QString::number(p.y()) + u + ")"; - return s; -} - -QString QTeXPaintEngine::color( const QColor& col) -{ - QString s = "\\color["; - if (d_gray_scale){ - s += "gray]{"; - double gray = qGray(col.rgb())/255.0; - s += QString::number(gray) + "}\n"; - } else { - s += "rgb]{"; - s += QString::number(col.redF()) + ","; - s += QString::number(col.greenF()) + ","; - s += QString::number(col.blueF()) + "}\n"; - } - - return s; -} - -QString QTeXPaintEngine::pgfPen(const QPen& pen) -{ - QString s = QString::null; - if (pen.style() == Qt::NoPen) - return s; - - s += color(pen.color()); - s += "\\pgfsetlinewidth{" + QString::number(painter()->pen().widthF()) + "pt}\n"; - - QString aux = "\\pgfsetdash{"; - QString term = "}{0cm}\n"; - - double space_length = 0.08*pen.widthF(); - double dot_length = 0.3*space_length; - double dash_length = 1.5*space_length; - - QString dash = "{" + QString::number(dash_length) + "cm}"; - QString dot = "{" + QString::number(dot_length) + "cm}"; - QString space = "{" + QString::number(space_length) + "cm}"; - - switch (pen.style()){ - case Qt::SolidLine: - break; - case Qt::DashLine: - s += aux + dash + space + term; - break; - case Qt::DotLine: - s += aux + dot + space + term; - break; - case Qt::DashDotLine: - s += aux + dash + space + dot + space + term; - break; - case Qt::DashDotDotLine: - s += aux + dash + space + dot + space + dot + space + term; - break; - - case Qt::CustomDashLine: - { - s += aux; - QVector pattern = pen.dashPattern(); - int count = pattern.count(); - QString u = unit(); - for (int i = 0; i < count; i++) - s += "{" + QString::number(pattern[i]) + u + "}"; - - s += term; - break; - } - - default: - break; - } - - switch (pen.joinStyle()){ - case Qt::MiterJoin: - s += "\\pgfsetmiterjoin\n"; - //s += "\\pgfsetmiterlimit{" + QString::number(pen.miterLimit()) + "pt}\n"; - break; - case Qt::BevelJoin: - s += "\\pgfsetbeveljoin\n"; - break; - case Qt::RoundJoin: - s += "\\pgfsetroundjoin\n"; - break; - case Qt::SvgMiterJoin: - s += "\\pgfsetmiterjoin\n"; - break; - default: - break; - } - - switch (pen.capStyle()){ - case Qt::FlatCap: - s += "\\pgfsetrectcap\n"; - break; - case Qt::SquareCap: - s += "\\pgfsetrectcap\n"; - break; - case Qt::RoundCap: - s += "\\pgfsetroundcap\n"; - break; - default: - break; - } - - return s; -} - -QString QTeXPaintEngine::tikzPen(const QPen& pen) -{ - if (pen.style() == Qt::NoPen) - return QString::null; - - QString col = QString::null; - if (addNewPenColor()){ - col = color(pen.color()); - d_current_color = pen.color(); - } - - QString options = "[line width="; - options += QString::number(painter()->pen().widthF()) + "pt, "; - - double space_length = 0.08*pen.widthF(); - double dot_length = 0.3*space_length; - double dash_length = 1.5*space_length; - - QString dash = "on " + QString::number(dash_length) + "cm"; - QString dot = "on " + QString::number(dot_length) + "cm"; - QString space = " off " + QString::number(space_length) + "cm"; - - QString aux = "dash pattern="; - QString term = ", dash phase=0pt, "; - switch (pen.style()){ - case Qt::SolidLine: - break; - case Qt::DashLine: - options += aux + dash + space + term; - break; - case Qt::DotLine: - options += aux + dot + space + term; - break; - case Qt::DashDotLine: - options += aux + dash + space + dot + space + term; - break; - case Qt::DashDotDotLine: - options += aux + dash + space + dot + space + dot + space + term; - break; - - case Qt::CustomDashLine: - { - options += aux; - QVector pattern = pen.dashPattern(); - int count = pattern.count(); - QString u = unit(); - for (int i = 0; i < count; i++){ - QString s = "on "; - if (i%2) - s = " off "; - options += s + QString::number(pattern[i]) + u; - } - - options += term; - break; - } - - default: - break; - } - - options += "line join="; - switch (pen.joinStyle()){ - case Qt::MiterJoin: - options += "miter, "; - break; - case Qt::BevelJoin: - options += "bevel, "; - break; - case Qt::RoundJoin: - options += "round, "; - break; - case Qt::SvgMiterJoin: - options += "miter, "; - break; - default: - break; - } - - options += "line cap="; - switch (pen.capStyle()){ - case Qt::FlatCap: - options += "rect]"; - break; - case Qt::SquareCap: - options += "rect]"; - break; - case Qt::RoundCap: - options += "round]"; - break; - default: - break; - } - - return col + "\\draw" + options; -} - -QString QTeXPaintEngine::indentString(const QString& s) -{ - QStringList lst = s.split("\n", QString::SkipEmptyParts); - for(int i = 0; i < lst.count(); i++) - lst[i].prepend("\t"); - - return lst.join("\n") + "\n"; -} - -QString QTeXPaintEngine::beginScope() -{ - QString s = "\\begin{scope}\n"; - if (d_pgf_mode) - s = "\\begin{pgfscope}\n"; - - if (painter()->hasClipping()){ - QString clip = clipPath(); - if (!clip.isEmpty()) - s += indentString(clip); - } - - d_pattern_color = QColor(); - d_current_color = QColor(); - return s; -} - -QString QTeXPaintEngine::endScope() -{ - if (d_pgf_mode) - return "\\end{pgfscope}\n"; - - return "\\end{scope}\n"; -} - -void QTeXPaintEngine::writeToFile(const QString& s) -{ - QTextStream t(file); - t.setCodec("UTF-8"); - - if (d_pgf_mode){ - t << beginScope(); - t << indentString(s); - t << endScope(); - return; - } - - QString scope; - if (d_open_scope) - scope = endScope(); - - if (changedClipping()){ - scope += beginScope(); - scope += indentString(s); - t << scope; - - d_open_scope = true; - - if (painter()->hasClipping()) - d_clip_path = painter()->clipPath(); - else - d_clip_path = QPainterPath(); - } else - t << indentString(s); -} - -bool QTeXPaintEngine::emptyStringOperation() -{ - if ((painter()->brush().style() == Qt::NoBrush || - (painter()->brush().color().alpha() == 0)) && - painter()->pen().style() == Qt::NoPen) - return true; - - return false; -} - -bool QTeXPaintEngine::changedClipping() -{ - QPainterPath clipPath = QPainterPath(); - if (painter()->hasClipping()){ - if (painter()->clipPath().elementCount() > 1000) - return false; - clipPath = painter()->clipPath(); - } - - if (clipPath != d_clip_path) - return true; - - return false; -} - -bool QTeXPaintEngine::addNewPatternColor() -{ - Qt::BrushStyle style = painter()->brush().style(); - if (style <= Qt::SolidPattern || style >= Qt::LinearGradientPattern) - return false; - - if (!d_pattern_color.isValid() || - d_pattern_color != painter()->brush().color()) - return true; - - return false; -} - -bool QTeXPaintEngine::addNewBrushColor() -{ - if (!d_current_color.isValid() || changedClipping() || - d_current_color.name() != painter()->brush().color().name()) - return true; - - return false; -} - -bool QTeXPaintEngine::addNewPenColor() -{ - if (!d_current_color.isValid() || - (changedClipping() && painter()->brush().style() == Qt::NoBrush) || - d_current_color.name() != painter()->pen().color().name()) - return true; - - return false; -} - -QString QTeXPaintEngine::unit() -{ - switch (d_unit){ - case QTeXPaintDevice::pt: - return "pt"; - break; - case QTeXPaintDevice::bp: - return "bp"; - break; - case QTeXPaintDevice::mm: - return "mm"; - break; - case QTeXPaintDevice::cm: - return "cm"; - break; - case QTeXPaintDevice::in: - return "in"; - break; - case QTeXPaintDevice::ex: - return "ex"; - break; - case QTeXPaintDevice::em: - return "em"; - break; - } - return "pt"; -} +/*************************************************************************** + File : QTeXPaintEngine.cpp + Project : QTeXEngine GNU GPL v. 3.0 + -------------------------------------------------------------------- + Copyright : (C) 2009 by Ion Vasilief + Email (use @ for *) : ion_vasilief*yahoo.fr + Description : Enables the export of QPainter grafics to .tex files + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301 USA * + * * + ***************************************************************************/ + +#include "QTeXEngine.h" + +#include +#include +#include +#include + +QTeXPaintEngine::QTeXPaintEngine(const QString& f, QTeXPaintDevice::Unit u) +: QPaintEngine(QPaintEngine::AllFeatures), +fname(f), +d_pixmap_index(1), +d_unit(u) +{ + d_pgf_mode = false; + d_open_scope = false; + d_gray_scale = false; + d_document_mode = false; + d_escape_text = true; + d_font_size = true; + d_clip_path = QPainterPath(); + d_current_color = QColor(); + d_pattern_color = QColor(); + d_horizontal_alignment = Qt::AlignHCenter; +} + +bool QTeXPaintEngine::begin(QPaintDevice* p) +{ + setPaintDevice(p); + file = new QFile(fname); + if (file->open(QIODevice::WriteOnly)){ + QTextStream t(file); + t.setCodec("UTF-8"); + if (d_document_mode){ + t << "\\documentclass{article}\n"; + t << "\\usepackage[left=0.2cm,top=0.1cm,right=0.2cm,nohead,nofoot]{geometry}\n"; + + if (d_pgf_mode){ + t << "\\usepackage{pgf}\n"; + t << "\\usepgflibrary{patterns}\n"; + } else { + t << "\\usepackage{tikz}\n"; + t << "\\usetikzlibrary{patterns}\n"; + } + + t << "\\usepackage{ulem}\n";//used for striked out fonts (\sout command) + t << "\\begin{document}\n"; + } + + QString pictureEnv = "\\begin{tikzpicture}{0"; + if (d_pgf_mode) + pictureEnv = "\\begin{pgfpicture}{0"; + + QString u = unit(); + t << pictureEnv + u + "}{0" + u + "}{"; + t << QString::number(p->width()) + u + "}{"; + t << QString::number(p->height()) + u + "}\n"; + + if (!d_pgf_mode){ + QPainterPath path; + path.addRect(QRect(0, 0, p->width(), p->height())); + t << "\t\\clip" + tikzPath(path); + } + return true; + } + + delete file; + return false; +} + +bool QTeXPaintEngine::end() +{ + QTextStream t(file); + t.setCodec("UTF-8"); + if (d_open_scope) + t << endScope(); + + if (d_pgf_mode) + t << "\\end{pgfpicture}\n"; + else + t << "\\end{tikzpicture}\n"; + + if (d_document_mode) + t << "\\end{document}\n"; + + file->close(); + return true; +} + +void QTeXPaintEngine::drawPoints ( const QPointF * points, int pointCount ) +{ + if (emptyStringOperation()) + return; + + QMatrix m = painter()->worldMatrix(); + double lw = painter()->pen().widthF(); + + QString s = QString::null; + if (addNewPenColor()){ + d_current_color = painter()->pen().color(); + s = color(d_current_color); + } + + for (int i = 0; i < pointCount; i++){ + QPointF p = m.map(points[i]); + if (d_pgf_mode){ + QString path = pgfPoint(convertPoint(p)); + path += pgfPoint(QPointF(lw, lw)) + "\n"; + s += "\\pgfrect[fill]" + path; + } else { + QString path = tikzPoint(convertPoint(p)); + path += " rectangle " + tikzPoint(convertPoint(QPointF(p.x() + lw, p.y() + lw))) + ";\n"; + s += "\\fill " + path; + } + } + + writeToFile(s); +} + +void QTeXPaintEngine::drawLines ( const QLineF * lines, int lineCount ) +{ + if (painter()->pen().style() == Qt::NoPen) + return; + + QString s; + for (int i = 0; i < lineCount; i++){ + QPainterPath path(lines[i].p1()); + path.lineTo(lines[i].p2()); + + s += drawShape(Line, this->path(path)); + } + + writeToFile(s); +} + +void QTeXPaintEngine::drawPolygon ( const QPointF * points, int pointCount, PolygonDrawMode mode ) +{ + if (emptyStringOperation()) + return; + + QVector pts; + for (int i = 0; i < pointCount; i++) + pts << points[i]; + + QPainterPath path; + path.addPolygon(QPolygonF(pts)); + if (mode != QPaintEngine::PolylineMode) + path.closeSubpath (); + + QString s;; + if (mode != QPaintEngine::PolylineMode){ + path.closeSubpath (); + s += drawShape(Polygon, this->path(path)); + } else + s += drawShape(Polyline, this->path(path)); + + writeToFile(s); +} + +void QTeXPaintEngine::drawTextItem ( const QPointF & p, const QTextItem & textItem ) +{ + QString s = QString::null; + if (addNewPenColor()){ + s = color(painter()->pen().color()); + d_current_color = painter()->pen().color(); + } + + QMatrix m = painter()->worldMatrix(); + + s += "\\pgftext["; + + QPointF origin = p; + switch(d_horizontal_alignment){ + case Qt::AlignLeft: + s += "left"; + break; + + case Qt::AlignHCenter: + case Qt::AlignJustify: + origin = QPointF(p.x() + 0.5*textItem.width(), p.y()); + s += "center"; + break; + + case Qt::AlignRight: + origin = QPointF(p.x() + textItem.width(), p.y()); + s += "right"; + break; + + default: + break; + } + + s += ", base, at="; + s += pgfPoint(convertPoint(m.map(origin))); + + if (painter()->transform().isRotating ()){ + double angle = 180.0/M_PI*acos(m.m11()); + if (m.m11() != 0.0 && m.m12() > 0) + angle = -angle; + s += ",rotate=" + QString::number(angle); + } + s += "]{"; + + QFont f = textItem.font(); + if (d_font_size) + s += "\\fontsize{" + QString::number(int(f.pointSizeF())) + "}{0}\\selectfont{"; + + if (f.underline()) + s += "\\underline{"; + if (f.italic()) + s += "\\textit{"; + if (f.bold()) + s += "\\textbf{"; + if (f.strikeOut()) + s += "\\sout{"; + + QString text = textItem.text(); + text.remove(QRegExp("~\\")); + if (d_escape_text){ + text.replace("$", "\\$"); + text.replace("_", "\\_"); + text.replace("{", "\\{"); + text.replace("}", "\\}"); + text.replace("^", "\\^"); + text.replace("&", "\\&"); + text.replace("%", "\\%"); + text.replace("#", "\\#"); + } + + s += text; + if (d_font_size) + s += "}"; + + if (f.italic()) + s += "}"; + if (f.bold()) + s += "}"; + if (f.underline()) + s += "}"; + if (f.strikeOut()) + s += "}"; + + s += "}\n"; + + writeToFile(s); +} + +void QTeXPaintEngine::drawRects ( const QRectF * rects, int rectCount ) +{ + if (emptyStringOperation()) + return; + + QString s; + for (int i = 0; i < rectCount; i++){ + QPainterPath path; + path.addPolygon(QPolygonF(rects[i])); + s += drawShape(Path, this->path(path)); + } + + writeToFile(s); +} + +void QTeXPaintEngine::drawEllipse ( const QRectF & rect ) +{ + if (emptyStringOperation()) + return; + + QPointF p = painter()->worldMatrix().map(rect.bottomLeft()); + + QString path; + if (d_pgf_mode){ + path = pgfPoint(convertPoint(QPointF(p.x() + 0.5*rect.width(), p.y() - 0.5*rect.height()))); + path += pgfPoint(QPointF(0, 0.5*rect.height()*resFactorY())); + path += pgfPoint(QPointF(0.5*rect.width()*resFactorX(), 0)) + "\n"; + } else { + path = tikzPoint(convertPoint(QPointF(p.x() + 0.5*rect.width(), p.y() - 0.5*rect.height()))); + path += " ellipse ("; + QString u = unit(); + path += QString::number(0.5*rect.width()*resFactorX()) + u + " and "; + path += QString::number(0.5*rect.height()*resFactorY()) + u + ");\n"; + } + + writeToFile(drawShape(Ellipse, path)); +} + +void QTeXPaintEngine::drawPath ( const QPainterPath & path ) +{ + if (emptyStringOperation()) + return; + + writeToFile(drawShape(Path, this->path(path))); +} + +QString QTeXPaintEngine::drawPgfShape(Shape shape, const QString & path) +{ + if (path.isEmpty()) + return QString::null; + + QString stroke_command = path + "\\pgfstroke\n"; + QString fill_command = path + "\\pgffill\n"; + switch(shape){ + case Line: + case Polygon: + case Polyline: + case Path: + case Points: + break; + + case Rect: + stroke_command = "\\pgfrect[stroke]" + path; + fill_command = "\\pgfrect[fill]" + path; + break; + + case Ellipse: + stroke_command = "\\pgfellipse[stroke]" + path; + fill_command = "\\pgfellipse[fill]" + path; + break; + } + + QString s = QString::null; + if (shape != Line && shape != Polyline && painter()->brush().style() != Qt::NoBrush){ + // fill the background + s += pgfBrush(painter()->brush()); + s += fill_command; + } + + if (painter()->pen().style() != Qt::NoPen){// draw the contour + s += pgfPen(painter()->pen()); + s += stroke_command; + } + + return s; +} + +QString QTeXPaintEngine::drawShape(Shape shape, const QString & path) +{ + if (d_pgf_mode) + return drawPgfShape(shape, path); + + return drawTikzShape(shape, path); +} + +QString QTeXPaintEngine::drawTikzShape(Shape shape, const QString & path) +{ + QString s = QString::null; + if (path.isEmpty()) + return s; + + if (shape != Line && shape != Polyline && painter()->brush().style() != Qt::NoBrush) + // fill the background + s += tikzBrush(painter()->brush()) + path; + if (painter()->pen().style() != Qt::NoPen)// draw the contour + s += tikzPen(painter()->pen()) + path; + + return s; +} + +void QTeXPaintEngine::drawImage(const QRectF & r, const QImage & image, const QRectF & sr, Qt::ImageConversionFlags flags) +{ + drawPixmap(QPixmap::fromImage(image, flags).copy(sr.toAlignedRect()), r); +} + +void QTeXPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) +{ + drawPixmap(pm.copy(sr.toAlignedRect()), r); +} + +void QTeXPaintEngine::drawPixmap(const QPixmap &pix, const QRectF &r) +{ + QFileInfo fi(*file); + + QString base = fi.baseName() + "-images-"; + base += QDateTime::currentDateTime().toString("ddMMyy-hhmmss"); + if (!fi.dir().exists(base)){ + if (!fi.dir().mkdir(base)) + return; + } + + QString name = fi.dir().absolutePath(); + name += "/" + base + "/image" + QString::number(d_pixmap_index); + name = QDir::cleanPath(name); + if (!pix.save(name + ".png", "PNG")) + return; + + d_pixmap_index++; + + QTextStream t(file); + t.setCodec("UTF-8"); + + t << "\\pgfputat"; + t << pgfPoint(convertPoint(painter()->worldMatrix().map(r.bottomLeft()))); + t << "{\\pgfimage[interpolate=false,width="; + + QString u = unit(); + t << QString::number(r.width()*resFactorX()) + u + ",height="; + t << QString::number(r.height()*resFactorY()) + u + "]{"; + t << name; + t << "}}\n"; +} + +QString QTeXPaintEngine::clipPath() +{ + if (painter()->hasClipping()){ + QPainterPath path = painter()->clipPath().simplified(); + if (path.elementCount() > 1000)//latex has a limited main memory size + return QString::null; + + if (d_pgf_mode) + return pgfPath(path) + "\\pgfclip\n"; + else + return "\\clip" + tikzPath(path); + } + return QString::null; +} + +QString QTeXPaintEngine::defineColor(const QColor& c, const QString& name) +{ + QString col = "\\definecolor{" + name + "}{"; + if (d_gray_scale){ + col += "gray}{"; + double gray = qGray(c.rgb())/255.0; + col += QString::number(gray) + "}\n"; + } else { + col += "rgb}{"; + col += QString::number(c.redF()) + ","; + col += QString::number(c.greenF()) + ","; + col += QString::number(c.blueF()) + "}\n"; + } + return col; +} + +QString QTeXPaintEngine::tikzBrush(const QBrush& brush) +{ + QString options = QString::null; + if (addNewPatternColor()){ + options = defineColor(brush.color(), "c"); + d_pattern_color = brush.color(); + } + + options += "\\fill [pattern color=c, pattern="; + + switch(brush.style()){ + case Qt::NoBrush: + return QString::null; + break; + + case Qt::SolidPattern: + { + QString s = QString::null; + if (addNewBrushColor()){ + d_current_color = brush.color(); + s = color(brush.color()); + } + + s += "\\fill"; + + double alpha = painter()->brush().color().alphaF(); + if(alpha > 0.0 && alpha < 1.0) + s += "[opacity=" + QString::number(alpha) + "]"; + + return s; + } + break; + + case Qt::Dense1Pattern: + case Qt::Dense2Pattern: + case Qt::Dense3Pattern: + case Qt::Dense4Pattern: + options += "crosshatch dots"; + break; + + case Qt::Dense5Pattern: + case Qt::Dense6Pattern: + case Qt::Dense7Pattern: + options += "dots"; + break; + + case Qt::HorPattern: + options += "horizontal lines"; + break; + case Qt::VerPattern: + options += "vertical lines"; + break; + case Qt::CrossPattern: + options += "grid"; + break; + case Qt::BDiagPattern: + options += "north east lines"; + break; + case Qt::FDiagPattern: + options += "north west lines"; + break; + case Qt::DiagCrossPattern: + options += "crosshatch"; + break; + + case Qt::LinearGradientPattern: + { + const QLinearGradient *qtgradient = (const QLinearGradient *)brush.gradient(); + QGradientStops stops = qtgradient->stops(); + + QString lc = defineColor(stops.first().second, "lc"); + QString rc = defineColor(stops.last().second, "rc"); + + QMatrix m = painter()->worldMatrix(); + QPointF sp = m.map(qtgradient->start()); + QPointF ep = m.map(qtgradient->finalStop()); + + options = lc + rc + "\\fill ["; + options += "left color=lc, "; + options += "right color=rc, "; + options += "shading angle=" + QString::number(-QLineF(sp, ep).angle()); + } + break; + + case Qt::RadialGradientPattern: + { + const QRadialGradient *qtgradient = (const QRadialGradient *)brush.gradient(); + QGradientStops stops = qtgradient->stops(); + + QString colors; + int count = stops.count(); + colors += defineColor(stops[0].second, "c1"); + colors += defineColor(stops[count - 1].second, "c2"); + + /*for (int i = 0; i < count; i++){ + QGradientStop stop = stops[i]; + colors += defineColor(stop.second, "c" + QString::number(i + 1)); + }*/ + + options = colors + "\\fill ["; + options += "inner color=c1, "; + options += "outer color=c2, "; + options += "shading=radial"; + qWarning("QTeXEngine: Uncentered Qt::RadialGradientPattern with more than two colors not supported."); + + } + break; + + case Qt::ConicalGradientPattern: + { + qWarning("QTeXEngine: Qt::ConicalGradientPattern is not supported."); + return QString::null; + } + break; + + default: + break; + } + return options + "]"; +} + +QString QTeXPaintEngine::pgfBrush(const QBrush& brush) +{ + QString s = QString::null; + QColor c = brush.color(); + QString col = defineColor(c, "c"); + QString command = "\\pgfsetfillpattern{"; + switch(brush.style()){ + case Qt::NoBrush: + break; + + case Qt::SolidPattern: + s += color(c); + break; + + case Qt::Dense1Pattern: + case Qt::Dense2Pattern: + case Qt::Dense3Pattern: + case Qt::Dense4Pattern: + s += col + command + "crosshatch dots}{c}\n"; + break; + + case Qt::Dense5Pattern: + case Qt::Dense6Pattern: + case Qt::Dense7Pattern: + s += col + command + "dots}{c}\n"; + break; + + case Qt::HorPattern: + s += col + command + "horizontal lines}{c}\n"; + break; + case Qt::VerPattern: + s += col + command + "vertical lines}{c}\n"; + break; + case Qt::CrossPattern: + s += col + command + "grid}{c}\n"; + break; + case Qt::BDiagPattern: + s += col + command + "north east lines}{c}\n"; + break; + case Qt::FDiagPattern: + s += col + command + "north west lines}{c}\n"; + break; + case Qt::DiagCrossPattern: + s += col + command + "crosshatch}{c}\n"; + break; + + default: + break; + } + return s; +} + +QString QTeXPaintEngine::path(const QPainterPath & path) +{ + if (path.isEmpty ()) + return QString::null; + + if (d_pgf_mode) + return pgfPath(path); + + return tikzPath(path); +} + +QString QTeXPaintEngine::pgfPath(const QPainterPath & path) +{ + QString s = QString::null; + int points = path.elementCount(); + QMatrix m = painter()->worldMatrix(); + int curvePoints = 0; + for (int i = 0; i < points; i++){ + QPainterPath::Element el = path.elementAt(i); + QPointF p = m.map(QPointF(el.x, el.y)); + + switch(el.type){ + case QPainterPath::MoveToElement: + s += "\\pgfmoveto" + pgfPoint(convertPoint(p)) + "\n"; + break; + + case QPainterPath::LineToElement: + s += "\\pgflineto" + pgfPoint(convertPoint(p)) + "\n"; + break; + + case QPainterPath::CurveToElement: + s += "\\pgfcurveto" + pgfPoint(convertPoint(p)); + curvePoints = 0; + break; + + case QPainterPath::CurveToDataElement: + s += pgfPoint(convertPoint(p)); + curvePoints++; + if (curvePoints == 2) + s += "\n"; + break; + } + } + return s; +} + +QString QTeXPaintEngine::tikzPath(const QPainterPath & path) +{ + QString s = QString::null; + if (path.isEmpty()) + return s; + + int points = path.elementCount(); + QMatrix m = painter()->worldMatrix(); + int curvePoints = 0; + for (int i = 0; i < points; i++){ + QPainterPath::Element el = path.elementAt(i); + QPointF p = m.map(QPointF(el.x, el.y)); + switch(el.type){ + case QPainterPath::MoveToElement: + s += tikzPoint(convertPoint(p)); + break; + + case QPainterPath::LineToElement: + s += " -- " + tikzPoint(convertPoint(p)); + break; + + case QPainterPath::CurveToElement: + s += " .. controls " + tikzPoint(convertPoint(p)); + curvePoints = 0; + break; + + case QPainterPath::CurveToDataElement: + curvePoints++; + if (curvePoints == 1) + s += " and " + tikzPoint(convertPoint(p)); + else if (curvePoints == 2) + s += " .. " + tikzPoint(convertPoint(p)); + break; + } + } + return s + ";\n"; +} + +QPointF QTeXPaintEngine::convertPoint( const QPointF& p) +{ + return QPointF(resFactorX()*p.x(), paintDevice()->height() - resFactorY()*p.y()); +} + +double QTeXPaintEngine::unitFactor() +{ + double factor = 1.0; + switch (d_unit){ + case QTeXPaintDevice::pt: + factor = 72.27; + break; + case QTeXPaintDevice::bp: + factor = 72; + break; + case QTeXPaintDevice::mm: + factor = 25.4; + break; + case QTeXPaintDevice::cm: + factor = 2.54; + break; + case QTeXPaintDevice::in: + case QTeXPaintDevice::ex: + case QTeXPaintDevice::em: + break; + } + return factor; +} + +double QTeXPaintEngine::resFactorX() +{ + return unitFactor()/(double)paintDevice()->logicalDpiX(); +} + +double QTeXPaintEngine::resFactorY() +{ + return unitFactor()/(double)paintDevice()->logicalDpiY(); +} + +QString QTeXPaintEngine::pgfPoint( const QPointF& p) +{ + QString u = unit(); + QString s = "{\\pgfpoint{" + QString::number(p.x()); + s += u + "}{" + QString::number(p.y()) + u + "}}"; + return s; +} + +QString QTeXPaintEngine::tikzPoint(const QPointF & p) +{ + QString u = unit(); + QString s = "(" + QString::number(p.x()); + s += u + "," + QString::number(p.y()) + u + ")"; + return s; +} + +QString QTeXPaintEngine::color( const QColor& col) +{ + QString s = "\\color["; + if (d_gray_scale){ + s += "gray]{"; + double gray = qGray(col.rgb())/255.0; + s += QString::number(gray) + "}\n"; + } else { + s += "rgb]{"; + s += QString::number(col.redF()) + ","; + s += QString::number(col.greenF()) + ","; + s += QString::number(col.blueF()) + "}\n"; + } + + return s; +} + +QString QTeXPaintEngine::pgfPen(const QPen& pen) +{ + QString s = QString::null; + if (pen.style() == Qt::NoPen) + return s; + + s += color(pen.color()); + s += "\\pgfsetlinewidth{" + QString::number(painter()->pen().widthF()) + "pt}\n"; + + QString aux = "\\pgfsetdash{"; + QString term = "}{0cm}\n"; + + double space_length = 0.08*pen.widthF(); + double dot_length = 0.3*space_length; + double dash_length = 1.5*space_length; + + QString dash = "{" + QString::number(dash_length) + "cm}"; + QString dot = "{" + QString::number(dot_length) + "cm}"; + QString space = "{" + QString::number(space_length) + "cm}"; + + switch (pen.style()){ + case Qt::SolidLine: + break; + case Qt::DashLine: + s += aux + dash + space + term; + break; + case Qt::DotLine: + s += aux + dot + space + term; + break; + case Qt::DashDotLine: + s += aux + dash + space + dot + space + term; + break; + case Qt::DashDotDotLine: + s += aux + dash + space + dot + space + dot + space + term; + break; + + case Qt::CustomDashLine: + { + s += aux; + QVector pattern = pen.dashPattern(); + int count = pattern.count(); + QString u = unit(); + for (int i = 0; i < count; i++) + s += "{" + QString::number(pattern[i]) + u + "}"; + + s += term; + break; + } + + default: + break; + } + + switch (pen.joinStyle()){ + case Qt::MiterJoin: + s += "\\pgfsetmiterjoin\n"; + //s += "\\pgfsetmiterlimit{" + QString::number(pen.miterLimit()) + "pt}\n"; + break; + case Qt::BevelJoin: + s += "\\pgfsetbeveljoin\n"; + break; + case Qt::RoundJoin: + s += "\\pgfsetroundjoin\n"; + break; + case Qt::SvgMiterJoin: + s += "\\pgfsetmiterjoin\n"; + break; + default: + break; + } + + switch (pen.capStyle()){ + case Qt::FlatCap: + s += "\\pgfsetrectcap\n"; + break; + case Qt::SquareCap: + s += "\\pgfsetrectcap\n"; + break; + case Qt::RoundCap: + s += "\\pgfsetroundcap\n"; + break; + default: + break; + } + + return s; +} + +QString QTeXPaintEngine::tikzPen(const QPen& pen) +{ + if (pen.style() == Qt::NoPen) + return QString::null; + + QString col = QString::null; + if (addNewPenColor()){ + col = color(pen.color()); + d_current_color = pen.color(); + } + + QString options = "[line width="; + options += QString::number(painter()->pen().widthF()) + "pt, "; + + double space_length = 0.08*pen.widthF(); + double dot_length = 0.3*space_length; + double dash_length = 1.5*space_length; + + QString dash = "on " + QString::number(dash_length) + "cm"; + QString dot = "on " + QString::number(dot_length) + "cm"; + QString space = " off " + QString::number(space_length) + "cm"; + + QString aux = "dash pattern="; + QString term = ", dash phase=0pt, "; + switch (pen.style()){ + case Qt::SolidLine: + break; + case Qt::DashLine: + options += aux + dash + space + term; + break; + case Qt::DotLine: + options += aux + dot + space + term; + break; + case Qt::DashDotLine: + options += aux + dash + space + dot + space + term; + break; + case Qt::DashDotDotLine: + options += aux + dash + space + dot + space + dot + space + term; + break; + + case Qt::CustomDashLine: + { + options += aux; + QVector pattern = pen.dashPattern(); + int count = pattern.count(); + QString u = unit(); + for (int i = 0; i < count; i++){ + QString s = "on "; + if (i%2) + s = " off "; + options += s + QString::number(pattern[i]) + u; + } + + options += term; + break; + } + + default: + break; + } + + options += "line join="; + switch (pen.joinStyle()){ + case Qt::MiterJoin: + options += "miter, "; + break; + case Qt::BevelJoin: + options += "bevel, "; + break; + case Qt::RoundJoin: + options += "round, "; + break; + case Qt::SvgMiterJoin: + options += "miter, "; + break; + default: + break; + } + + options += "line cap="; + switch (pen.capStyle()){ + case Qt::FlatCap: + options += "rect]"; + break; + case Qt::SquareCap: + options += "rect]"; + break; + case Qt::RoundCap: + options += "round]"; + break; + default: + break; + } + + return col + "\\draw" + options; +} + +QString QTeXPaintEngine::indentString(const QString& s) +{ + QStringList lst = s.split("\n", QString::SkipEmptyParts); + for(int i = 0; i < lst.count(); i++) + lst[i].prepend("\t"); + + return lst.join("\n") + "\n"; +} + +QString QTeXPaintEngine::beginScope() +{ + QString s = "\\begin{scope}\n"; + if (d_pgf_mode) + s = "\\begin{pgfscope}\n"; + + if (painter()->hasClipping()){ + QString clip = clipPath(); + if (!clip.isEmpty()) + s += indentString(clip); + } + + d_pattern_color = QColor(); + d_current_color = QColor(); + return s; +} + +QString QTeXPaintEngine::endScope() +{ + if (d_pgf_mode) + return "\\end{pgfscope}\n"; + + return "\\end{scope}\n"; +} + +void QTeXPaintEngine::writeToFile(const QString& s) +{ + QTextStream t(file); + t.setCodec("UTF-8"); + + if (d_pgf_mode){ + t << beginScope(); + t << indentString(s); + t << endScope(); + return; + } + + QString scope; + if (d_open_scope) + scope = endScope(); + + if (changedClipping()){ + scope += beginScope(); + scope += indentString(s); + t << scope; + + d_open_scope = true; + + if (painter()->hasClipping()) + d_clip_path = painter()->clipPath(); + else + d_clip_path = QPainterPath(); + } else + t << indentString(s); +} + +bool QTeXPaintEngine::emptyStringOperation() +{ + if ((painter()->brush().style() == Qt::NoBrush || + (painter()->brush().color().alpha() == 0)) && + painter()->pen().style() == Qt::NoPen) + return true; + + return false; +} + +bool QTeXPaintEngine::changedClipping() +{ + QPainterPath clipPath = QPainterPath(); + if (painter()->hasClipping()){ + if (painter()->clipPath().elementCount() > 1000) + return false; + clipPath = painter()->clipPath(); + } + + if (clipPath != d_clip_path) + return true; + + return false; +} + +bool QTeXPaintEngine::addNewPatternColor() +{ + Qt::BrushStyle style = painter()->brush().style(); + if (style <= Qt::SolidPattern || style >= Qt::LinearGradientPattern) + return false; + + if (!d_pattern_color.isValid() || + d_pattern_color != painter()->brush().color()) + return true; + + return false; +} + +bool QTeXPaintEngine::addNewBrushColor() +{ + if (!d_current_color.isValid() || changedClipping() || + d_current_color.name() != painter()->brush().color().name()) + return true; + + return false; +} + +bool QTeXPaintEngine::addNewPenColor() +{ + if (!d_current_color.isValid() || + (changedClipping() && painter()->brush().style() == Qt::NoBrush) || + d_current_color.name() != painter()->pen().color().name()) + return true; + + return false; +} + +QString QTeXPaintEngine::unit() +{ + switch (d_unit){ + case QTeXPaintDevice::pt: + return "pt"; + break; + case QTeXPaintDevice::bp: + return "bp"; + break; + case QTeXPaintDevice::mm: + return "mm"; + break; + case QTeXPaintDevice::cm: + return "cm"; + break; + case QTeXPaintDevice::in: + return "in"; + break; + case QTeXPaintDevice::ex: + return "ex"; + break; + case QTeXPaintDevice::em: + return "em"; + break; + } + return "pt"; +} diff --git a/test/jkqtplot_test/QTeXEngine/src/src.pro b/examples/jkqtplot_test/QTeXEngine/src/src.pro similarity index 95% rename from test/jkqtplot_test/QTeXEngine/src/src.pro rename to examples/jkqtplot_test/QTeXEngine/src/src.pro index b970080df1..a91375605d 100644 --- a/test/jkqtplot_test/QTeXEngine/src/src.pro +++ b/examples/jkqtplot_test/QTeXEngine/src/src.pro @@ -1,21 +1,21 @@ -# qmake project file for building the QTeXEngine libraries - -include( ../config.pri ) - -TARGET = QTeXEngine -TEMPLATE = lib - -MOC_DIR = ../tmp -OBJECTS_DIR = ../tmp -DESTDIR = ../ - -contains(CONFIG, QTeXEngineDll) { - CONFIG += dll - DEFINES += QTEXENGINE_DLL QTEXENGINE_DLL_BUILD -} else { - CONFIG += staticlib -} - -HEADERS = QTeXEngine.h -SOURCES += QTeXPaintEngine.cpp -SOURCES += QTeXPaintDevice.cpp +# qmake project file for building the QTeXEngine libraries + +include( ../config.pri ) + +TARGET = QTeXEngine +TEMPLATE = lib + +MOC_DIR = ../tmp +OBJECTS_DIR = ../tmp +DESTDIR = ../ + +contains(CONFIG, QTeXEngineDll) { + CONFIG += dll + DEFINES += QTEXENGINE_DLL QTEXENGINE_DLL_BUILD +} else { + CONFIG += staticlib +} + +HEADERS = QTeXEngine.h +SOURCES += QTeXPaintEngine.cpp +SOURCES += QTeXPaintDevice.cpp diff --git a/test/jkqtplot_test/QTeXEngine/test/machines.tif b/examples/jkqtplot_test/QTeXEngine/test/machines.tif similarity index 100% rename from test/jkqtplot_test/QTeXEngine/test/machines.tif rename to examples/jkqtplot_test/QTeXEngine/test/machines.tif diff --git a/test/jkqtplot_test/QTeXEngine/test/test.cpp b/examples/jkqtplot_test/QTeXEngine/test/test.cpp similarity index 99% rename from test/jkqtplot_test/QTeXEngine/test/test.cpp rename to examples/jkqtplot_test/QTeXEngine/test/test.cpp index d0cf1c9ec6..f4fc71266a 100644 --- a/test/jkqtplot_test/QTeXEngine/test/test.cpp +++ b/examples/jkqtplot_test/QTeXEngine/test/test.cpp @@ -46,14 +46,14 @@ public: int main(int argc, char **argv) { QApplication app(argc, argv); GraphicsView view; - view.show(); + view.show(); - QTeXPaintDevice tex("test.tex", view.scene()->sceneRect().size().toSize()); - tex.setOutputMode(QTeXPaintDevice::Pgf); - tex.setDocumentMode(); + QTeXPaintDevice tex("test.tex", view.scene()->sceneRect().size().toSize()); + tex.setOutputMode(QTeXPaintDevice::Pgf); + tex.setDocumentMode(); QPainter painter(&tex); view.scene()->render(&painter); painter.end(); return app.exec(); -} +} diff --git a/test/jkqtplot_test/QTeXEngine/test/test.pro b/examples/jkqtplot_test/QTeXEngine/test/test.pro similarity index 94% rename from test/jkqtplot_test/QTeXEngine/test/test.pro rename to examples/jkqtplot_test/QTeXEngine/test/test.pro index 715df6b345..20efcc0cde 100644 --- a/test/jkqtplot_test/QTeXEngine/test/test.pro +++ b/examples/jkqtplot_test/QTeXEngine/test/test.pro @@ -1,12 +1,12 @@ -TARGET = test -TEMPLATE = app -CONFIG += warn_on release thread - -MOC_DIR = ../tmp -OBJECTS_DIR = ../tmp -DESTDIR = ./ - -INCLUDEPATH += ../src -LIBS += ../libQTeXEngine.a - -SOURCES += test.cpp +TARGET = test +TEMPLATE = app +CONFIG += warn_on release thread + +MOC_DIR = ../tmp +OBJECTS_DIR = ../tmp +DESTDIR = ./ + +INCLUDEPATH += ../src +LIBS += ../libQTeXEngine.a + +SOURCES += test.cpp diff --git a/test/jkqtplot_test/QTeXEngine/test/thermal.tif b/examples/jkqtplot_test/QTeXEngine/test/thermal.tif similarity index 100% rename from test/jkqtplot_test/QTeXEngine/test/thermal.tif rename to examples/jkqtplot_test/QTeXEngine/test/thermal.tif diff --git a/test/jkqtplot_test/TestWidgetBarcharts.cpp b/examples/jkqtplot_test/TestWidgetBarcharts.cpp similarity index 97% rename from test/jkqtplot_test/TestWidgetBarcharts.cpp rename to examples/jkqtplot_test/TestWidgetBarcharts.cpp index 43bd462542..acc5f22803 100644 --- a/test/jkqtplot_test/TestWidgetBarcharts.cpp +++ b/examples/jkqtplot_test/TestWidgetBarcharts.cpp @@ -1,155 +1,155 @@ -#include "TestWidgetBarcharts.h" -#include -#include -#include -#include -#include "jkqtplotter/jkqtpgraphsbarchart.h" - - - - - -TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : - QWidget(parent) -{ - - - QVBoxLayout* barchartLayout=new QVBoxLayout(this); - setLayout(barchartLayout); - resize(1000, 800); - plotBarchart=new JKQtPlotter(true, this); - plotBarchart->set_doDrawing(false); - plotBarchart->get_plotter()->set_plotLabel(tr("\\textbf{bar charts}")); - plotBarchart->setObjectName("plotBarchart"); - plotBarchart->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); - plotBarchart->get_plotter()->get_xAxis()->set_labelType(JKQTPCALTdate); - plotBarchart->get_plotter()->get_xAxis()->set_tickDateFormat("dd. MMM yyyy"); - - barchartLayout->addWidget(plotBarchart); - - QVector dataBCX, dataBCXD, dataBCY1, dataBCY2, dataBCYE1, dataBCYE2; - for (int i=0; i<8; i++) { - double x=double(i); - dataBCX<getDatastore()->addCopiedColumn(dataBCX, "x"); - size_t bcpxd=plotBarchart->getDatastore()->addCopiedColumn(dataBCXD, "x_date"); - size_t bcpy1=plotBarchart->getDatastore()->addCopiedColumn(dataBCY1, "y1"); - size_t bcpye1=plotBarchart->getDatastore()->addCopiedColumn(dataBCYE1, "ye1"); - size_t bcpy2=plotBarchart->getDatastore()->addCopiedColumn(dataBCY2, "y2"); - size_t bcpye2=plotBarchart->getDatastore()->addCopiedColumn(dataBCYE2, "ye2"); - - JKQTPbarVerticalErrorGraph* plteBar1=new JKQTPbarVerticalErrorGraph(plotBarchart->get_plotter()); - plteBar1->set_title(tr("bars 1")); - plteBar1->set_xColumn(bcpxd); - plteBar1->set_yColumn(bcpy1); - plteBar1->set_yErrorColumn(bcpye1); - plteBar1->set_width(0.45); - plteBar1->set_shift(-0.25); - plotBarchart->get_plotter()->addGraph(plteBar1); - - JKQTPbarVerticalErrorGraph* plteBar2=new JKQTPbarVerticalErrorGraph(plotBarchart->get_plotter()); - plteBar2->set_xColumn(bcpxd); - plteBar2->set_yColumn(bcpy2); - plteBar2->set_yErrorColumn(bcpye2); - plteBar2->set_title(tr("bars 2")); - plteBar2->set_width(0.45); - plteBar2->set_shift(0.25); - plteBar2->set_baseline(0.5); - plteBar2->set_yErrorSymmetric(false); - plotBarchart->get_plotter()->addGraph(plteBar2); - - plteBar2->autoscaleBarWidthAndShift(); - plotBarchart->set_doDrawing(true); - plotBarchart->zoomToFit(); - - - - - plotBarchart2=new JKQtPlotter(false, this, plotBarchart->getDatastore()); - plotBarchart2->set_doDrawing(false); - plotBarchart2->get_plotter()->set_plotLabel(tr("\\textbf{bar charts}")); - plotBarchart2->setObjectName("plotBarchart2"); - plotBarchart2->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); - - barchartLayout->addWidget(plotBarchart2); - - JKQTPbarHorizontalErrorGraph* plteBar3=new JKQTPbarHorizontalErrorGraph(plotBarchart2->get_plotter()); - plteBar3->set_title(tr("bars 1")); - plteBar3->set_yColumn(bcpx); - plteBar3->set_xColumn(bcpy1); - plteBar3->set_xErrorColumn(bcpye1); - plteBar3->set_width(0.45); - plteBar3->set_shift(-0.25); - plotBarchart2->get_plotter()->addGraph(plteBar3); - - JKQTPbarHorizontalErrorGraph* plteBar4=new JKQTPbarHorizontalErrorGraph(plotBarchart2->get_plotter()); - plteBar4->set_yColumn(bcpx); - plteBar4->set_xColumn(bcpy2); - plteBar4->set_xErrorColumn(bcpye2); - plteBar4->set_title(tr("bars 2")); - plteBar4->set_width(0.45); - plteBar4->set_shift(0.25); - plteBar4->set_xErrorSymmetric(false); - plotBarchart2->get_plotter()->addGraph(plteBar4); - - plteBar4->autoscaleBarWidthAndShift(0.9, 1); - plotBarchart2->set_doDrawing(true); - plotBarchart2->zoomToFit(); - - chkBarLog=new QCheckBox(tr("log-log plots"), this); - chkBarLog->setChecked(false); - barchartLayout->addWidget(chkBarLog); - connect(chkBarLog, SIGNAL(toggled(bool)), this, SLOT(setBarchartLogLog(bool))); - - spinBarLabelAngel=new QSpinBox(this); - spinBarLabelAngel->setPrefix(tr("rotation angel: ")); - spinBarLabelAngel->setSuffix(QLatin1String("°")); - spinBarLabelAngel->setRange(-180,180); - spinBarLabelAngel->setValue(0); - spinBarLabelAngel->setSingleStep(15); - barchartLayout->addWidget(spinBarLabelAngel); - connect(spinBarLabelAngel, SIGNAL(valueChanged(int)), this, SLOT(setBarchartAngele(int))); - - spinBarLabelAngel2=new QSpinBox(this); - spinBarLabelAngel2->setPrefix(tr("rotation angel: ")); - spinBarLabelAngel2->setSuffix(QLatin1String("°")); - spinBarLabelAngel2->setRange(-180,180); - spinBarLabelAngel2->setValue(0); - spinBarLabelAngel2->setSingleStep(15); - barchartLayout->addWidget(spinBarLabelAngel2); - connect(spinBarLabelAngel2, SIGNAL(valueChanged(int)), this, SLOT(setBarchartAngele2(int))); - - -} - - -void TestWidgetBarcharts::setBarchartLogLog(bool checked) -{ - plotBarchart->get_xAxis()->set_logAxis(checked); - plotBarchart->get_yAxis()->set_logAxis(checked); - plotBarchart->zoomToFit(); - plotBarchart2->get_xAxis()->set_logAxis(checked); - plotBarchart2->get_yAxis()->set_logAxis(checked); - plotBarchart2->zoomToFit(); -} - -void TestWidgetBarcharts::setBarchartAngele(int angle) -{ - plotBarchart->get_xAxis()->set_tickLabelAngle(angle); - plotBarchart->get_xAxis()->set_drawMode2(JKQTPCADMcomplete); -} - -void TestWidgetBarcharts::setBarchartAngele2(int angle) -{ - plotBarchart->get_yAxis()->set_tickLabelAngle(angle); - plotBarchart->get_yAxis()->set_drawMode2(JKQTPCADMcomplete); -} +#include "TestWidgetBarcharts.h" +#include +#include +#include +#include +#include "jkqtplotter/jkqtpgraphsbarchart.h" + + + + + +TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : + QWidget(parent) +{ + + + QVBoxLayout* barchartLayout=new QVBoxLayout(this); + setLayout(barchartLayout); + resize(1000, 800); + plotBarchart=new JKQtPlotter(true, this); + plotBarchart->set_doDrawing(false); + plotBarchart->get_plotter()->set_plotLabel(tr("\\textbf{bar charts}")); + plotBarchart->setObjectName("plotBarchart"); + plotBarchart->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); + plotBarchart->get_plotter()->get_xAxis()->set_labelType(JKQTPCALTdate); + plotBarchart->get_plotter()->get_xAxis()->set_tickDateFormat("dd. MMM yyyy"); + + barchartLayout->addWidget(plotBarchart); + + QVector dataBCX, dataBCXD, dataBCY1, dataBCY2, dataBCYE1, dataBCYE2; + for (int i=0; i<8; i++) { + double x=double(i); + dataBCX<getDatastore()->addCopiedColumn(dataBCX, "x"); + size_t bcpxd=plotBarchart->getDatastore()->addCopiedColumn(dataBCXD, "x_date"); + size_t bcpy1=plotBarchart->getDatastore()->addCopiedColumn(dataBCY1, "y1"); + size_t bcpye1=plotBarchart->getDatastore()->addCopiedColumn(dataBCYE1, "ye1"); + size_t bcpy2=plotBarchart->getDatastore()->addCopiedColumn(dataBCY2, "y2"); + size_t bcpye2=plotBarchart->getDatastore()->addCopiedColumn(dataBCYE2, "ye2"); + + JKQTPbarVerticalErrorGraph* plteBar1=new JKQTPbarVerticalErrorGraph(plotBarchart->get_plotter()); + plteBar1->set_title(tr("bars 1")); + plteBar1->set_xColumn(bcpxd); + plteBar1->set_yColumn(bcpy1); + plteBar1->set_yErrorColumn(bcpye1); + plteBar1->set_width(0.45); + plteBar1->set_shift(-0.25); + plotBarchart->get_plotter()->addGraph(plteBar1); + + JKQTPbarVerticalErrorGraph* plteBar2=new JKQTPbarVerticalErrorGraph(plotBarchart->get_plotter()); + plteBar2->set_xColumn(bcpxd); + plteBar2->set_yColumn(bcpy2); + plteBar2->set_yErrorColumn(bcpye2); + plteBar2->set_title(tr("bars 2")); + plteBar2->set_width(0.45); + plteBar2->set_shift(0.25); + plteBar2->set_baseline(0.5); + plteBar2->set_yErrorSymmetric(false); + plotBarchart->get_plotter()->addGraph(plteBar2); + + plteBar2->autoscaleBarWidthAndShift(); + plotBarchart->set_doDrawing(true); + plotBarchart->zoomToFit(); + + + + + plotBarchart2=new JKQtPlotter(false, this, plotBarchart->getDatastore()); + plotBarchart2->set_doDrawing(false); + plotBarchart2->get_plotter()->set_plotLabel(tr("\\textbf{bar charts}")); + plotBarchart2->setObjectName("plotBarchart2"); + plotBarchart2->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); + + barchartLayout->addWidget(plotBarchart2); + + JKQTPbarHorizontalErrorGraph* plteBar3=new JKQTPbarHorizontalErrorGraph(plotBarchart2->get_plotter()); + plteBar3->set_title(tr("bars 1")); + plteBar3->set_yColumn(bcpx); + plteBar3->set_xColumn(bcpy1); + plteBar3->set_xErrorColumn(bcpye1); + plteBar3->set_width(0.45); + plteBar3->set_shift(-0.25); + plotBarchart2->get_plotter()->addGraph(plteBar3); + + JKQTPbarHorizontalErrorGraph* plteBar4=new JKQTPbarHorizontalErrorGraph(plotBarchart2->get_plotter()); + plteBar4->set_yColumn(bcpx); + plteBar4->set_xColumn(bcpy2); + plteBar4->set_xErrorColumn(bcpye2); + plteBar4->set_title(tr("bars 2")); + plteBar4->set_width(0.45); + plteBar4->set_shift(0.25); + plteBar4->set_xErrorSymmetric(false); + plotBarchart2->get_plotter()->addGraph(plteBar4); + + plteBar4->autoscaleBarWidthAndShift(0.9, 1); + plotBarchart2->set_doDrawing(true); + plotBarchart2->zoomToFit(); + + chkBarLog=new QCheckBox(tr("log-log plots"), this); + chkBarLog->setChecked(false); + barchartLayout->addWidget(chkBarLog); + connect(chkBarLog, SIGNAL(toggled(bool)), this, SLOT(setBarchartLogLog(bool))); + + spinBarLabelAngel=new QSpinBox(this); + spinBarLabelAngel->setPrefix(tr("rotation angel: ")); + spinBarLabelAngel->setSuffix(QLatin1String("°")); + spinBarLabelAngel->setRange(-180,180); + spinBarLabelAngel->setValue(0); + spinBarLabelAngel->setSingleStep(15); + barchartLayout->addWidget(spinBarLabelAngel); + connect(spinBarLabelAngel, SIGNAL(valueChanged(int)), this, SLOT(setBarchartAngele(int))); + + spinBarLabelAngel2=new QSpinBox(this); + spinBarLabelAngel2->setPrefix(tr("rotation angel: ")); + spinBarLabelAngel2->setSuffix(QLatin1String("°")); + spinBarLabelAngel2->setRange(-180,180); + spinBarLabelAngel2->setValue(0); + spinBarLabelAngel2->setSingleStep(15); + barchartLayout->addWidget(spinBarLabelAngel2); + connect(spinBarLabelAngel2, SIGNAL(valueChanged(int)), this, SLOT(setBarchartAngele2(int))); + + +} + + +void TestWidgetBarcharts::setBarchartLogLog(bool checked) +{ + plotBarchart->get_xAxis()->set_logAxis(checked); + plotBarchart->get_yAxis()->set_logAxis(checked); + plotBarchart->zoomToFit(); + plotBarchart2->get_xAxis()->set_logAxis(checked); + plotBarchart2->get_yAxis()->set_logAxis(checked); + plotBarchart2->zoomToFit(); +} + +void TestWidgetBarcharts::setBarchartAngele(int angle) +{ + plotBarchart->get_xAxis()->set_tickLabelAngle(angle); + plotBarchart->get_xAxis()->set_drawMode2(JKQTPCADMcomplete); +} + +void TestWidgetBarcharts::setBarchartAngele2(int angle) +{ + plotBarchart->get_yAxis()->set_tickLabelAngle(angle); + plotBarchart->get_yAxis()->set_drawMode2(JKQTPCADMcomplete); +} diff --git a/test/jkqtplot_test/TestWidgetBarcharts.h b/examples/jkqtplot_test/TestWidgetBarcharts.h similarity index 95% rename from test/jkqtplot_test/TestWidgetBarcharts.h rename to examples/jkqtplot_test/TestWidgetBarcharts.h index cdf11cae57..d2b7fec2df 100644 --- a/test/jkqtplot_test/TestWidgetBarcharts.h +++ b/examples/jkqtplot_test/TestWidgetBarcharts.h @@ -1,59 +1,59 @@ -#ifndef TestWidgetBarcharts_H -#define TestWidgetBarcharts_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottertools/jkqtptools.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetBarcharts : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetBarcharts(QWidget *parent = 0); - - signals: - - public slots: - - - void setBarchartLogLog(bool checked); - void setBarchartAngele(int angel); - void setBarchartAngele2(int angel); - - protected: - - - JKQtPlotter* plotBarchart; - JKQtPlotter* plotBarchart2; - QCheckBox* chkBarLog; - QSpinBox* spinBarLabelAngel; - QSpinBox* spinBarLabelAngel2; - - - - -}; - - -#endif // TestWidgetBarcharts_H +#ifndef TestWidgetBarcharts_H +#define TestWidgetBarcharts_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottertools/jkqtptools.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetBarcharts : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetBarcharts(QWidget *parent = 0); + + signals: + + public slots: + + + void setBarchartLogLog(bool checked); + void setBarchartAngele(int angel); + void setBarchartAngele2(int angel); + + protected: + + + JKQtPlotter* plotBarchart; + JKQtPlotter* plotBarchart2; + QCheckBox* chkBarLog; + QSpinBox* spinBarLabelAngel; + QSpinBox* spinBarLabelAngel2; + + + + +}; + + +#endif // TestWidgetBarcharts_H diff --git a/test/jkqtplot_test/TestWidgetContourPlots.cpp b/examples/jkqtplot_test/TestWidgetContourPlots.cpp similarity index 97% rename from test/jkqtplot_test/TestWidgetContourPlots.cpp rename to examples/jkqtplot_test/TestWidgetContourPlots.cpp index 0acbe1c779..1bed3f0f99 100644 --- a/test/jkqtplot_test/TestWidgetContourPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetContourPlots.cpp @@ -1,120 +1,120 @@ -#include "TestWidgetContourPlots.h" -#include -#include -#include -#include - - - - - -TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : - QWidget(parent) -{ - - - // contour plot - QHBoxLayout* layoutContour=new QHBoxLayout(this); - setLayout(layoutContour); - JKQtPlotter* plotContour=new JKQtPlotter(true, this); - plotContour->set_doDrawing(false); - plotContour->get_plotter()->set_plotLabel(tr("\\textbf{hist contour plot}")); - plotContour->setObjectName("contour"); - plotContour->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "contour/"); - layoutContour->addWidget(plotContour); - - JKQtPlotter* plotDensity=new JKQtPlotter(true, this); - plotContour->set_doDrawing(false); - plotContour->get_plotter()->set_plotLabel(tr("\\textbf{2D histogram plot with contours}")); - plotDensity->get_plotter()->set_plotLabel(tr("\\textbf{2D histogram}")); - plotContour->setObjectName("density"); - plotContour->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "density/"); - layoutContour->addWidget(plotDensity); - - QVector histAlex; - uint histAlexNx,histAlexNy; - - // choose the test data - histAlex.clear(); - histAlex.resize(5); - histAlex.append(15.0); - histAlex.append(5); - histAlex.append(0); - histAlex.append(0); - histAlex.append(5); - histAlex.append(15); - histAlex.append(6); - histAlex.append(6); - histAlex.resize(16); - - histAlexNx=(uint)sqrt(histAlex.size()); - histAlexNy=histAlexNx; - - auto ds=plotDensity->get_plotter()->getDatastore(); - plotContour->get_plotter()->useExternalDatastore(ds); - // empty datastore and grid - plotDensity->get_plotter()->clearGraphs(true); - ds->clear(); - plotDensity->setGrid(false); - plotDensity->get_plotter()->get_xAxis()->set_axisLabel("X"); - plotDensity->get_plotter()->get_yAxis()->set_axisLabel("Y"); - - size_t colHist2D=ds->addCopiedImageAsColumn(histAlex.data(), histAlexNx, histAlexNy, tr("2Dhist")); -// size_t colContour=plotContour->getDatastore()->addCopiedImageAsColumnTranspose(histAlex.data(), histAlexNx, histAlexNy, tr("2Dhist")); - - JKQTPColumnMathImage* densityplot=new JKQTPColumnMathImage(plotDensity->get_plotter()); - densityplot->set_x(-0.1); - densityplot->set_y(-0.1); - densityplot->set_width(1.1); - densityplot->set_height(1.1); - densityplot->set_Nx(histAlexNx); - densityplot->set_Ny(histAlexNy); - densityplot->set_palette(JKQTPMathImageINVERTED_OCEAN); - densityplot->set_imageColumn(colHist2D); - densityplot->set_infColor(Qt::transparent); - densityplot->set_nanColor(Qt::transparent); - densityplot->set_title("density plot"); - plotDensity->addGraph(densityplot); - - densityplot=new JKQTPColumnMathImage(plotContour->get_plotter()); - densityplot->set_x(-0.1); - densityplot->set_y(-0.1); - densityplot->set_width(1.1); - densityplot->set_height(1.1); - densityplot->set_Nx(histAlexNx); - densityplot->set_Ny(histAlexNy); - densityplot->set_palette(JKQTPMathImageINVERTED_OCEAN); - densityplot->set_imageColumn(colHist2D); - densityplot->set_title("density plot"); - plotContour->addGraph(densityplot); - plotContour->setGrid(false); - plotDensity->zoom(-0.1,1.1,-0.1,1.1); - - QList levels; -// levels<<5<<10<<25; // levels<<5.1<<10.1; - levels<<4<<5<<9<<14; - JKQTPContour* cp=new JKQTPContour(plotContour->get_plotter()); - cp->set_x(-0.1); - cp->set_y(-0.1); - cp->set_width(1.1); - cp->set_height(1.1); - cp->set_Nx(histAlexNx); - cp->set_Ny(histAlexNy); - cp->set_imageColumn(colHist2D); -// cp->set_palette(JKQTPMathImageINVERTED_OCEAN); - cp->set_contourLevels(levels); - cp->set_title("contour plot"); - plotContour->addGraph(cp); - plotContour->zoom(-0.1,1.1,-0.1,1.1); - - plotContour->set_doDrawing(true); - plotContour->update_plot(); - - - - - - - - -} +#include "TestWidgetContourPlots.h" +#include +#include +#include +#include + + + + + +TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : + QWidget(parent) +{ + + + // contour plot + QHBoxLayout* layoutContour=new QHBoxLayout(this); + setLayout(layoutContour); + JKQtPlotter* plotContour=new JKQtPlotter(true, this); + plotContour->set_doDrawing(false); + plotContour->get_plotter()->set_plotLabel(tr("\\textbf{hist contour plot}")); + plotContour->setObjectName("contour"); + plotContour->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "contour/"); + layoutContour->addWidget(plotContour); + + JKQtPlotter* plotDensity=new JKQtPlotter(true, this); + plotContour->set_doDrawing(false); + plotContour->get_plotter()->set_plotLabel(tr("\\textbf{2D histogram plot with contours}")); + plotDensity->get_plotter()->set_plotLabel(tr("\\textbf{2D histogram}")); + plotContour->setObjectName("density"); + plotContour->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "density/"); + layoutContour->addWidget(plotDensity); + + QVector histAlex; + uint histAlexNx,histAlexNy; + + // choose the test data + histAlex.clear(); + histAlex.resize(5); + histAlex.append(15.0); + histAlex.append(5); + histAlex.append(0); + histAlex.append(0); + histAlex.append(5); + histAlex.append(15); + histAlex.append(6); + histAlex.append(6); + histAlex.resize(16); + + histAlexNx=(uint)sqrt(histAlex.size()); + histAlexNy=histAlexNx; + + auto ds=plotDensity->get_plotter()->getDatastore(); + plotContour->get_plotter()->useExternalDatastore(ds); + // empty datastore and grid + plotDensity->get_plotter()->clearGraphs(true); + ds->clear(); + plotDensity->setGrid(false); + plotDensity->get_plotter()->get_xAxis()->set_axisLabel("X"); + plotDensity->get_plotter()->get_yAxis()->set_axisLabel("Y"); + + size_t colHist2D=ds->addCopiedImageAsColumn(histAlex.data(), histAlexNx, histAlexNy, tr("2Dhist")); +// size_t colContour=plotContour->getDatastore()->addCopiedImageAsColumnTranspose(histAlex.data(), histAlexNx, histAlexNy, tr("2Dhist")); + + JKQTPColumnMathImage* densityplot=new JKQTPColumnMathImage(plotDensity->get_plotter()); + densityplot->set_x(-0.1); + densityplot->set_y(-0.1); + densityplot->set_width(1.1); + densityplot->set_height(1.1); + densityplot->set_Nx(histAlexNx); + densityplot->set_Ny(histAlexNy); + densityplot->set_palette(JKQTPMathImageINVERTED_OCEAN); + densityplot->set_imageColumn(colHist2D); + densityplot->set_infColor(Qt::transparent); + densityplot->set_nanColor(Qt::transparent); + densityplot->set_title("density plot"); + plotDensity->addGraph(densityplot); + + densityplot=new JKQTPColumnMathImage(plotContour->get_plotter()); + densityplot->set_x(-0.1); + densityplot->set_y(-0.1); + densityplot->set_width(1.1); + densityplot->set_height(1.1); + densityplot->set_Nx(histAlexNx); + densityplot->set_Ny(histAlexNy); + densityplot->set_palette(JKQTPMathImageINVERTED_OCEAN); + densityplot->set_imageColumn(colHist2D); + densityplot->set_title("density plot"); + plotContour->addGraph(densityplot); + plotContour->setGrid(false); + plotDensity->zoom(-0.1,1.1,-0.1,1.1); + + QList levels; +// levels<<5<<10<<25; // levels<<5.1<<10.1; + levels<<4<<5<<9<<14; + JKQTPContour* cp=new JKQTPContour(plotContour->get_plotter()); + cp->set_x(-0.1); + cp->set_y(-0.1); + cp->set_width(1.1); + cp->set_height(1.1); + cp->set_Nx(histAlexNx); + cp->set_Ny(histAlexNy); + cp->set_imageColumn(colHist2D); +// cp->set_palette(JKQTPMathImageINVERTED_OCEAN); + cp->set_contourLevels(levels); + cp->set_title("contour plot"); + plotContour->addGraph(cp); + plotContour->zoom(-0.1,1.1,-0.1,1.1); + + plotContour->set_doDrawing(true); + plotContour->update_plot(); + + + + + + + + +} diff --git a/test/jkqtplot_test/TestWidgetContourPlots.h b/examples/jkqtplot_test/TestWidgetContourPlots.h similarity index 95% rename from test/jkqtplot_test/TestWidgetContourPlots.h rename to examples/jkqtplot_test/TestWidgetContourPlots.h index 465deaedac..ca6bb7d522 100644 --- a/test/jkqtplot_test/TestWidgetContourPlots.h +++ b/examples/jkqtplot_test/TestWidgetContourPlots.h @@ -1,47 +1,47 @@ -#ifndef TestWidgetContourPlots_H -#define TestWidgetContourPlots_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottertools/jkqtptools.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetContourPlots : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetContourPlots(QWidget *parent = 0); - - signals: - - public slots: - - - protected: - - - -}; - - -#endif // TestWidgetContourPlots_H +#ifndef TestWidgetContourPlots_H +#define TestWidgetContourPlots_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottertools/jkqtptools.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetContourPlots : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetContourPlots(QWidget *parent = 0); + + signals: + + public slots: + + + protected: + + + +}; + + +#endif // TestWidgetContourPlots_H diff --git a/test/jkqtplot_test/TestWidgetEmptyPlot.cpp b/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp similarity index 96% rename from test/jkqtplot_test/TestWidgetEmptyPlot.cpp rename to examples/jkqtplot_test/TestWidgetEmptyPlot.cpp index 80b9005028..ab427f78ee 100644 --- a/test/jkqtplot_test/TestWidgetEmptyPlot.cpp +++ b/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp @@ -1,33 +1,33 @@ -#include "TestWidgetEmptyPlot.h" -#include -#include -#include -#include - - - - -TestWidgetEmptyPlot::TestWidgetEmptyPlot(QWidget *parent) : - QWidget(parent) -{ - - - #define NEMPTY 500 - - JKQtPlotter* plotEmpty=new JKQtPlotter(true, this); - JKQTPxyLineGraph* efunc=new JKQTPxyLineGraph(plotEmpty->get_plotter()); - double xef[NEMPTY], efy[NEMPTY]; - for (int i=0; iset_xColumn(plotEmpty->getDatastore()->addCopiedColumn(xef, NEMPTY, "x")); - efunc->set_yColumn(plotEmpty->getDatastore()->addCopiedColumn(efy, NEMPTY, "y")); - plotEmpty->addGraph(efunc); - plotEmpty->get_yAxis()->set_logAxis(true); - plotEmpty->zoomToFit(); - plotEmpty->setY(0,0); - - - -} +#include "TestWidgetEmptyPlot.h" +#include +#include +#include +#include + + + + +TestWidgetEmptyPlot::TestWidgetEmptyPlot(QWidget *parent) : + QWidget(parent) +{ + + + #define NEMPTY 500 + + JKQtPlotter* plotEmpty=new JKQtPlotter(true, this); + JKQTPxyLineGraph* efunc=new JKQTPxyLineGraph(plotEmpty->get_plotter()); + double xef[NEMPTY], efy[NEMPTY]; + for (int i=0; iset_xColumn(plotEmpty->getDatastore()->addCopiedColumn(xef, NEMPTY, "x")); + efunc->set_yColumn(plotEmpty->getDatastore()->addCopiedColumn(efy, NEMPTY, "y")); + plotEmpty->addGraph(efunc); + plotEmpty->get_yAxis()->set_logAxis(true); + plotEmpty->zoomToFit(); + plotEmpty->setY(0,0); + + + +} diff --git a/test/jkqtplot_test/TestWidgetEmptyPlot.h b/examples/jkqtplot_test/TestWidgetEmptyPlot.h similarity index 95% rename from test/jkqtplot_test/TestWidgetEmptyPlot.h rename to examples/jkqtplot_test/TestWidgetEmptyPlot.h index b8e8e1a00e..4cee898042 100644 --- a/test/jkqtplot_test/TestWidgetEmptyPlot.h +++ b/examples/jkqtplot_test/TestWidgetEmptyPlot.h @@ -1,46 +1,46 @@ -#ifndef TestWidgetEmptyPlot_H -#define TestWidgetEmptyPlot_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottertools/jkqtptools.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetEmptyPlot : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetEmptyPlot(QWidget *parent = 0); - - signals: - - public slots: - - - protected: - - -}; - - -#endif // TestWidgetEmptyPlot_H +#ifndef TestWidgetEmptyPlot_H +#define TestWidgetEmptyPlot_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottertools/jkqtptools.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetEmptyPlot : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetEmptyPlot(QWidget *parent = 0); + + signals: + + public slots: + + + protected: + + +}; + + +#endif // TestWidgetEmptyPlot_H diff --git a/test/jkqtplot_test/TestWidgetFunctionPlots.cpp b/examples/jkqtplot_test/TestWidgetFunctionPlots.cpp similarity index 97% rename from test/jkqtplot_test/TestWidgetFunctionPlots.cpp rename to examples/jkqtplot_test/TestWidgetFunctionPlots.cpp index 2835290902..459ccd45c2 100644 --- a/test/jkqtplot_test/TestWidgetFunctionPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetFunctionPlots.cpp @@ -1,116 +1,116 @@ -#include "TestWidgetFunctionPlots.h" -#include -#include -#include -#include - - - - - - -TestWidgetFunctionPlots::TestWidgetFunctionPlots(QWidget *parent) : - QWidget(parent) -{ - - - QVBoxLayout* plotFuncLayout=new QVBoxLayout(this); - setLayout(plotFuncLayout); - plotFuncPlt=new JKQtPlotter(true, this); - plotFuncLayout->addWidget(plotFuncPlt); - pfunc=new JKQTPxParsedFunctionLineGraph(plotFuncPlt->get_plotter()); - pfunc->set_function("x^2/10+sin(x*pi*10)"); - pfunc->set_errorFunction("x^2/20"); - pfunc->set_drawErrorPolygons(true); - pfunc->set_style(Qt::DashLine); - plotFuncPlt->addGraph(pfunc); - plotFuncPlt->update_plot(); - - pfuncErrorStyle=new JKQTPerrorPlotstyleComboBox(this); - pfuncErrorStyle->setCurrentIndex(3); - plotFuncLayout->addWidget(pfuncErrorStyle); - connect(pfuncErrorStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(setPFuncStyle())); - chkPFuncDrawSamples=new QCheckBox(tr("display samples"), this); - plotFuncLayout->addWidget(chkPFuncDrawSamples); - connect(chkPFuncDrawSamples, SIGNAL(toggled(bool)), this, SLOT(setPFuncStyle())); - chkPFuncDrawLine=new QCheckBox(tr("draw line"), this); - chkPFuncDrawLine->setChecked(true); - plotFuncLayout->addWidget(chkPFuncDrawLine); - connect(chkPFuncDrawLine, SIGNAL(toggled(bool)), this, SLOT(setPFuncStyle())); - QSpinBox* spinPFunc=new QSpinBox(this); - spinPFunc->setValue(pfunc->get_minSamples()); - plotFuncLayout->addWidget(new QLabel(tr("min samples:"), this)); - plotFuncLayout->addWidget(spinPFunc); - connect(spinPFunc, SIGNAL(valueChanged(int)), this, SLOT(setPFuncMinPoint(int))); - spinPFunc=new QSpinBox(this); - spinPFunc->setValue(pfunc->get_maxRefinementDegree()); - plotFuncLayout->addWidget(new QLabel(tr("max refinement degree:"), this)); - plotFuncLayout->addWidget(spinPFunc); - connect(spinPFunc, SIGNAL(valueChanged(int)), this, SLOT(setPFuncMaxRefine(int))); - QComboBox* edtPFunc=new QComboBox(this); - edtPFunc->addItem(pfunc->get_function()); - edtPFunc->addItem("x"); - edtPFunc->addItem("x^2"); - edtPFunc->addItem("x^2-x^3"); - edtPFunc->addItem("sin(x)"); - edtPFunc->setCurrentIndex(0); - plotFuncLayout->addWidget(new QLabel(tr("function:"), this)); - plotFuncLayout->addWidget(edtPFunc); - connect(edtPFunc, SIGNAL(currentIndexChanged(QString)), this, SLOT(setPFunc(QString))); - edtPFunc=new QComboBox(this); - edtPFunc->addItem(pfunc->get_errorFunction()); - edtPFunc->addItem(""); - edtPFunc->addItem("x"); - edtPFunc->addItem("cos(x)"); - edtPFunc->addItem("1"); - edtPFunc->setCurrentIndex(0); - plotFuncLayout->addWidget(new QLabel(tr("error function:"), this)); - plotFuncLayout->addWidget(edtPFunc); - connect(edtPFunc, SIGNAL(currentIndexChanged(QString)), this, SLOT(setPFuncE(QString))); - QCheckBox* chkFLogX=new QCheckBox(tr("x-axis: log-scale")); - chkFLogX->setChecked(false); - connect(chkFLogX, SIGNAL(toggled(bool)), plotFuncPlt->get_xAxis(), SLOT(set_logAxis(bool))); - plotFuncLayout->addWidget(chkFLogX); - QCheckBox* chkFLogY=new QCheckBox(tr("y-axis: log-scale")); - chkFLogY->setChecked(false); - connect(chkFLogY, SIGNAL(toggled(bool)), plotFuncPlt->get_yAxis(), SLOT(set_logAxis(bool))); - plotFuncLayout->addWidget(chkFLogY); - - -} - - -void TestWidgetFunctionPlots::setPFuncStyle() -{ - pfunc->set_drawErrorLines(false); - pfunc->set_drawErrorPolygons(false); - if (pfuncErrorStyle->getErrorStyle()==JKQTPerrorLines) pfunc->set_drawErrorLines(true); - if (pfuncErrorStyle->getErrorStyle()==JKQTPerrorPolygons) pfunc->set_drawErrorPolygons(true); - pfunc->set_drawLine(chkPFuncDrawLine->isChecked()); - pfunc->set_displaySamplePoints(chkPFuncDrawSamples->isChecked()); - plotFuncPlt->update_plot(); -} - -void TestWidgetFunctionPlots::setPFuncMinPoint(int value) -{ - pfunc->set_minSamples(value); - plotFuncPlt->update_plot(); -} - -void TestWidgetFunctionPlots::setPFuncMaxRefine(int value) -{ - pfunc->set_maxRefinementDegree(value); - plotFuncPlt->update_plot(); -} - -void TestWidgetFunctionPlots::setPFunc(const QString &expression) -{ - pfunc->set_function(expression); - plotFuncPlt->update_plot(); -} - -void TestWidgetFunctionPlots::setPFuncE(const QString &expression) -{ - pfunc->set_errorFunction(expression); - plotFuncPlt->update_plot(); -} +#include "TestWidgetFunctionPlots.h" +#include +#include +#include +#include + + + + + + +TestWidgetFunctionPlots::TestWidgetFunctionPlots(QWidget *parent) : + QWidget(parent) +{ + + + QVBoxLayout* plotFuncLayout=new QVBoxLayout(this); + setLayout(plotFuncLayout); + plotFuncPlt=new JKQtPlotter(true, this); + plotFuncLayout->addWidget(plotFuncPlt); + pfunc=new JKQTPxParsedFunctionLineGraph(plotFuncPlt->get_plotter()); + pfunc->set_function("x^2/10+sin(x*pi*10)"); + pfunc->set_errorFunction("x^2/20"); + pfunc->set_drawErrorPolygons(true); + pfunc->set_style(Qt::DashLine); + plotFuncPlt->addGraph(pfunc); + plotFuncPlt->update_plot(); + + pfuncErrorStyle=new JKQTPerrorPlotstyleComboBox(this); + pfuncErrorStyle->setCurrentIndex(3); + plotFuncLayout->addWidget(pfuncErrorStyle); + connect(pfuncErrorStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(setPFuncStyle())); + chkPFuncDrawSamples=new QCheckBox(tr("display samples"), this); + plotFuncLayout->addWidget(chkPFuncDrawSamples); + connect(chkPFuncDrawSamples, SIGNAL(toggled(bool)), this, SLOT(setPFuncStyle())); + chkPFuncDrawLine=new QCheckBox(tr("draw line"), this); + chkPFuncDrawLine->setChecked(true); + plotFuncLayout->addWidget(chkPFuncDrawLine); + connect(chkPFuncDrawLine, SIGNAL(toggled(bool)), this, SLOT(setPFuncStyle())); + QSpinBox* spinPFunc=new QSpinBox(this); + spinPFunc->setValue(pfunc->get_minSamples()); + plotFuncLayout->addWidget(new QLabel(tr("min samples:"), this)); + plotFuncLayout->addWidget(spinPFunc); + connect(spinPFunc, SIGNAL(valueChanged(int)), this, SLOT(setPFuncMinPoint(int))); + spinPFunc=new QSpinBox(this); + spinPFunc->setValue(pfunc->get_maxRefinementDegree()); + plotFuncLayout->addWidget(new QLabel(tr("max refinement degree:"), this)); + plotFuncLayout->addWidget(spinPFunc); + connect(spinPFunc, SIGNAL(valueChanged(int)), this, SLOT(setPFuncMaxRefine(int))); + QComboBox* edtPFunc=new QComboBox(this); + edtPFunc->addItem(pfunc->get_function()); + edtPFunc->addItem("x"); + edtPFunc->addItem("x^2"); + edtPFunc->addItem("x^2-x^3"); + edtPFunc->addItem("sin(x)"); + edtPFunc->setCurrentIndex(0); + plotFuncLayout->addWidget(new QLabel(tr("function:"), this)); + plotFuncLayout->addWidget(edtPFunc); + connect(edtPFunc, SIGNAL(currentIndexChanged(QString)), this, SLOT(setPFunc(QString))); + edtPFunc=new QComboBox(this); + edtPFunc->addItem(pfunc->get_errorFunction()); + edtPFunc->addItem(""); + edtPFunc->addItem("x"); + edtPFunc->addItem("cos(x)"); + edtPFunc->addItem("1"); + edtPFunc->setCurrentIndex(0); + plotFuncLayout->addWidget(new QLabel(tr("error function:"), this)); + plotFuncLayout->addWidget(edtPFunc); + connect(edtPFunc, SIGNAL(currentIndexChanged(QString)), this, SLOT(setPFuncE(QString))); + QCheckBox* chkFLogX=new QCheckBox(tr("x-axis: log-scale")); + chkFLogX->setChecked(false); + connect(chkFLogX, SIGNAL(toggled(bool)), plotFuncPlt->get_xAxis(), SLOT(set_logAxis(bool))); + plotFuncLayout->addWidget(chkFLogX); + QCheckBox* chkFLogY=new QCheckBox(tr("y-axis: log-scale")); + chkFLogY->setChecked(false); + connect(chkFLogY, SIGNAL(toggled(bool)), plotFuncPlt->get_yAxis(), SLOT(set_logAxis(bool))); + plotFuncLayout->addWidget(chkFLogY); + + +} + + +void TestWidgetFunctionPlots::setPFuncStyle() +{ + pfunc->set_drawErrorLines(false); + pfunc->set_drawErrorPolygons(false); + if (pfuncErrorStyle->getErrorStyle()==JKQTPerrorLines) pfunc->set_drawErrorLines(true); + if (pfuncErrorStyle->getErrorStyle()==JKQTPerrorPolygons) pfunc->set_drawErrorPolygons(true); + pfunc->set_drawLine(chkPFuncDrawLine->isChecked()); + pfunc->set_displaySamplePoints(chkPFuncDrawSamples->isChecked()); + plotFuncPlt->update_plot(); +} + +void TestWidgetFunctionPlots::setPFuncMinPoint(int value) +{ + pfunc->set_minSamples(value); + plotFuncPlt->update_plot(); +} + +void TestWidgetFunctionPlots::setPFuncMaxRefine(int value) +{ + pfunc->set_maxRefinementDegree(value); + plotFuncPlt->update_plot(); +} + +void TestWidgetFunctionPlots::setPFunc(const QString &expression) +{ + pfunc->set_function(expression); + plotFuncPlt->update_plot(); +} + +void TestWidgetFunctionPlots::setPFuncE(const QString &expression) +{ + pfunc->set_errorFunction(expression); + plotFuncPlt->update_plot(); +} diff --git a/test/jkqtplot_test/TestWidgetFunctionPlots.h b/examples/jkqtplot_test/TestWidgetFunctionPlots.h similarity index 95% rename from test/jkqtplot_test/TestWidgetFunctionPlots.h rename to examples/jkqtplot_test/TestWidgetFunctionPlots.h index 8accc40b5d..99129b7df2 100644 --- a/test/jkqtplot_test/TestWidgetFunctionPlots.h +++ b/examples/jkqtplot_test/TestWidgetFunctionPlots.h @@ -1,59 +1,59 @@ -#ifndef TestWidgetFunctionPlots_H -#define TestWidgetFunctionPlots_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottergui/jkqtpcomboboxes.h" -#include "jkqtplottertools/jkqtptools.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetFunctionPlots : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetFunctionPlots(QWidget *parent = 0); - - signals: - - public slots: - - - void setPFuncStyle(); - void setPFuncMinPoint(int value); - void setPFuncMaxRefine(int value); - void setPFunc(const QString& expression); - void setPFuncE(const QString& expression); - - protected: - - JKQTPxParsedFunctionLineGraph* pfunc; - JKQtPlotter* plotFuncPlt; - JKQTPerrorPlotstyleComboBox* pfuncErrorStyle; - QCheckBox* chkPFuncDrawSamples; - QCheckBox* chkPFuncDrawLine; - - -}; - - -#endif // TestWidgetFunctionPlots_H +#ifndef TestWidgetFunctionPlots_H +#define TestWidgetFunctionPlots_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottergui/jkqtpcomboboxes.h" +#include "jkqtplottertools/jkqtptools.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetFunctionPlots : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetFunctionPlots(QWidget *parent = 0); + + signals: + + public slots: + + + void setPFuncStyle(); + void setPFuncMinPoint(int value); + void setPFuncMaxRefine(int value); + void setPFunc(const QString& expression); + void setPFuncE(const QString& expression); + + protected: + + JKQTPxParsedFunctionLineGraph* pfunc; + JKQtPlotter* plotFuncPlt; + JKQTPerrorPlotstyleComboBox* pfuncErrorStyle; + QCheckBox* chkPFuncDrawSamples; + QCheckBox* chkPFuncDrawLine; + + +}; + + +#endif // TestWidgetFunctionPlots_H diff --git a/test/jkqtplot_test/TestWidgetGeometry.cpp b/examples/jkqtplot_test/TestWidgetGeometry.cpp similarity index 98% rename from test/jkqtplot_test/TestWidgetGeometry.cpp rename to examples/jkqtplot_test/TestWidgetGeometry.cpp index cae9f58f82..2665c87b2b 100644 --- a/test/jkqtplot_test/TestWidgetGeometry.cpp +++ b/examples/jkqtplot_test/TestWidgetGeometry.cpp @@ -1,96 +1,96 @@ -#include "TestWidgetGeometry.h" -#include -#include -#include -#include - - - - - -TestWidgetGeometry::TestWidgetGeometry(QWidget *parent) : - QWidget(parent) -{ - // create third plotter with output of a geometric drawing - QVBoxLayout* layout1=new QVBoxLayout(this); - setLayout(layout1); - resize(1000, 800); - JKQtPlotter* plotGeo=new JKQtPlotter(true, this); - plotGeo->set_doDrawing(false); - plotGeo->setObjectName("plotGeo"); - layout1->addWidget(plotGeo); - plotGeo->setXY(0,1,0,1); - plotGeo->get_plotter()->get_xAxis()->set_axisLabel("$x$ [mm]"); - plotGeo->get_plotter()->get_yAxis()->set_axisLabel("$y$ [mm]"); - /*plotGeo->get_plotter()->get_xAxis()->set_linkedAxis(plotGeo->get_plotter()->get_yAxis()); - plotGeo->get_plotter()->get_xAxis()->set_changeWidthToAspectRatio(true);*/ - plotGeo->get_plotter()->set_maintainAspectRatio(true); - plotGeo->get_plotter()->set_aspectRatio(1); - plotGeo->get_plotter()->set_maintainAxisAspectRatio(true); - plotGeo->get_plotter()->set_axisAspectRatio(1); - - -// JKQTPgeoLine* line1=new JKQTPgeoLine(plotGeo->get_plotter(), -1, -2, 2, 1.5); - //plotGeo->get_plotter()->addGraph(line1); -// JKQTPgeoLine* line2=new JKQTPgeoLine(plotGeo->get_plotter(), 1, -5, 4, 3, QColor("blue"), 4); - //plotGeo->get_plotter()->addGraph(line2); - - JKQTPgeoRectangle* rect1=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("blue"),2, Qt::SolidLine, QColor("lightblue")); - rect1->set_alpha(30); - //plotGeo->get_plotter()->addGraph(rect1); - JKQTPgeoRectangle* rect2=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("red"),2); - rect2->set_alpha(45); - //plotGeo->get_plotter()->addGraph(rect2); - JKQTPgeoRectangle* rect3=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2); - rect3->set_alpha(-30); - //plotGeo->get_plotter()->addGraph(rect3); - JKQTPgeoEllipse* ell3=new JKQTPgeoEllipse(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2, Qt::SolidLine, QColor("lightgreen"), Qt::CrossPattern); - ell3->set_alpha(-30); - //plotGeo->get_plotter()->addGraph(ell3); - - QVector p; - p.append(QPointF(4,1)); - p.append(QPointF(-11,5)); - p.append(QPointF(1,11)); - p.append(QPointF(0,-2)); - p.append(QPointF(M_PI,5.5)); - -// JKQTPgeoPolygon* poly=new JKQTPgeoPolygon(plotGeo->get_plotter(), p, QColor("black"), 1.5, Qt::SolidLine, QColor(128,128,0,128)); - //plotGeo->get_plotter()->addGraph(poly); -// JKQTPgeoLines* lines=new JKQTPgeoLines(plotGeo->get_plotter(), p, QColor(255,255,0), 3); - //plotGeo->get_plotter()->addGraph(lines); - - JKQTPgeoEllipse* ell1=new JKQTPgeoEllipse(plotGeo->get_plotter(), 0,0,2,4, QColor("black"),1.5, Qt::DotLine); - plotGeo->get_plotter()->addGraph(ell1); -// JKQTPgeoArc* arc=new JKQTPgeoArc(plotGeo->get_plotter(), 0,0,2,4,0, 135, QColor("blue"),3, Qt::SolidLine); - //plotGeo->get_plotter()->addGraph(arc); -// JKQTPgeoPie* pie=new JKQTPgeoPie(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); - //plotGeo->get_plotter()->addGraph(pie); -// JKQTPgeoChord* chord=new JKQTPgeoChord(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); - //plotGeo->get_plotter()->addGraph(chord); - - JKQTPgeoInfiniteLine* iline=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,1,1, QColor("blue"), 3); - plotGeo->get_plotter()->addGraph(iline); - JKQTPgeoInfiniteLine* iline1=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0, QColor("red"), 3); - plotGeo->get_plotter()->addGraph(iline1); - JKQTPgeoInfiniteLine* iline2=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,0,1, QColor("red"), 3); - plotGeo->get_plotter()->addGraph(iline2); - JKQTPgeoInfiniteLine* iline3=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0.5, QColor("green"), 3); - iline3->set_two_sided(true); - plotGeo->get_plotter()->addGraph(iline3); - - JKQTPgeoText* text=new JKQTPgeoText(plotGeo->get_plotter(), -1, -1, "Test $f(x)=\\sqrt{\\sin(x^2)}$ \\textbf{bold}", 12, QColor("red")); - plotGeo->get_plotter()->addGraph(text); - - plotGeo->set_doDrawing(true); - plotGeo->get_plotter()->zoomToFit(); - plotGeo->get_plotter()->set_keyAutosize(true); - - - QCheckBox* chkAspect=new QCheckBox("keep aspect ratio", this); - chkAspect->setChecked(plotGeo->get_plotter()->get_maintainAxisAspectRatio()); - connect(chkAspect, SIGNAL(toggled(bool)), plotGeo->get_plotter(), SLOT(set_maintainAspectRatio(bool))); - connect(chkAspect, SIGNAL(toggled(bool)), plotGeo->get_plotter(), SLOT(set_maintainAxisAspectRatio(bool))); - layout1->addWidget(chkAspect); - -} +#include "TestWidgetGeometry.h" +#include +#include +#include +#include + + + + + +TestWidgetGeometry::TestWidgetGeometry(QWidget *parent) : + QWidget(parent) +{ + // create third plotter with output of a geometric drawing + QVBoxLayout* layout1=new QVBoxLayout(this); + setLayout(layout1); + resize(1000, 800); + JKQtPlotter* plotGeo=new JKQtPlotter(true, this); + plotGeo->set_doDrawing(false); + plotGeo->setObjectName("plotGeo"); + layout1->addWidget(plotGeo); + plotGeo->setXY(0,1,0,1); + plotGeo->get_plotter()->get_xAxis()->set_axisLabel("$x$ [mm]"); + plotGeo->get_plotter()->get_yAxis()->set_axisLabel("$y$ [mm]"); + /*plotGeo->get_plotter()->get_xAxis()->set_linkedAxis(plotGeo->get_plotter()->get_yAxis()); + plotGeo->get_plotter()->get_xAxis()->set_changeWidthToAspectRatio(true);*/ + plotGeo->get_plotter()->set_maintainAspectRatio(true); + plotGeo->get_plotter()->set_aspectRatio(1); + plotGeo->get_plotter()->set_maintainAxisAspectRatio(true); + plotGeo->get_plotter()->set_axisAspectRatio(1); + + +// JKQTPgeoLine* line1=new JKQTPgeoLine(plotGeo->get_plotter(), -1, -2, 2, 1.5); + //plotGeo->get_plotter()->addGraph(line1); +// JKQTPgeoLine* line2=new JKQTPgeoLine(plotGeo->get_plotter(), 1, -5, 4, 3, QColor("blue"), 4); + //plotGeo->get_plotter()->addGraph(line2); + + JKQTPgeoRectangle* rect1=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("blue"),2, Qt::SolidLine, QColor("lightblue")); + rect1->set_alpha(30); + //plotGeo->get_plotter()->addGraph(rect1); + JKQTPgeoRectangle* rect2=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("red"),2); + rect2->set_alpha(45); + //plotGeo->get_plotter()->addGraph(rect2); + JKQTPgeoRectangle* rect3=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2); + rect3->set_alpha(-30); + //plotGeo->get_plotter()->addGraph(rect3); + JKQTPgeoEllipse* ell3=new JKQTPgeoEllipse(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2, Qt::SolidLine, QColor("lightgreen"), Qt::CrossPattern); + ell3->set_alpha(-30); + //plotGeo->get_plotter()->addGraph(ell3); + + QVector p; + p.append(QPointF(4,1)); + p.append(QPointF(-11,5)); + p.append(QPointF(1,11)); + p.append(QPointF(0,-2)); + p.append(QPointF(M_PI,5.5)); + +// JKQTPgeoPolygon* poly=new JKQTPgeoPolygon(plotGeo->get_plotter(), p, QColor("black"), 1.5, Qt::SolidLine, QColor(128,128,0,128)); + //plotGeo->get_plotter()->addGraph(poly); +// JKQTPgeoLines* lines=new JKQTPgeoLines(plotGeo->get_plotter(), p, QColor(255,255,0), 3); + //plotGeo->get_plotter()->addGraph(lines); + + JKQTPgeoEllipse* ell1=new JKQTPgeoEllipse(plotGeo->get_plotter(), 0,0,2,4, QColor("black"),1.5, Qt::DotLine); + plotGeo->get_plotter()->addGraph(ell1); +// JKQTPgeoArc* arc=new JKQTPgeoArc(plotGeo->get_plotter(), 0,0,2,4,0, 135, QColor("blue"),3, Qt::SolidLine); + //plotGeo->get_plotter()->addGraph(arc); +// JKQTPgeoPie* pie=new JKQTPgeoPie(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); + //plotGeo->get_plotter()->addGraph(pie); +// JKQTPgeoChord* chord=new JKQTPgeoChord(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); + //plotGeo->get_plotter()->addGraph(chord); + + JKQTPgeoInfiniteLine* iline=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,1,1, QColor("blue"), 3); + plotGeo->get_plotter()->addGraph(iline); + JKQTPgeoInfiniteLine* iline1=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0, QColor("red"), 3); + plotGeo->get_plotter()->addGraph(iline1); + JKQTPgeoInfiniteLine* iline2=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,0,1, QColor("red"), 3); + plotGeo->get_plotter()->addGraph(iline2); + JKQTPgeoInfiniteLine* iline3=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0.5, QColor("green"), 3); + iline3->set_two_sided(true); + plotGeo->get_plotter()->addGraph(iline3); + + JKQTPgeoText* text=new JKQTPgeoText(plotGeo->get_plotter(), -1, -1, "Test $f(x)=\\sqrt{\\sin(x^2)}$ \\textbf{bold}", 12, QColor("red")); + plotGeo->get_plotter()->addGraph(text); + + plotGeo->set_doDrawing(true); + plotGeo->get_plotter()->zoomToFit(); + plotGeo->get_plotter()->set_keyAutosize(true); + + + QCheckBox* chkAspect=new QCheckBox("keep aspect ratio", this); + chkAspect->setChecked(plotGeo->get_plotter()->get_maintainAxisAspectRatio()); + connect(chkAspect, SIGNAL(toggled(bool)), plotGeo->get_plotter(), SLOT(set_maintainAspectRatio(bool))); + connect(chkAspect, SIGNAL(toggled(bool)), plotGeo->get_plotter(), SLOT(set_maintainAxisAspectRatio(bool))); + layout1->addWidget(chkAspect); + +} diff --git a/test/jkqtplot_test/TestWidgetGeometry.h b/examples/jkqtplot_test/TestWidgetGeometry.h similarity index 95% rename from test/jkqtplot_test/TestWidgetGeometry.h rename to examples/jkqtplot_test/TestWidgetGeometry.h index d9580bb262..20475b5bed 100644 --- a/test/jkqtplot_test/TestWidgetGeometry.h +++ b/examples/jkqtplot_test/TestWidgetGeometry.h @@ -1,47 +1,47 @@ -#ifndef TestWidgetGeometry_H -#define TestWidgetGeometry_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottertools/jkqtptools.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetGeometry : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetGeometry(QWidget *parent = 0); - - signals: - - public slots: - - - protected: - - - -}; - - -#endif // TestWidgetGeometry_H +#ifndef TestWidgetGeometry_H +#define TestWidgetGeometry_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottertools/jkqtptools.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetGeometry : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetGeometry(QWidget *parent = 0); + + signals: + + public slots: + + + protected: + + + +}; + + +#endif // TestWidgetGeometry_H diff --git a/test/jkqtplot_test/TestWidgetGraphs.cpp b/examples/jkqtplot_test/TestWidgetGraphs.cpp similarity index 97% rename from test/jkqtplot_test/TestWidgetGraphs.cpp rename to examples/jkqtplot_test/TestWidgetGraphs.cpp index bf5aa52cc1..e8465ab1c5 100644 --- a/test/jkqtplot_test/TestWidgetGraphs.cpp +++ b/examples/jkqtplot_test/TestWidgetGraphs.cpp @@ -1,359 +1,359 @@ -#include "TestWidgetGraphs.h" -#include -#include -#include -#include -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplotter/jkqtpgraphsboxplot.h" -#include "jkqtplotter/jkqtpgraphsfilledcurve.h" -#include "jkqtplottergui/jkqtpcomboboxes.h" - - - - -TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : - QWidget(parent) -{ - - ovlCnt=0; - ovlTime.start(); - - - plot=new JKQtPlotter(true, this); - plot->set_doDrawing(false); - plotBot=new JKQtPlotter(false, this, plot->getDatastore()); - plotBot2=new JKQtPlotter(false, this, plot->getDatastore()); - ovl1=new JKQTPoverlayVerticalLine(0.0, tr("test"), plot->get_plotter()); - plot->get_plotter()->addOverlayElement(ovl1); - plot->setObjectName("plot"); - plotBot->setObjectName("plotBot"); - plotBot2->setObjectName("plotBot2"); - plot->get_plotter()->set_plotLabel("Plot Label $1.\\alpha$"); - plot->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); - plotBot->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); - plotBot2->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); - - QListView* listPlots=new QListView(this); - listPlots->setModel(plot->get_plotter()->getPlotsModel()); - listPlots->setMaximumWidth(256); - QVBoxLayout* layout=new QVBoxLayout(this); - QGridLayout* layout_grid=new QGridLayout(this); - layout_grid->addWidget(plot,0,0,1,1); - layout_grid->addWidget(plotBot,1,0,1,1); - layout_grid->addWidget(listPlots,0,1,1,1); - layout_grid->setColumnStretch(0,1); - layout->addLayout(layout_grid,2); - layout->addWidget(plotBot2,1); - setLayout(layout); - resize(1000, 800); - - plotBot->synchronizeToMaster(plot, true, false); - connect(plot, SIGNAL(zoomChangedLocally(double,double,double,double,JKQtPlotter*)), plotBot, SLOT(synchronizeXAxis(double,double,double,double,JKQtPlotter*))); - plot->get_plotter()->set_gridPrinting(true); - plot->get_plotter()->addGridPrintingPlotter(0,1,plotBot->get_plotter()); - plot->get_plotter()->addGridPrintingPlotter(0,2,plotBot2->get_plotter()); - - plot->get_plotter()->get_xAxis()->set_axisLabel("$x$ axis with greek letters $\\sqrt{\\alpha\\cdot\\beta}$"); - plot->get_plotter()->get_yAxis()->set_axisLabel("$y$-axis label $f(x)=\\sin\\left(x^2\\right)$ [unit]"); - - plotBot->get_plotter()->get_xAxis()->set_axisLabel(plot->get_plotter()->get_xAxis()->get_axisLabel()); - plotBot->get_plotter()->get_yAxis()->set_axisLabel("$y$-axis 2 [unit]"); - plotBot2->get_plotter()->get_xAxis()->set_axisLabel(plot->get_plotter()->get_xAxis()->get_axisLabel()); - plotBot2->get_plotter()->get_yAxis()->set_axisLabel("$y$-axis 3 [unit]"); - plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(2.5, "tick 1"); - plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(7.5, "tick 2"); - plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(12.5, "tick 3"); - plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(17.5, "tick 4"); - - - for (unsigned int i=0; iget_plotter()->getDatastore(); - - //size_t cx1=ds->addColumn(x1, N1, "x1"); - //size_t cy11=ds->addColumn(y11, N1, "y11"); - //size_t cy12=ds->addColumn(y12, N1, "y12"); - //size_t cy13=ds->addColumn(y13, N1, "y13"); - - //plot->addGraph(cx1, cy11, "$\\sin(x)$", JKQTPpoints); - //plot->addGraph(cy12, cx1, "$\\cos(x)$", JKQTPfilledCurveY); - //plot->addGraphWithXError(cy12, cx1, cy13, "$\\cos(x)$ with errors", JKQTPfilledCurveY, JKQTPerrorPolygons); - - for (unsigned int i=0; iaddColumn(x2, N2, "x2"); - size_t cy21=ds->addColumn(y21, N2, "y21"); - size_t cy22=ds->addColumn(y22, N2, "y22"); -// size_t cy23=ds->addColumn(y23, N2, "y23"); - //size_t cy24=ds->addColumn(y24, N2, "y24"); - size_t cx2r=ds->addColumn(x2r, N2, "x2r"); - size_t cy21r=ds->addColumn(y21r, N2, "y21r"); - size_t cy21re=ds->addColumn(y21re, N2, "y21re"); - - - size_t id=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPfilledCurveX); - JKQTPfilledCurveXGraph* fcxgr=qobject_cast(plot->get_plotter()->getGraph(id)); - if (fcxgr) { - fcxgr->set_baseline(2); - } - - size_t yeb=plot->get_plotter()->addGraphWithXYError(cx2, cy21, cy22, cy22, "sine with errors", JKQTPfilledCurveX); - plteErrors=plot->get_plotter()->getGraph(yeb); - setErrorStyle(0); - yeb=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPlinesPoints); - plteSymbols=plot->get_plotter()->getGraph(yeb); - - pltePlot2=new JKQTPxyLineErrorGraph(plotBot->get_plotter()); - pltePlot2->set_xColumn(cx2r); - pltePlot2->set_yColumn(cy21r); - pltePlot2->set_title(tr("random numbers")); - pltePlot2->set_drawLine(true); - pltePlot2->set_yErrorColumn(cy21re); - pltePlot2->set_yErrorStyle(JKQTPerrorBarsPolygons); - pltePlot2->set_symbol(JKQTPfilledStar); - plotBot->get_plotter()->addGraph(pltePlot2); - plotBot->zoomToFit(); - - - for (unsigned int i=0; iget_xAxis()->addAxisTickLabel(i+1, QString("$\\pi_{%1}\\cdot 10^{%2}$").arg(i+1).arg(i+1-N3)); - //plot->get_yAxis()->addAxisTickLabel(i+1, QString("$\\pi_{%1}\\cdot 10^{%2}$").arg(i+1).arg(i+1-N3)); - } - - size_t cbp=ds->addLinearColumn(N3, 2, N3+2, "boxplot_x"); - size_t cbxbox=ds->addColumn(xbox, N3, "xbox_log"); - size_t cbmean=ds->addColumn(ymean, N3, "ymean"); - size_t cbmed=ds->addColumn(ymed, N3, "ymed"); - size_t cbmin=ds->addColumn(ymin, N3, "ymin"); - size_t cbmax=ds->addColumn(ymax, N3, "ymax"); - size_t cbp25=ds->addColumn(yp25, N3, "yp25"); - size_t cbp75=ds->addColumn(yp75, N3, "yp75"); - - - QVector cb; - cb.push_back(ds->addColumn(b1, N3, "b1")); - cb.push_back(ds->addColumn(b2, N3, "b2")); - cb.push_back(ds->addColumn(b3, N3, "b3")); - QStringList ts; - ts<<"bars 1"<<"bars 2"<<"bars 3"; - plot->get_plotter()->addVerticalBargraph(cb, cbp, ts); - - JKQTPverticalRange* r1=new JKQTPverticalRange(plot->get_plotter()); - r1->set_rangeMin(5); - r1->set_rangeMax(10); - r1->set_rangeCenter(7.5); - r1->set_title("vert. range"); - plot->get_plotter()->addGraph(r1); - - JKQTPhorizontalRange* r2=new JKQTPhorizontalRange(plot->get_plotter()); - r2->set_rangeMin(5); - r2->set_rangeMax(10); - r2->set_rangeCenter(7.5); - r2->set_title("hor. range"); - plot->get_plotter()->addGraph(r2); - - JKQTPboxplotVerticalGraph* box=new JKQTPboxplotVerticalGraph(plotBot2->get_plotter()); - box->set_posColumn(cbxbox); - box->set_medianColumn(cbmed); - box->set_meanColumn(cbmean); - box->set_minColumn(cbmin); - box->set_maxColumn(cbmax); - box->set_percentile25Column(cbp25); - box->set_percentile75Column(cbp75); - box->set_title("Boxplot"); - plotBot2->addGraph(box); - plotBot2->zoomToFit(); - - /*JKQTPyFunctionLineGraph* g=new JKQTPyFunctionLineGraph(&plot); - g->set_title("function 1"); - g->set_plotFunction(f1); - g->set_errorFunction(f1e); - g->set_drawErrorLines(true); - g->set_drawErrorPolygons(false); - g->set_color(QColor("red")); - plot->addGraph(g);*/ - - /*JKQTPxFunctionLineGraph* g=new JKQTPxFunctionLineGraph(&plot); - g->set_title("function 2"); - g->set_plotFunction(f2); - plot->addGraph(g);*/ - - /*JKQTPstepVerticalGraph* g=new JKQTPstepVerticalGraph(&plot); - g->set_xColumn(cy11); - g->set_yColumn(cx1); - g->set_fillCurve(true); - g->set_valuesCentered(true); - plot->addGraph(g); - plot->addGraph(cy11, cx1, "$\\sin(x)$", JKQTPpoints);*/ - - plot->set_doDrawing(true); - plot->get_plotter()->zoomToFit(true, false);//, true); - plot->get_plotter()->set_keyAutosize(true); - - QCheckBox* chklogX=new QCheckBox("logarithmic X-axis", this); - QCheckBox* chklogY=new QCheckBox("logarithmic Y-axis", this); - connect(chklogX, SIGNAL(toggled(bool)), plot->get_plotter()->get_xAxis(), SLOT(set_logAxis(bool))); - connect(chklogY, SIGNAL(toggled(bool)), plot->get_plotter()->get_yAxis(), SLOT(set_logAxis(bool))); - connect(chklogX, SIGNAL(toggled(bool)), plotBot2->get_plotter()->get_xAxis(), SLOT(set_logAxis(bool))); - connect(chklogY, SIGNAL(toggled(bool)), plotBot2->get_plotter()->get_yAxis(), SLOT(set_logAxis(bool))); - layout->addWidget(chklogX); - layout->addWidget(chklogY); - QCheckBox* chkInvertX=new QCheckBox("invert X-axis", this); - QCheckBox* chkInvertY=new QCheckBox("invert Y-axis", this); - connect(chkInvertX, SIGNAL(toggled(bool)), plot->get_plotter()->get_xAxis(), SLOT(set_inverted(bool))); - connect(chkInvertY, SIGNAL(toggled(bool)), plot->get_plotter()->get_yAxis(), SLOT(set_inverted(bool))); - layout->addWidget(chkInvertX); - layout->addWidget(chkInvertY); - layout->addWidget(chkInvertX); - layout->addWidget(chkInvertY); - JKQTPSymbolComboBox* cmbJKQTPplotSymbol=new JKQTPSymbolComboBox(this); - cmbJKQTPplotSymbol->setSymbol(JKQTPplus); - connect(cmbJKQTPplotSymbol, SIGNAL(currentIndexChanged(int)), this, SLOT(setESSymbol(int))); - layout->addWidget(cmbJKQTPplotSymbol); - JKQTPerrorPlotstyleComboBox* cmbErrors=new JKQTPerrorPlotstyleComboBox(this); - cmbErrors->setCurrentErrorStyle(JKQTPerrorBars); - connect(cmbErrors, SIGNAL(currentIndexChanged(int)), this, SLOT(setErrorStyle(int))); - layout->addWidget(cmbErrors); - QDoubleSpinBox* spinScale=new QDoubleSpinBox(this); - spinScale->setRange(0.1,5); - spinScale->setSingleStep(0.1); - spinScale->setValue(1); - spinScale->setPrefix("magnification: "); - layout->addWidget(spinScale); - connect(spinScale, SIGNAL(valueChanged(double)), plot, SLOT(setMagnification(double))); - connect(spinScale, SIGNAL(valueChanged(double)), plotBot, SLOT(setMagnification(double))); - connect(spinScale, SIGNAL(valueChanged(double)), plotBot2, SLOT(setMagnification(double))); - - QComboBox* cmbSortOrder2=new QComboBox(this); - cmbSortOrder2->addItem(tr("plot 2: unsorted")); - cmbSortOrder2->addItem(tr("plot 2: sort X")); - cmbSortOrder2->addItem(tr("plot 2: sort Y")); - connect(cmbSortOrder2, SIGNAL(currentIndexChanged(int)), this, SLOT(setSortOrder2(int))); - layout->addWidget(cmbSortOrder2); - - - JKQTPkeyLayoutComboBox* cmbKeyLayout=new JKQTPkeyLayoutComboBox(this); - connect(cmbKeyLayout, SIGNAL(currentLayoutChanged(JKQTPkeyLayout)), this, SLOT(setKeyLayout2(JKQTPkeyLayout))); - layout->addWidget(cmbKeyLayout); - - - JKQTPkeyPositionComboBox* cmbKeyPos=new JKQTPkeyPositionComboBox(this); - connect(cmbKeyPos, SIGNAL(currentPositionChanged(JKQTPkeyPosition)), this, SLOT(setKeyPos2(JKQTPkeyPosition))); - layout->addWidget(cmbKeyPos); - - - - - - - - - - - - - - - QTimer::singleShot(50, this, SLOT(moveovl())); - -} - -void TestWidgetGraphs::moveovl() { - ovl1->set_position(ovl1->get_position()+0.1); - if (ovl1->get_position()>30) ovl1->set_position(0); - ovlCnt++; - if (ovlCnt>20) { - double fps=double(ovlCnt)/(double(ovlTime.elapsed())/1000.0); - ovl1->set_text(QString("%1 fps").arg(fps)); - ovlCnt=0; - ovlTime.start(); - } - plot->update_overlays(); - QTimer::singleShot(10, this, SLOT(moveovl())); -} - - -void TestWidgetGraphs::setErrorStyle(int /*index*/) -{ - QComboBox* cmb=qobject_cast(sender()); - if (cmb) { - JKQTPxyGraphErrors* exy=dynamic_cast(plteErrors); -// JKQTPxGraphErrors* ex=dynamic_cast(plteErrors); - JKQTPyGraphErrors* ey=dynamic_cast(plteErrors); - if (exy) { - exy->set_yErrorStyle(String2JKQTPerrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); - } - if (ey) { - ey->set_yErrorStyle(String2JKQTPerrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); - } - plot->update_plot(); - } -} - -void TestWidgetGraphs::setESSymbol(int /*index*/) -{ - QComboBox* cmb=qobject_cast(sender()); - if (cmb) { - JKQTPxyLineGraph* exy=dynamic_cast(plteSymbols); - if (exy) { - exy->set_symbol(String2JKQTPgraphSymbols(cmb->itemData(cmb->currentIndex()).toString())); - } - - plot->update_plot(); - } -} - - -void TestWidgetGraphs::setSortOrder2(int index) -{ - if (index==0) pltePlot2->set_sortData(JKQTPxyGraph::Unsorted); - if (index==1) pltePlot2->set_sortData(JKQTPxyLineGraph::SortedX); - if (index==2) pltePlot2->set_sortData(JKQTPxyLineGraph::SortedY); - plotBot->update_plot(); -} - -void TestWidgetGraphs::setKeyLayout2(JKQTPkeyLayout layout) -{ - plot->get_plotter()->set_keyLayout(layout); - plotBot->get_plotter()->set_keyLayout(layout); - plotBot2->get_plotter()->set_keyLayout(layout); - plot->update_plot(); - plotBot->update_plot(); - plotBot2->update_plot(); -} - -void TestWidgetGraphs::setKeyPos2(JKQTPkeyPosition layout) -{ - plot->get_plotter()->set_keyPosition(layout); - plotBot->get_plotter()->set_keyPosition(layout); - plotBot2->get_plotter()->set_keyPosition(layout); - plot->update_plot(); - plotBot->update_plot(); - plotBot2->update_plot(); -} +#include "TestWidgetGraphs.h" +#include +#include +#include +#include +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplotter/jkqtpgraphsboxplot.h" +#include "jkqtplotter/jkqtpgraphsfilledcurve.h" +#include "jkqtplottergui/jkqtpcomboboxes.h" + + + + +TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : + QWidget(parent) +{ + + ovlCnt=0; + ovlTime.start(); + + + plot=new JKQtPlotter(true, this); + plot->set_doDrawing(false); + plotBot=new JKQtPlotter(false, this, plot->getDatastore()); + plotBot2=new JKQtPlotter(false, this, plot->getDatastore()); + ovl1=new JKQTPoverlayVerticalLine(0.0, tr("test"), plot->get_plotter()); + plot->get_plotter()->addOverlayElement(ovl1); + plot->setObjectName("plot"); + plotBot->setObjectName("plotBot"); + plotBot2->setObjectName("plotBot2"); + plot->get_plotter()->set_plotLabel("Plot Label $1.\\alpha$"); + plot->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); + plotBot->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); + plotBot2->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); + + QListView* listPlots=new QListView(this); + listPlots->setModel(plot->get_plotter()->getPlotsModel()); + listPlots->setMaximumWidth(256); + QVBoxLayout* layout=new QVBoxLayout(this); + QGridLayout* layout_grid=new QGridLayout(this); + layout_grid->addWidget(plot,0,0,1,1); + layout_grid->addWidget(plotBot,1,0,1,1); + layout_grid->addWidget(listPlots,0,1,1,1); + layout_grid->setColumnStretch(0,1); + layout->addLayout(layout_grid,2); + layout->addWidget(plotBot2,1); + setLayout(layout); + resize(1000, 800); + + plotBot->synchronizeToMaster(plot, true, false); + connect(plot, SIGNAL(zoomChangedLocally(double,double,double,double,JKQtPlotter*)), plotBot, SLOT(synchronizeXAxis(double,double,double,double,JKQtPlotter*))); + plot->get_plotter()->set_gridPrinting(true); + plot->get_plotter()->addGridPrintingPlotter(0,1,plotBot->get_plotter()); + plot->get_plotter()->addGridPrintingPlotter(0,2,plotBot2->get_plotter()); + + plot->get_plotter()->get_xAxis()->set_axisLabel("$x$ axis with greek letters $\\sqrt{\\alpha\\cdot\\beta}$"); + plot->get_plotter()->get_yAxis()->set_axisLabel("$y$-axis label $f(x)=\\sin\\left(x^2\\right)$ [unit]"); + + plotBot->get_plotter()->get_xAxis()->set_axisLabel(plot->get_plotter()->get_xAxis()->get_axisLabel()); + plotBot->get_plotter()->get_yAxis()->set_axisLabel("$y$-axis 2 [unit]"); + plotBot2->get_plotter()->get_xAxis()->set_axisLabel(plot->get_plotter()->get_xAxis()->get_axisLabel()); + plotBot2->get_plotter()->get_yAxis()->set_axisLabel("$y$-axis 3 [unit]"); + plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(2.5, "tick 1"); + plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(7.5, "tick 2"); + plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(12.5, "tick 3"); + plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(17.5, "tick 4"); + + + for (unsigned int i=0; iget_plotter()->getDatastore(); + + //size_t cx1=ds->addColumn(x1, N1, "x1"); + //size_t cy11=ds->addColumn(y11, N1, "y11"); + //size_t cy12=ds->addColumn(y12, N1, "y12"); + //size_t cy13=ds->addColumn(y13, N1, "y13"); + + //plot->addGraph(cx1, cy11, "$\\sin(x)$", JKQTPpoints); + //plot->addGraph(cy12, cx1, "$\\cos(x)$", JKQTPfilledCurveY); + //plot->addGraphWithXError(cy12, cx1, cy13, "$\\cos(x)$ with errors", JKQTPfilledCurveY, JKQTPerrorPolygons); + + for (unsigned int i=0; iaddColumn(x2, N2, "x2"); + size_t cy21=ds->addColumn(y21, N2, "y21"); + size_t cy22=ds->addColumn(y22, N2, "y22"); +// size_t cy23=ds->addColumn(y23, N2, "y23"); + //size_t cy24=ds->addColumn(y24, N2, "y24"); + size_t cx2r=ds->addColumn(x2r, N2, "x2r"); + size_t cy21r=ds->addColumn(y21r, N2, "y21r"); + size_t cy21re=ds->addColumn(y21re, N2, "y21re"); + + + size_t id=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPfilledCurveX); + JKQTPfilledCurveXGraph* fcxgr=qobject_cast(plot->get_plotter()->getGraph(id)); + if (fcxgr) { + fcxgr->set_baseline(2); + } + + size_t yeb=plot->get_plotter()->addGraphWithXYError(cx2, cy21, cy22, cy22, "sine with errors", JKQTPfilledCurveX); + plteErrors=plot->get_plotter()->getGraph(yeb); + setErrorStyle(0); + yeb=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPlinesPoints); + plteSymbols=plot->get_plotter()->getGraph(yeb); + + pltePlot2=new JKQTPxyLineErrorGraph(plotBot->get_plotter()); + pltePlot2->set_xColumn(cx2r); + pltePlot2->set_yColumn(cy21r); + pltePlot2->set_title(tr("random numbers")); + pltePlot2->set_drawLine(true); + pltePlot2->set_yErrorColumn(cy21re); + pltePlot2->set_yErrorStyle(JKQTPerrorBarsPolygons); + pltePlot2->set_symbol(JKQTPfilledStar); + plotBot->get_plotter()->addGraph(pltePlot2); + plotBot->zoomToFit(); + + + for (unsigned int i=0; iget_xAxis()->addAxisTickLabel(i+1, QString("$\\pi_{%1}\\cdot 10^{%2}$").arg(i+1).arg(i+1-N3)); + //plot->get_yAxis()->addAxisTickLabel(i+1, QString("$\\pi_{%1}\\cdot 10^{%2}$").arg(i+1).arg(i+1-N3)); + } + + size_t cbp=ds->addLinearColumn(N3, 2, N3+2, "boxplot_x"); + size_t cbxbox=ds->addColumn(xbox, N3, "xbox_log"); + size_t cbmean=ds->addColumn(ymean, N3, "ymean"); + size_t cbmed=ds->addColumn(ymed, N3, "ymed"); + size_t cbmin=ds->addColumn(ymin, N3, "ymin"); + size_t cbmax=ds->addColumn(ymax, N3, "ymax"); + size_t cbp25=ds->addColumn(yp25, N3, "yp25"); + size_t cbp75=ds->addColumn(yp75, N3, "yp75"); + + + QVector cb; + cb.push_back(ds->addColumn(b1, N3, "b1")); + cb.push_back(ds->addColumn(b2, N3, "b2")); + cb.push_back(ds->addColumn(b3, N3, "b3")); + QStringList ts; + ts<<"bars 1"<<"bars 2"<<"bars 3"; + plot->get_plotter()->addVerticalBargraph(cb, cbp, ts); + + JKQTPverticalRange* r1=new JKQTPverticalRange(plot->get_plotter()); + r1->set_rangeMin(5); + r1->set_rangeMax(10); + r1->set_rangeCenter(7.5); + r1->set_title("vert. range"); + plot->get_plotter()->addGraph(r1); + + JKQTPhorizontalRange* r2=new JKQTPhorizontalRange(plot->get_plotter()); + r2->set_rangeMin(5); + r2->set_rangeMax(10); + r2->set_rangeCenter(7.5); + r2->set_title("hor. range"); + plot->get_plotter()->addGraph(r2); + + JKQTPboxplotVerticalGraph* box=new JKQTPboxplotVerticalGraph(plotBot2->get_plotter()); + box->set_posColumn(cbxbox); + box->set_medianColumn(cbmed); + box->set_meanColumn(cbmean); + box->set_minColumn(cbmin); + box->set_maxColumn(cbmax); + box->set_percentile25Column(cbp25); + box->set_percentile75Column(cbp75); + box->set_title("Boxplot"); + plotBot2->addGraph(box); + plotBot2->zoomToFit(); + + /*JKQTPyFunctionLineGraph* g=new JKQTPyFunctionLineGraph(&plot); + g->set_title("function 1"); + g->set_plotFunction(f1); + g->set_errorFunction(f1e); + g->set_drawErrorLines(true); + g->set_drawErrorPolygons(false); + g->set_color(QColor("red")); + plot->addGraph(g);*/ + + /*JKQTPxFunctionLineGraph* g=new JKQTPxFunctionLineGraph(&plot); + g->set_title("function 2"); + g->set_plotFunction(f2); + plot->addGraph(g);*/ + + /*JKQTPstepVerticalGraph* g=new JKQTPstepVerticalGraph(&plot); + g->set_xColumn(cy11); + g->set_yColumn(cx1); + g->set_fillCurve(true); + g->set_valuesCentered(true); + plot->addGraph(g); + plot->addGraph(cy11, cx1, "$\\sin(x)$", JKQTPpoints);*/ + + plot->set_doDrawing(true); + plot->get_plotter()->zoomToFit(true, false);//, true); + plot->get_plotter()->set_keyAutosize(true); + + QCheckBox* chklogX=new QCheckBox("logarithmic X-axis", this); + QCheckBox* chklogY=new QCheckBox("logarithmic Y-axis", this); + connect(chklogX, SIGNAL(toggled(bool)), plot->get_plotter()->get_xAxis(), SLOT(set_logAxis(bool))); + connect(chklogY, SIGNAL(toggled(bool)), plot->get_plotter()->get_yAxis(), SLOT(set_logAxis(bool))); + connect(chklogX, SIGNAL(toggled(bool)), plotBot2->get_plotter()->get_xAxis(), SLOT(set_logAxis(bool))); + connect(chklogY, SIGNAL(toggled(bool)), plotBot2->get_plotter()->get_yAxis(), SLOT(set_logAxis(bool))); + layout->addWidget(chklogX); + layout->addWidget(chklogY); + QCheckBox* chkInvertX=new QCheckBox("invert X-axis", this); + QCheckBox* chkInvertY=new QCheckBox("invert Y-axis", this); + connect(chkInvertX, SIGNAL(toggled(bool)), plot->get_plotter()->get_xAxis(), SLOT(set_inverted(bool))); + connect(chkInvertY, SIGNAL(toggled(bool)), plot->get_plotter()->get_yAxis(), SLOT(set_inverted(bool))); + layout->addWidget(chkInvertX); + layout->addWidget(chkInvertY); + layout->addWidget(chkInvertX); + layout->addWidget(chkInvertY); + JKQTPSymbolComboBox* cmbJKQTPplotSymbol=new JKQTPSymbolComboBox(this); + cmbJKQTPplotSymbol->setSymbol(JKQTPplus); + connect(cmbJKQTPplotSymbol, SIGNAL(currentIndexChanged(int)), this, SLOT(setESSymbol(int))); + layout->addWidget(cmbJKQTPplotSymbol); + JKQTPerrorPlotstyleComboBox* cmbErrors=new JKQTPerrorPlotstyleComboBox(this); + cmbErrors->setCurrentErrorStyle(JKQTPerrorBars); + connect(cmbErrors, SIGNAL(currentIndexChanged(int)), this, SLOT(setErrorStyle(int))); + layout->addWidget(cmbErrors); + QDoubleSpinBox* spinScale=new QDoubleSpinBox(this); + spinScale->setRange(0.1,5); + spinScale->setSingleStep(0.1); + spinScale->setValue(1); + spinScale->setPrefix("magnification: "); + layout->addWidget(spinScale); + connect(spinScale, SIGNAL(valueChanged(double)), plot, SLOT(setMagnification(double))); + connect(spinScale, SIGNAL(valueChanged(double)), plotBot, SLOT(setMagnification(double))); + connect(spinScale, SIGNAL(valueChanged(double)), plotBot2, SLOT(setMagnification(double))); + + QComboBox* cmbSortOrder2=new QComboBox(this); + cmbSortOrder2->addItem(tr("plot 2: unsorted")); + cmbSortOrder2->addItem(tr("plot 2: sort X")); + cmbSortOrder2->addItem(tr("plot 2: sort Y")); + connect(cmbSortOrder2, SIGNAL(currentIndexChanged(int)), this, SLOT(setSortOrder2(int))); + layout->addWidget(cmbSortOrder2); + + + JKQTPkeyLayoutComboBox* cmbKeyLayout=new JKQTPkeyLayoutComboBox(this); + connect(cmbKeyLayout, SIGNAL(currentLayoutChanged(JKQTPkeyLayout)), this, SLOT(setKeyLayout2(JKQTPkeyLayout))); + layout->addWidget(cmbKeyLayout); + + + JKQTPkeyPositionComboBox* cmbKeyPos=new JKQTPkeyPositionComboBox(this); + connect(cmbKeyPos, SIGNAL(currentPositionChanged(JKQTPkeyPosition)), this, SLOT(setKeyPos2(JKQTPkeyPosition))); + layout->addWidget(cmbKeyPos); + + + + + + + + + + + + + + + QTimer::singleShot(50, this, SLOT(moveovl())); + +} + +void TestWidgetGraphs::moveovl() { + ovl1->set_position(ovl1->get_position()+0.1); + if (ovl1->get_position()>30) ovl1->set_position(0); + ovlCnt++; + if (ovlCnt>20) { + double fps=double(ovlCnt)/(double(ovlTime.elapsed())/1000.0); + ovl1->set_text(QString("%1 fps").arg(fps)); + ovlCnt=0; + ovlTime.start(); + } + plot->update_overlays(); + QTimer::singleShot(10, this, SLOT(moveovl())); +} + + +void TestWidgetGraphs::setErrorStyle(int /*index*/) +{ + QComboBox* cmb=qobject_cast(sender()); + if (cmb) { + JKQTPxyGraphErrors* exy=dynamic_cast(plteErrors); +// JKQTPxGraphErrors* ex=dynamic_cast(plteErrors); + JKQTPyGraphErrors* ey=dynamic_cast(plteErrors); + if (exy) { + exy->set_yErrorStyle(String2JKQTPerrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); + } + if (ey) { + ey->set_yErrorStyle(String2JKQTPerrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); + } + plot->update_plot(); + } +} + +void TestWidgetGraphs::setESSymbol(int /*index*/) +{ + QComboBox* cmb=qobject_cast(sender()); + if (cmb) { + JKQTPxyLineGraph* exy=dynamic_cast(plteSymbols); + if (exy) { + exy->set_symbol(String2JKQTPgraphSymbols(cmb->itemData(cmb->currentIndex()).toString())); + } + + plot->update_plot(); + } +} + + +void TestWidgetGraphs::setSortOrder2(int index) +{ + if (index==0) pltePlot2->set_sortData(JKQTPxyGraph::Unsorted); + if (index==1) pltePlot2->set_sortData(JKQTPxyLineGraph::SortedX); + if (index==2) pltePlot2->set_sortData(JKQTPxyLineGraph::SortedY); + plotBot->update_plot(); +} + +void TestWidgetGraphs::setKeyLayout2(JKQTPkeyLayout layout) +{ + plot->get_plotter()->set_keyLayout(layout); + plotBot->get_plotter()->set_keyLayout(layout); + plotBot2->get_plotter()->set_keyLayout(layout); + plot->update_plot(); + plotBot->update_plot(); + plotBot2->update_plot(); +} + +void TestWidgetGraphs::setKeyPos2(JKQTPkeyPosition layout) +{ + plot->get_plotter()->set_keyPosition(layout); + plotBot->get_plotter()->set_keyPosition(layout); + plotBot2->get_plotter()->set_keyPosition(layout); + plot->update_plot(); + plotBot->update_plot(); + plotBot2->update_plot(); +} diff --git a/test/jkqtplot_test/TestWidgetGraphs.h b/examples/jkqtplot_test/TestWidgetGraphs.h similarity index 95% rename from test/jkqtplot_test/TestWidgetGraphs.h rename to examples/jkqtplot_test/TestWidgetGraphs.h index 01b9788733..49926ee021 100644 --- a/test/jkqtplot_test/TestWidgetGraphs.h +++ b/examples/jkqtplot_test/TestWidgetGraphs.h @@ -1,74 +1,74 @@ -#ifndef TestWidgetGraphs_H -#define TestWidgetGraphs_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottertools/jkqtptools.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetGraphs : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetGraphs(QWidget *parent = 0); - - signals: - - public slots: - void moveovl(); - - void setErrorStyle(int index); - void setESSymbol(int index); - - - void setSortOrder2(int index); - - void setKeyLayout2(JKQTPkeyLayout layout); - void setKeyPos2(JKQTPkeyPosition layout); - - protected: - double x1[N1], x2[N2], x2r[N2]/*, x3[N3]*/; - double y11[N1], y12[N1], y13[N1], y21[N2], y21r[N2], y21re[N2], y22[N2], y23[N2], y24[N2]; - double xbox[N3], ymed[N3], ymean[N3], ymin[N3], ymax[N3], yp25[N3], yp75[N3]; - double b1[N3], b2[N3], b3[N3]; - - - JKQTPoverlayVerticalLine* ovl1; - JKQtPlotter* plot; - JKQtPlotter* plotLOG; - JKQtPlotter* plotBot; - JKQtPlotter* plotBot2; - - JKQTPplotElement* plteErrors; - JKQTPplotElement* plteSymbols; - JKQTPxyLineErrorGraph* pltePlot2; - - - int ovlCnt; - QElapsedTimer ovlTime; - - -}; - - -#endif // TestWidgetGraphs_H +#ifndef TestWidgetGraphs_H +#define TestWidgetGraphs_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottertools/jkqtptools.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetGraphs : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetGraphs(QWidget *parent = 0); + + signals: + + public slots: + void moveovl(); + + void setErrorStyle(int index); + void setESSymbol(int index); + + + void setSortOrder2(int index); + + void setKeyLayout2(JKQTPkeyLayout layout); + void setKeyPos2(JKQTPkeyPosition layout); + + protected: + double x1[N1], x2[N2], x2r[N2]/*, x3[N3]*/; + double y11[N1], y12[N1], y13[N1], y21[N2], y21r[N2], y21re[N2], y22[N2], y23[N2], y24[N2]; + double xbox[N3], ymed[N3], ymean[N3], ymin[N3], ymax[N3], yp25[N3], yp75[N3]; + double b1[N3], b2[N3], b3[N3]; + + + JKQTPoverlayVerticalLine* ovl1; + JKQtPlotter* plot; + JKQtPlotter* plotLOG; + JKQtPlotter* plotBot; + JKQtPlotter* plotBot2; + + JKQTPplotElement* plteErrors; + JKQTPplotElement* plteSymbols; + JKQTPxyLineErrorGraph* pltePlot2; + + + int ovlCnt; + QElapsedTimer ovlTime; + + +}; + + +#endif // TestWidgetGraphs_H diff --git a/test/jkqtplot_test/TestWidgetImages.cpp b/examples/jkqtplot_test/TestWidgetImages.cpp similarity index 97% rename from test/jkqtplot_test/TestWidgetImages.cpp rename to examples/jkqtplot_test/TestWidgetImages.cpp index 728a764f12..dec33b0aed 100644 --- a/test/jkqtplot_test/TestWidgetImages.cpp +++ b/examples/jkqtplot_test/TestWidgetImages.cpp @@ -1,133 +1,133 @@ -#include "TestWidgetImages.h" -#include -#include -#include -#include -#include "jkqtplottergui/jkqtpcomboboxes.h" - - - - - - -TestWidgetImages::TestWidgetImages(QWidget *parent) : - QWidget(parent) -{ - - QVBoxLayout* layouti=new QVBoxLayout(this); - QFormLayout* layWid=new QFormLayout; - layouti->addLayout(layWid); - setLayout(layouti); - resize(1000, 800); - plotImg=new JKQtPlotter(true, this); - plotImg->set_doDrawing(false); - plotImg->get_plotter()->set_plotLabel(tr("\\textbf{image plot}")); - plotImg->setObjectName("plotImg"); - plotImg->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_img/"); - - plotImg->get_plotter()->set_maintainAspectRatio(true); - plotImg->get_plotter()->set_aspectRatio(3.0/2.0); - plotImg->get_plotter()->set_maintainAxisAspectRatio(true); - plotImg->get_plotter()->set_axisAspectRatio(4.0); - /*plotImg->get_plotter()->get_xAxis()->set_linkedAxis(plotImg->get_plotter()->get_yAxis()); - plotImg->get_plotter()->get_xAxis()->set_changeWidthToAspectRatio(true); - plotImg->get_plotter()->get_xAxis()->set_aspectRatio(1.0);*/ - - - layouti->addWidget(plotImg); - plotImg->setXY(0,30,0,20); - plotImg->setAbsoluteXY(0,30,0,20); - img1=QImage(":/lena.png"); - JKQTPImage* pimg1=new JKQTPImage(0,0,10,20, &img1, plotImg->get_plotter()); - pimg1->set_title("LENA"); - plotImg->get_plotter()->addGraph(pimg1); - double* img2=(double*)calloc(100*100,sizeof(double)); - int32_t* img2M=(int32_t*)calloc(100*100,sizeof(int32_t)); - bool* bimg2=(bool*)calloc(100*100,sizeof(bool)); - for (int x=0; x<100; x++) { - for (int y=0; y<100; y++) { - img2[y*100+x]=sin(2*M_PI*sqrt(1.0+x*x+y*y)/20); - img2M[y*100+x]=abs(y-x); - bimg2[y*100+x]=static_cast(rand())/static_cast(RAND_MAX)>0.9; - } - } - pimg2=new JKQTPMathImage(10,0,10,10, JKQTPMathImageBase::DoubleArray, img2, 100, 100, JKQTPMathImageGRAY, plotImg->get_plotter()); - pimg2->set_imageMin(-1); - pimg2->set_imageMax(0.5); - pimg2->set_imageName("left image"); - pimg2->set_title("left image"); - pimg2->set_autoImageRange(false); - pimg2->set_colorBarTopVisible(true); - pimg2->set_colorBarRightVisible(false); - plotImg->get_plotter()->addGraph(pimg2); - pimg3=new JKQTPMathImage(20,0,10,10, JKQTPMathImageBase::DoubleArray, img2, 100, 100, JKQTPMathImageMATLAB, plotImg->get_plotter()); - pimg3->set_colorBarTopVisible(true); - pimg3->set_colorBarRightVisible(true); - pimg3->set_imageMax(0.5); - pimg3->set_rangeMaxFailAction(JKQTPMathImageGivenColor); - pimg3->set_rangeMaxFailColor(QColor("salmon")); - pimg3->set_imageMin(-0.3); - pimg3->set_rangeMinFailAction(JKQTPMathImageTransparent); - pimg3->set_autoImageRange(false); - pimg3->set_imageName("I(x,y)=\\sin\\left(\\frac{2\\pi\\cdot\\sqrt{1+x^2+y^2}}{20}\\right)"); - pimg3->set_dataModifier(img2M, JKQTPMathImageBase::Int32Array); - pimg3->set_modifierMode(JKQTPMathImageBase::ModifyNone); - pimg3->set_title("right image"); - plotImg->get_plotter()->addGraph(pimg3); - - QColor ty=QColor("blue"); - ty.setAlphaF(0.1); - JKQTPOverlayImage* oimg1=new JKQTPOverlayImage(10,0,10,10, bimg2, 100, 100, QColor("blue"), plotImg->get_plotter()); - oimg1->set_title("overlay"); - oimg1->set_falseColor(ty); - plotImg->get_plotter()->addGraph(oimg1); - - JKQTPOverlayImageEnhanced* oimg2=new JKQTPOverlayImageEnhanced(10,0,10,10, bimg2, 100, 100, QColor("red"), plotImg->get_plotter()); - oimg2->set_title("enhanced overlay"); - oimg2->set_drawAsRectangles(false); - plotImg->get_plotter()->addGraph(oimg2); - - plotImg->set_doDrawing(true); - plotImg->zoomToFit(); - - JKQTPMathImageColorPaletteComboBox* cmbPal=new JKQTPMathImageColorPaletteComboBox(this); - layWid->addRow("left image palette", cmbPal); - connect(cmbPal, SIGNAL(currentIndexChanged(int)), this, SLOT(setImgPalette1(int))); - cmbPal=new JKQTPMathImageColorPaletteComboBox(this); - layWid->addRow("right image palette", cmbPal); - connect(cmbPal, SIGNAL(currentIndexChanged(int)), this, SLOT(setImgPalette(int))); - QComboBox* cmb=new QComboBox(this); - layWid->addRow("image modifier mode", cmb); - cmb->addItem("none"); - cmb->addItem("value"); - cmb->addItem("lightness"); - cmb->addItem("alpha"); - connect(cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(setImgModifier(int))); - cmb->setCurrentIndex(1); - - - - - - - -} - - -void TestWidgetImages::setImgPalette(int index) -{ - pimg3->set_palette(index); - plotImg->update_plot(); -} - -void TestWidgetImages::setImgPalette1(int index) -{ - pimg2->set_palette(index); - plotImg->update_plot(); -} - -void TestWidgetImages::setImgModifier(int index) -{ - pimg3->set_modifierMode(JKQTPMathImage::ModifierMode(index)); - plotImg->update_plot(); -} +#include "TestWidgetImages.h" +#include +#include +#include +#include +#include "jkqtplottergui/jkqtpcomboboxes.h" + + + + + + +TestWidgetImages::TestWidgetImages(QWidget *parent) : + QWidget(parent) +{ + + QVBoxLayout* layouti=new QVBoxLayout(this); + QFormLayout* layWid=new QFormLayout; + layouti->addLayout(layWid); + setLayout(layouti); + resize(1000, 800); + plotImg=new JKQtPlotter(true, this); + plotImg->set_doDrawing(false); + plotImg->get_plotter()->set_plotLabel(tr("\\textbf{image plot}")); + plotImg->setObjectName("plotImg"); + plotImg->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_img/"); + + plotImg->get_plotter()->set_maintainAspectRatio(true); + plotImg->get_plotter()->set_aspectRatio(3.0/2.0); + plotImg->get_plotter()->set_maintainAxisAspectRatio(true); + plotImg->get_plotter()->set_axisAspectRatio(4.0); + /*plotImg->get_plotter()->get_xAxis()->set_linkedAxis(plotImg->get_plotter()->get_yAxis()); + plotImg->get_plotter()->get_xAxis()->set_changeWidthToAspectRatio(true); + plotImg->get_plotter()->get_xAxis()->set_aspectRatio(1.0);*/ + + + layouti->addWidget(plotImg); + plotImg->setXY(0,30,0,20); + plotImg->setAbsoluteXY(0,30,0,20); + img1=QImage(":/lena.png"); + JKQTPImage* pimg1=new JKQTPImage(0,0,10,20, &img1, plotImg->get_plotter()); + pimg1->set_title("LENA"); + plotImg->get_plotter()->addGraph(pimg1); + double* img2=(double*)calloc(100*100,sizeof(double)); + int32_t* img2M=(int32_t*)calloc(100*100,sizeof(int32_t)); + bool* bimg2=(bool*)calloc(100*100,sizeof(bool)); + for (int x=0; x<100; x++) { + for (int y=0; y<100; y++) { + img2[y*100+x]=sin(2*M_PI*sqrt(1.0+x*x+y*y)/20); + img2M[y*100+x]=abs(y-x); + bimg2[y*100+x]=static_cast(rand())/static_cast(RAND_MAX)>0.9; + } + } + pimg2=new JKQTPMathImage(10,0,10,10, JKQTPMathImageBase::DoubleArray, img2, 100, 100, JKQTPMathImageGRAY, plotImg->get_plotter()); + pimg2->set_imageMin(-1); + pimg2->set_imageMax(0.5); + pimg2->set_imageName("left image"); + pimg2->set_title("left image"); + pimg2->set_autoImageRange(false); + pimg2->set_colorBarTopVisible(true); + pimg2->set_colorBarRightVisible(false); + plotImg->get_plotter()->addGraph(pimg2); + pimg3=new JKQTPMathImage(20,0,10,10, JKQTPMathImageBase::DoubleArray, img2, 100, 100, JKQTPMathImageMATLAB, plotImg->get_plotter()); + pimg3->set_colorBarTopVisible(true); + pimg3->set_colorBarRightVisible(true); + pimg3->set_imageMax(0.5); + pimg3->set_rangeMaxFailAction(JKQTPMathImageGivenColor); + pimg3->set_rangeMaxFailColor(QColor("salmon")); + pimg3->set_imageMin(-0.3); + pimg3->set_rangeMinFailAction(JKQTPMathImageTransparent); + pimg3->set_autoImageRange(false); + pimg3->set_imageName("I(x,y)=\\sin\\left(\\frac{2\\pi\\cdot\\sqrt{1+x^2+y^2}}{20}\\right)"); + pimg3->set_dataModifier(img2M, JKQTPMathImageBase::Int32Array); + pimg3->set_modifierMode(JKQTPMathImageBase::ModifyNone); + pimg3->set_title("right image"); + plotImg->get_plotter()->addGraph(pimg3); + + QColor ty=QColor("blue"); + ty.setAlphaF(0.1); + JKQTPOverlayImage* oimg1=new JKQTPOverlayImage(10,0,10,10, bimg2, 100, 100, QColor("blue"), plotImg->get_plotter()); + oimg1->set_title("overlay"); + oimg1->set_falseColor(ty); + plotImg->get_plotter()->addGraph(oimg1); + + JKQTPOverlayImageEnhanced* oimg2=new JKQTPOverlayImageEnhanced(10,0,10,10, bimg2, 100, 100, QColor("red"), plotImg->get_plotter()); + oimg2->set_title("enhanced overlay"); + oimg2->set_drawAsRectangles(false); + plotImg->get_plotter()->addGraph(oimg2); + + plotImg->set_doDrawing(true); + plotImg->zoomToFit(); + + JKQTPMathImageColorPaletteComboBox* cmbPal=new JKQTPMathImageColorPaletteComboBox(this); + layWid->addRow("left image palette", cmbPal); + connect(cmbPal, SIGNAL(currentIndexChanged(int)), this, SLOT(setImgPalette1(int))); + cmbPal=new JKQTPMathImageColorPaletteComboBox(this); + layWid->addRow("right image palette", cmbPal); + connect(cmbPal, SIGNAL(currentIndexChanged(int)), this, SLOT(setImgPalette(int))); + QComboBox* cmb=new QComboBox(this); + layWid->addRow("image modifier mode", cmb); + cmb->addItem("none"); + cmb->addItem("value"); + cmb->addItem("lightness"); + cmb->addItem("alpha"); + connect(cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(setImgModifier(int))); + cmb->setCurrentIndex(1); + + + + + + + +} + + +void TestWidgetImages::setImgPalette(int index) +{ + pimg3->set_palette(index); + plotImg->update_plot(); +} + +void TestWidgetImages::setImgPalette1(int index) +{ + pimg2->set_palette(index); + plotImg->update_plot(); +} + +void TestWidgetImages::setImgModifier(int index) +{ + pimg3->set_modifierMode(JKQTPMathImage::ModifierMode(index)); + plotImg->update_plot(); +} diff --git a/test/jkqtplot_test/TestWidgetImages.h b/examples/jkqtplot_test/TestWidgetImages.h similarity index 95% rename from test/jkqtplot_test/TestWidgetImages.h rename to examples/jkqtplot_test/TestWidgetImages.h index 8a5284f7ba..c4ffa493d0 100644 --- a/test/jkqtplot_test/TestWidgetImages.h +++ b/examples/jkqtplot_test/TestWidgetImages.h @@ -1,56 +1,56 @@ -#ifndef TestWidgetImages_H -#define TestWidgetImages_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottertools/jkqtptools.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetImages : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetImages(QWidget *parent = 0); - - signals: - - public slots: - - - void setImgPalette(int index); - void setImgPalette1(int index); - void setImgModifier(int index); - - protected: - QImage img1; - - - JKQTPMathImage* pimg2; - JKQTPMathImage* pimg3; - JKQtPlotter* plotImg; - - -}; - - -#endif // TestWidgetImages_H +#ifndef TestWidgetImages_H +#define TestWidgetImages_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottertools/jkqtptools.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetImages : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetImages(QWidget *parent = 0); + + signals: + + public slots: + + + void setImgPalette(int index); + void setImgPalette1(int index); + void setImgModifier(int index); + + protected: + QImage img1; + + + JKQTPMathImage* pimg2; + JKQTPMathImage* pimg3; + JKQtPlotter* plotImg; + + +}; + + +#endif // TestWidgetImages_H diff --git a/test/jkqtplot_test/TestWidgetLogGraphs.cpp b/examples/jkqtplot_test/TestWidgetLogGraphs.cpp similarity index 97% rename from test/jkqtplot_test/TestWidgetLogGraphs.cpp rename to examples/jkqtplot_test/TestWidgetLogGraphs.cpp index 8deeef4f92..ccd3d19137 100644 --- a/test/jkqtplot_test/TestWidgetLogGraphs.cpp +++ b/examples/jkqtplot_test/TestWidgetLogGraphs.cpp @@ -1,113 +1,113 @@ -#include "TestWidgetLogGraphs.h" -#include -#include -#include -#include - - -#define N2 50 - - - -TestWidgetLogGraphs::TestWidgetLogGraphs(QWidget *parent) : - QWidget(parent) -{ - - JKQtPlotter* plotLOG=new JKQtPlotter(this); - plotLOG->set_doDrawing(false); - plotLOG->setObjectName("plotLOG"); - plotLOG->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plotLOG/"); - - JKQTPdatastore* ds=plotLOG->get_plotter()->getDatastore(); - QVector x,y; - for (unsigned int i=0; i(i+1)/static_cast(N2)*15.0; - x<addCopiedColumn(x, "x2"); - size_t cy23=ds->addCopiedColumn(y, "y23"); - - - QVBoxLayout* layout=new QVBoxLayout(); - layout->addWidget(plotLOG); - QFormLayout* layWid=new QFormLayout; - layout->addLayout(layWid); - setLayout(layout); - resize(1000, 800); - - - plotLOG->get_plotter()->addGraph(cx2, cy23, "data, $f(x)=5^{x/5}$", JKQTPlines); - - - plotLOG->set_doDrawing(true); - plotLOG->get_plotter()->zoomToFit(true, true);//, true); - plotLOG->get_plotter()->set_keyAutosize(true); - - QCheckBox* chklogX=new QCheckBox("logarithmic X-axis", this); - QCheckBox* chklogY=new QCheckBox("logarithmic Y-axis", this); - connect(chklogX, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_logAxis(bool))); - connect(chklogY, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_logAxis(bool))); - layWid->addWidget(chklogX); - layWid->addWidget(chklogY); - - - QCheckBox* chkXMinorTicks=new QCheckBox("minor X-tick labels", this); - QCheckBox* chkYMinorTicks=new QCheckBox("minor Y-tick labels", this); - connect(chkXMinorTicks, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_minorTickLabelsEnabled(bool))); - connect(chkYMinorTicks, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_minorTickLabelsEnabled(bool))); - layWid->addWidget(chkXMinorTicks); - layWid->addWidget(chkYMinorTicks); - - QCheckBox* chkFullNumberMinor=new QCheckBox("full minor numbers", this); - connect(chkFullNumberMinor, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_minorTickLabelFullNumber(bool))); - connect(chkFullNumberMinor, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_minorTickLabelFullNumber(bool))); - layWid->addWidget(chkFullNumberMinor); - - QComboBox* cmbTickMode=new QComboBox(this); - cmbTickMode->addItem("JKQTPLTMLinOrLog"); - cmbTickMode->addItem("JKQTPLTMLin"); - cmbTickMode->addItem("JKQTPLTMPower"); - connect(cmbTickMode, SIGNAL(currentIndexChanged(int)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_tickMode(int))); - layWid->addRow("X-Axis TickMode", cmbTickMode); - - cmbTickMode=new QComboBox(this); - cmbTickMode->addItem("JKQTPLTMLinOrLog"); - cmbTickMode->addItem("JKQTPLTMLin"); - cmbTickMode->addItem("JKQTPLTMPower"); - connect(cmbTickMode, SIGNAL(currentIndexChanged(int)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_tickMode(int))); - layWid->addRow("Y-Axis TickMode", cmbTickMode); - cmbTickMode->setCurrentIndex(0); - plotLOG->get_plotter()->get_yAxis()->set_tickMode(JKQTPLTMLinOrPower); - plotLOG->get_plotter()->get_yAxis()->set_minorTicks(1); - - plotLOG->get_plotter()->get_yAxis()->set_drawMode2(JKQTPCADMcomplete); - plotLOG->get_plotter()->get_xAxis()->set_drawMode2(JKQTPCADMcomplete); - - - - QSpinBox* spinMinTicks=new QSpinBox(this); - spinMinTicks->setRange(0,999); - connect(spinMinTicks, SIGNAL(valueChanged(int)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_minorTicks(int))); - connect(spinMinTicks, SIGNAL(valueChanged(int)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_minorTicks(int))); - layWid->addRow("X/Y-axis minor tick count", spinMinTicks); - spinMinTicks->setValue(1); - - QDoubleSpinBox* spinLOGAngle=new QDoubleSpinBox(this); - spinLOGAngle->setRange(-90,90); - spinLOGAngle->setSuffix(QLatin1String("°")); - connect(spinLOGAngle, SIGNAL(valueChanged(double)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_tickLabelAngle(double))); - layWid->addRow("X-Axis tick label angle", spinLOGAngle); - spinLOGAngle->setValue(0); - - spinLOGAngle=new QDoubleSpinBox(this); - spinLOGAngle->setRange(-90,90); - spinLOGAngle->setSuffix(QLatin1String("°")); - connect(spinLOGAngle, SIGNAL(valueChanged(double)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_tickLabelAngle(double))); - layWid->addRow(tr("Y-axis label angle = "), spinLOGAngle); - spinLOGAngle->setValue(0); - - -} - +#include "TestWidgetLogGraphs.h" +#include +#include +#include +#include + + +#define N2 50 + + + +TestWidgetLogGraphs::TestWidgetLogGraphs(QWidget *parent) : + QWidget(parent) +{ + + JKQtPlotter* plotLOG=new JKQtPlotter(this); + plotLOG->set_doDrawing(false); + plotLOG->setObjectName("plotLOG"); + plotLOG->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plotLOG/"); + + JKQTPdatastore* ds=plotLOG->get_plotter()->getDatastore(); + QVector x,y; + for (unsigned int i=0; i(i+1)/static_cast(N2)*15.0; + x<addCopiedColumn(x, "x2"); + size_t cy23=ds->addCopiedColumn(y, "y23"); + + + QVBoxLayout* layout=new QVBoxLayout(); + layout->addWidget(plotLOG); + QFormLayout* layWid=new QFormLayout; + layout->addLayout(layWid); + setLayout(layout); + resize(1000, 800); + + + plotLOG->get_plotter()->addGraph(cx2, cy23, "data, $f(x)=5^{x/5}$", JKQTPlines); + + + plotLOG->set_doDrawing(true); + plotLOG->get_plotter()->zoomToFit(true, true);//, true); + plotLOG->get_plotter()->set_keyAutosize(true); + + QCheckBox* chklogX=new QCheckBox("logarithmic X-axis", this); + QCheckBox* chklogY=new QCheckBox("logarithmic Y-axis", this); + connect(chklogX, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_logAxis(bool))); + connect(chklogY, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_logAxis(bool))); + layWid->addWidget(chklogX); + layWid->addWidget(chklogY); + + + QCheckBox* chkXMinorTicks=new QCheckBox("minor X-tick labels", this); + QCheckBox* chkYMinorTicks=new QCheckBox("minor Y-tick labels", this); + connect(chkXMinorTicks, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_minorTickLabelsEnabled(bool))); + connect(chkYMinorTicks, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_minorTickLabelsEnabled(bool))); + layWid->addWidget(chkXMinorTicks); + layWid->addWidget(chkYMinorTicks); + + QCheckBox* chkFullNumberMinor=new QCheckBox("full minor numbers", this); + connect(chkFullNumberMinor, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_minorTickLabelFullNumber(bool))); + connect(chkFullNumberMinor, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_minorTickLabelFullNumber(bool))); + layWid->addWidget(chkFullNumberMinor); + + QComboBox* cmbTickMode=new QComboBox(this); + cmbTickMode->addItem("JKQTPLTMLinOrLog"); + cmbTickMode->addItem("JKQTPLTMLin"); + cmbTickMode->addItem("JKQTPLTMPower"); + connect(cmbTickMode, SIGNAL(currentIndexChanged(int)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_tickMode(int))); + layWid->addRow("X-Axis TickMode", cmbTickMode); + + cmbTickMode=new QComboBox(this); + cmbTickMode->addItem("JKQTPLTMLinOrLog"); + cmbTickMode->addItem("JKQTPLTMLin"); + cmbTickMode->addItem("JKQTPLTMPower"); + connect(cmbTickMode, SIGNAL(currentIndexChanged(int)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_tickMode(int))); + layWid->addRow("Y-Axis TickMode", cmbTickMode); + cmbTickMode->setCurrentIndex(0); + plotLOG->get_plotter()->get_yAxis()->set_tickMode(JKQTPLTMLinOrPower); + plotLOG->get_plotter()->get_yAxis()->set_minorTicks(1); + + plotLOG->get_plotter()->get_yAxis()->set_drawMode2(JKQTPCADMcomplete); + plotLOG->get_plotter()->get_xAxis()->set_drawMode2(JKQTPCADMcomplete); + + + + QSpinBox* spinMinTicks=new QSpinBox(this); + spinMinTicks->setRange(0,999); + connect(spinMinTicks, SIGNAL(valueChanged(int)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_minorTicks(int))); + connect(spinMinTicks, SIGNAL(valueChanged(int)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_minorTicks(int))); + layWid->addRow("X/Y-axis minor tick count", spinMinTicks); + spinMinTicks->setValue(1); + + QDoubleSpinBox* spinLOGAngle=new QDoubleSpinBox(this); + spinLOGAngle->setRange(-90,90); + spinLOGAngle->setSuffix(QLatin1String("°")); + connect(spinLOGAngle, SIGNAL(valueChanged(double)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_tickLabelAngle(double))); + layWid->addRow("X-Axis tick label angle", spinLOGAngle); + spinLOGAngle->setValue(0); + + spinLOGAngle=new QDoubleSpinBox(this); + spinLOGAngle->setRange(-90,90); + spinLOGAngle->setSuffix(QLatin1String("°")); + connect(spinLOGAngle, SIGNAL(valueChanged(double)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_tickLabelAngle(double))); + layWid->addRow(tr("Y-axis label angle = "), spinLOGAngle); + spinLOGAngle->setValue(0); + + +} + diff --git a/test/jkqtplot_test/TestWidgetLogGraphs.h b/examples/jkqtplot_test/TestWidgetLogGraphs.h similarity index 95% rename from test/jkqtplot_test/TestWidgetLogGraphs.h rename to examples/jkqtplot_test/TestWidgetLogGraphs.h index 7581227e93..e462b30dd6 100644 --- a/test/jkqtplot_test/TestWidgetLogGraphs.h +++ b/examples/jkqtplot_test/TestWidgetLogGraphs.h @@ -1,45 +1,45 @@ -#ifndef TestWidgetLogGraphs_H -#define TestWidgetLogGraphs_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottertools/jkqtptools.h" - - - - - - -class TestWidgetLogGraphs : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetLogGraphs(QWidget *parent = 0); - - signals: - - public slots: - - - protected: - - - -}; - - -#endif // TestWidgetLogGraphs_H +#ifndef TestWidgetLogGraphs_H +#define TestWidgetLogGraphs_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottertools/jkqtptools.h" + + + + + + +class TestWidgetLogGraphs : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetLogGraphs(QWidget *parent = 0); + + signals: + + public slots: + + + protected: + + + +}; + + +#endif // TestWidgetLogGraphs_H diff --git a/test/jkqtplot_test/TestWidgetParamScatterPlots.cpp b/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp similarity index 96% rename from test/jkqtplot_test/TestWidgetParamScatterPlots.cpp rename to examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp index f1c5ee0239..39cec268cf 100644 --- a/test/jkqtplot_test/TestWidgetParamScatterPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp @@ -1,100 +1,100 @@ -#include "TestWidgetParamScatterPlots.h" -#include -#include -#include -#include - - - - - - -TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : - QWidget(parent) -{ - - QVBoxLayout* layoutPSP=new QVBoxLayout(this); - - setLayout(layoutPSP); - resize(1000, 800); - plotPSP=new JKQtPlotter(true, this); - plotPSP->set_doDrawing(false); - plotPSP->get_plotter()->set_plotLabel(tr("\\textbf{parametrized scatter plots}")); - plotPSP->setObjectName("plotPSP"); - plotPSP->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); - - layoutPSP->addWidget(plotPSP); - - QVector dataX, dataY, dataY1, dataY2, dataY3, dataC, dataS, dataI, dataSy ; - for (int i=0; i<100; i++) { - dataI<getDatastore()->addCopiedColumn(dataX, "x"); - int pspy=plotPSP->getDatastore()->addCopiedColumn(dataY, "y"); - int pspy1=plotPSP->getDatastore()->addCopiedColumn(dataY1, "y1"); - int pspy2=plotPSP->getDatastore()->addCopiedColumn(dataY2, "y2"); - int pspy3=plotPSP->getDatastore()->addCopiedColumn(dataY2, "y3"); - int pspc=plotPSP->getDatastore()->addCopiedColumn(dataC, "color"); - int psps=plotPSP->getDatastore()->addCopiedColumn(dataS, "size"); - int pspsy=plotPSP->getDatastore()->addCopiedColumn(dataSy, "symbol"); - - pltePSPCol=new JKQTPxyParametrizedErrorScatterGraph(plotPSP->get_plotter()); - pltePSPCol->set_title(tr("changing color")); - pltePSPCol->set_xColumn(pspx); - pltePSPCol->set_yColumn(pspy); - pltePSPCol->set_colorColumn(pspc); - pltePSPCol->set_yErrorColumn(pspy1); - pltePSPCol->set_yErrorColumnLower(pspy2); - pltePSPCol->set_yErrorSymmetric(true); - pltePSPCol->set_drawLine(true); - plotPSP->get_plotter()->addGraph(pltePSPCol); - - pltePSPSize=new JKQTPxyParametrizedScatterGraph(plotPSP->get_plotter()); - pltePSPSize->set_xColumn(pspx); - pltePSPSize->set_yColumn(pspy1); - pltePSPSize->set_sizeColumn(psps); - pltePSPSize->set_title(tr("changing size")); - plotPSP->get_plotter()->addGraph(pltePSPSize); - - - pltePSPSymb=new JKQTPxyParametrizedScatterGraph(plotPSP->get_plotter()); - pltePSPSymb->set_xColumn(pspx); - pltePSPSymb->set_yColumn(pspy3); - pltePSPSymb->set_symbolColumn(pspsy); - pltePSPSymb->set_title(tr("changing symbol")); - plotPSP->get_plotter()->addGraph(pltePSPSymb); - - plotPSP->set_doDrawing(true); - plotPSP->zoomToFit(); - - - QCheckBox* chkPSPErrorSymmetric=new QCheckBox(tr("symmetric errors"), this); - chkPSPErrorSymmetric->setChecked(true); - connect(chkPSPErrorSymmetric, SIGNAL(toggled(bool)), this, SLOT(setPSPSymmErrors(bool))); - layoutPSP->addWidget(chkPSPErrorSymmetric); - - - - - - - -} - -void TestWidgetParamScatterPlots::setPSPSymmErrors(bool checked) -{ - pltePSPCol->set_yErrorSymmetric(checked); - plotPSP->update_plot(); -} +#include "TestWidgetParamScatterPlots.h" +#include +#include +#include +#include + + + + + + +TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : + QWidget(parent) +{ + + QVBoxLayout* layoutPSP=new QVBoxLayout(this); + + setLayout(layoutPSP); + resize(1000, 800); + plotPSP=new JKQtPlotter(true, this); + plotPSP->set_doDrawing(false); + plotPSP->get_plotter()->set_plotLabel(tr("\\textbf{parametrized scatter plots}")); + plotPSP->setObjectName("plotPSP"); + plotPSP->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); + + layoutPSP->addWidget(plotPSP); + + QVector dataX, dataY, dataY1, dataY2, dataY3, dataC, dataS, dataI, dataSy ; + for (int i=0; i<100; i++) { + dataI<getDatastore()->addCopiedColumn(dataX, "x"); + int pspy=plotPSP->getDatastore()->addCopiedColumn(dataY, "y"); + int pspy1=plotPSP->getDatastore()->addCopiedColumn(dataY1, "y1"); + int pspy2=plotPSP->getDatastore()->addCopiedColumn(dataY2, "y2"); + int pspy3=plotPSP->getDatastore()->addCopiedColumn(dataY2, "y3"); + int pspc=plotPSP->getDatastore()->addCopiedColumn(dataC, "color"); + int psps=plotPSP->getDatastore()->addCopiedColumn(dataS, "size"); + int pspsy=plotPSP->getDatastore()->addCopiedColumn(dataSy, "symbol"); + + pltePSPCol=new JKQTPxyParametrizedErrorScatterGraph(plotPSP->get_plotter()); + pltePSPCol->set_title(tr("changing color")); + pltePSPCol->set_xColumn(pspx); + pltePSPCol->set_yColumn(pspy); + pltePSPCol->set_colorColumn(pspc); + pltePSPCol->set_yErrorColumn(pspy1); + pltePSPCol->set_yErrorColumnLower(pspy2); + pltePSPCol->set_yErrorSymmetric(true); + pltePSPCol->set_drawLine(true); + plotPSP->get_plotter()->addGraph(pltePSPCol); + + pltePSPSize=new JKQTPxyParametrizedScatterGraph(plotPSP->get_plotter()); + pltePSPSize->set_xColumn(pspx); + pltePSPSize->set_yColumn(pspy1); + pltePSPSize->set_sizeColumn(psps); + pltePSPSize->set_title(tr("changing size")); + plotPSP->get_plotter()->addGraph(pltePSPSize); + + + pltePSPSymb=new JKQTPxyParametrizedScatterGraph(plotPSP->get_plotter()); + pltePSPSymb->set_xColumn(pspx); + pltePSPSymb->set_yColumn(pspy3); + pltePSPSymb->set_symbolColumn(pspsy); + pltePSPSymb->set_title(tr("changing symbol")); + plotPSP->get_plotter()->addGraph(pltePSPSymb); + + plotPSP->set_doDrawing(true); + plotPSP->zoomToFit(); + + + QCheckBox* chkPSPErrorSymmetric=new QCheckBox(tr("symmetric errors"), this); + chkPSPErrorSymmetric->setChecked(true); + connect(chkPSPErrorSymmetric, SIGNAL(toggled(bool)), this, SLOT(setPSPSymmErrors(bool))); + layoutPSP->addWidget(chkPSPErrorSymmetric); + + + + + + + +} + +void TestWidgetParamScatterPlots::setPSPSymmErrors(bool checked) +{ + pltePSPCol->set_yErrorSymmetric(checked); + plotPSP->update_plot(); +} diff --git a/test/jkqtplot_test/TestWidgetParamScatterPlots.h b/examples/jkqtplot_test/TestWidgetParamScatterPlots.h similarity index 95% rename from test/jkqtplot_test/TestWidgetParamScatterPlots.h rename to examples/jkqtplot_test/TestWidgetParamScatterPlots.h index b5f282eab4..d9c8d920ad 100644 --- a/test/jkqtplot_test/TestWidgetParamScatterPlots.h +++ b/examples/jkqtplot_test/TestWidgetParamScatterPlots.h @@ -1,53 +1,53 @@ -#ifndef TestWidgetParamScatterPlots_H -#define TestWidgetParamScatterPlots_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottertools/jkqtptools.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetParamScatterPlots : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetParamScatterPlots(QWidget *parent = 0); - - signals: - - public slots: - - void setPSPSymmErrors(bool checked); - - protected: - - JKQtPlotter* plotPSP; - JKQTPxyParametrizedErrorScatterGraph* pltePSPCol; - JKQTPxyParametrizedScatterGraph* pltePSPSize; - JKQTPxyParametrizedScatterGraph* pltePSPSymb; - - - -}; - - -#endif // TestWidgetParamScatterPlots_H +#ifndef TestWidgetParamScatterPlots_H +#define TestWidgetParamScatterPlots_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottertools/jkqtptools.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetParamScatterPlots : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetParamScatterPlots(QWidget *parent = 0); + + signals: + + public slots: + + void setPSPSymmErrors(bool checked); + + protected: + + JKQtPlotter* plotPSP; + JKQTPxyParametrizedErrorScatterGraph* pltePSPCol; + JKQTPxyParametrizedScatterGraph* pltePSPSize; + JKQTPxyParametrizedScatterGraph* pltePSPSymb; + + + +}; + + +#endif // TestWidgetParamScatterPlots_H diff --git a/test/jkqtplot_test/TestWidgetPeaksPlots.cpp b/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp similarity index 97% rename from test/jkqtplot_test/TestWidgetPeaksPlots.cpp rename to examples/jkqtplot_test/TestWidgetPeaksPlots.cpp index c1fac15f5c..b8095c4ae0 100644 --- a/test/jkqtplot_test/TestWidgetPeaksPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp @@ -1,76 +1,76 @@ -#include "TestWidgetPeaksPlots.h" -#include -#include -#include -#include - - - - - - - -TestWidgetPeaksPlots::TestWidgetPeaksPlots(QWidget *parent) : - QWidget(parent) -{ - - - QVBoxLayout* layoutpeaks=new QVBoxLayout(this); - setLayout(layoutpeaks); - resize(1000, 800); - plotPeaks=new JKQtPlotter(true, this); - plotPeaks->set_doDrawing(false); - plotPeaks->get_plotter()->set_plotLabel(tr("\\textbf{peaks stream plot}")); - plotPeaks->setObjectName("plotPeaks"); - plotPeaks->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); - - QCheckBox* chkDrawBaseline=new QCheckBox(tr("draw baseline"), this); - chkDrawBaseline->setChecked(true); - connect(chkDrawBaseline, SIGNAL(toggled(bool)), this, SLOT(setDrawBaseline(bool))); - layoutpeaks->addWidget(chkDrawBaseline); - QCheckBox* chkYPeaks=new QCheckBox(tr("y peaks"), this); - chkYPeaks->setChecked(true); - connect(chkYPeaks, SIGNAL(toggled(bool)), this, SLOT(setYPeaks(bool))); - layoutpeaks->addWidget(chkYPeaks); - layoutpeaks->addWidget(plotPeaks); - - QVector photons1, photons2; - for (int i=0; i<1000; i++) { - double x=double(i)/1000.0; - const double p=0.33*fabs(sin(x*4.0*M_PI))*fabs(sin(x*4.0*M_PI)); - if (static_cast(rand())/static_cast(RAND_MAX)<=p) photons1<(rand())/static_cast(RAND_MAX)<=p) photons2<getDatastore()->addCopiedColumn(photons1, "photons 1"); - int phot2=plotPeaks->getDatastore()->addCopiedColumn(photons2, "photons 2"); - - graphPeakStream1=new JKQTPPeakStreamGraph(phot1, 0.05, 1, QColor("darkgreen"), plotPeaks->get_plotter()); - graphPeakStream1->set_title("channel 1"); - plotPeaks->get_plotter()->addGraph(graphPeakStream1); - graphPeakStream2=new JKQTPPeakStreamGraph(phot2, -0.05, -1, QColor("darkred"), plotPeaks->get_plotter()); - graphPeakStream2->set_title("channel 2"); - plotPeaks->get_plotter()->addGraph(graphPeakStream2); - - plotPeaks->set_doDrawing(true); - plotPeaks->zoomToFit(); - - - - - - -} - -void TestWidgetPeaksPlots::setDrawBaseline(bool checked) -{ - graphPeakStream1->set_drawBaseline(checked); - graphPeakStream2->set_drawBaseline(checked); - plotPeaks->update_plot(); -} - -void TestWidgetPeaksPlots::setYPeaks(bool checked) -{ - graphPeakStream1->set_yPeaks(checked); - graphPeakStream2->set_yPeaks(checked); - plotPeaks->update_plot(); -} +#include "TestWidgetPeaksPlots.h" +#include +#include +#include +#include + + + + + + + +TestWidgetPeaksPlots::TestWidgetPeaksPlots(QWidget *parent) : + QWidget(parent) +{ + + + QVBoxLayout* layoutpeaks=new QVBoxLayout(this); + setLayout(layoutpeaks); + resize(1000, 800); + plotPeaks=new JKQtPlotter(true, this); + plotPeaks->set_doDrawing(false); + plotPeaks->get_plotter()->set_plotLabel(tr("\\textbf{peaks stream plot}")); + plotPeaks->setObjectName("plotPeaks"); + plotPeaks->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); + + QCheckBox* chkDrawBaseline=new QCheckBox(tr("draw baseline"), this); + chkDrawBaseline->setChecked(true); + connect(chkDrawBaseline, SIGNAL(toggled(bool)), this, SLOT(setDrawBaseline(bool))); + layoutpeaks->addWidget(chkDrawBaseline); + QCheckBox* chkYPeaks=new QCheckBox(tr("y peaks"), this); + chkYPeaks->setChecked(true); + connect(chkYPeaks, SIGNAL(toggled(bool)), this, SLOT(setYPeaks(bool))); + layoutpeaks->addWidget(chkYPeaks); + layoutpeaks->addWidget(plotPeaks); + + QVector photons1, photons2; + for (int i=0; i<1000; i++) { + double x=double(i)/1000.0; + const double p=0.33*fabs(sin(x*4.0*M_PI))*fabs(sin(x*4.0*M_PI)); + if (static_cast(rand())/static_cast(RAND_MAX)<=p) photons1<(rand())/static_cast(RAND_MAX)<=p) photons2<getDatastore()->addCopiedColumn(photons1, "photons 1"); + int phot2=plotPeaks->getDatastore()->addCopiedColumn(photons2, "photons 2"); + + graphPeakStream1=new JKQTPPeakStreamGraph(phot1, 0.05, 1, QColor("darkgreen"), plotPeaks->get_plotter()); + graphPeakStream1->set_title("channel 1"); + plotPeaks->get_plotter()->addGraph(graphPeakStream1); + graphPeakStream2=new JKQTPPeakStreamGraph(phot2, -0.05, -1, QColor("darkred"), plotPeaks->get_plotter()); + graphPeakStream2->set_title("channel 2"); + plotPeaks->get_plotter()->addGraph(graphPeakStream2); + + plotPeaks->set_doDrawing(true); + plotPeaks->zoomToFit(); + + + + + + +} + +void TestWidgetPeaksPlots::setDrawBaseline(bool checked) +{ + graphPeakStream1->set_drawBaseline(checked); + graphPeakStream2->set_drawBaseline(checked); + plotPeaks->update_plot(); +} + +void TestWidgetPeaksPlots::setYPeaks(bool checked) +{ + graphPeakStream1->set_yPeaks(checked); + graphPeakStream2->set_yPeaks(checked); + plotPeaks->update_plot(); +} diff --git a/test/jkqtplot_test/TestWidgetPeaksPlots.h b/examples/jkqtplot_test/TestWidgetPeaksPlots.h similarity index 95% rename from test/jkqtplot_test/TestWidgetPeaksPlots.h rename to examples/jkqtplot_test/TestWidgetPeaksPlots.h index 0414e6700a..ba1b89dbf8 100644 --- a/test/jkqtplot_test/TestWidgetPeaksPlots.h +++ b/examples/jkqtplot_test/TestWidgetPeaksPlots.h @@ -1,45 +1,45 @@ -#ifndef TestWidgetPeaksPlots_H -#define TestWidgetPeaksPlots_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphspeakstream.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetPeaksPlots : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetPeaksPlots(QWidget *parent = nullptr); - - signals: - - public slots: - void setDrawBaseline(bool checked); - void setYPeaks(bool checked); - - protected: - - JKQtPlotter* plotPeaks; - JKQTPPeakStreamGraph* graphPeakStream1; - JKQTPPeakStreamGraph* graphPeakStream2; - - -}; - - -#endif // TestWidgetPeaksPlots_H +#ifndef TestWidgetPeaksPlots_H +#define TestWidgetPeaksPlots_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphspeakstream.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetPeaksPlots : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetPeaksPlots(QWidget *parent = nullptr); + + signals: + + public slots: + void setDrawBaseline(bool checked); + void setYPeaks(bool checked); + + protected: + + JKQtPlotter* plotPeaks; + JKQTPPeakStreamGraph* graphPeakStream1; + JKQTPPeakStreamGraph* graphPeakStream2; + + +}; + + +#endif // TestWidgetPeaksPlots_H diff --git a/test/jkqtplot_test/TestWidgetRGBImages.cpp b/examples/jkqtplot_test/TestWidgetRGBImages.cpp similarity index 97% rename from test/jkqtplot_test/TestWidgetRGBImages.cpp rename to examples/jkqtplot_test/TestWidgetRGBImages.cpp index e23852d512..04f5f6856c 100644 --- a/test/jkqtplot_test/TestWidgetRGBImages.cpp +++ b/examples/jkqtplot_test/TestWidgetRGBImages.cpp @@ -1,203 +1,203 @@ -#include "TestWidgetRGBImages.h" -#include -#include -#include -#include - - - - - - -TestWidgetRGBImages::TestWidgetRGBImages(QWidget *parent) : - QWidget(parent) -{ - - // plotter for images - QWidget* winrgb=new QWidget(this); - QVBoxLayout* layoutrgb=new QVBoxLayout(this); - QFormLayout* frm=new QFormLayout(nullptr); - winrgb->setLayout(layoutrgb); - winrgb->resize(1000, 800); - plotImgRGB=new JKQtPlotter(true, winrgb); - plotImgRGB->set_doDrawing(false); - plotImgRGB->get_plotter()->set_plotLabel(tr("\\textbf{RGB image plot}")); - plotImgRGB->setObjectName("plotImgRGB"); - plotImgRGB->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_img_rgb/"); - - /*plotImgRGB->get_plotter()->set_maintainAspectRatio(true); - plotImgRGB->get_plotter()->set_aspectRatio(1.0); - plotImgRGB->get_plotter()->set_maintainAxisAspectRatio(true); - plotImgRGB->get_plotter()->set_axisAspectRatio(1.0);*/ - - QCheckBox* chkColorbars=new QCheckBox(tr("color bars share space"), winrgb); - chkColorbars->setChecked(true); - connect(chkColorbars, SIGNAL(toggled(bool)), this, SLOT(setRGBColorBars(bool))); - layoutrgb->addWidget(chkColorbars); - layoutrgb->addLayout(frm); - layoutrgb->addWidget(plotImgRGB); - plotImgRGB->setXY(0,100,0,100); - plotImgRGB->setAbsoluteXY(0,100,0,100); - - rgb_rimg2=(double*)calloc(100*100,sizeof(double)); - rgb_bimg2=(double*)calloc(100*100,sizeof(double)); - rgb_gimg2=(double*)calloc(100*100,sizeof(double)); - rgb_aimg2=(double*)calloc(100*100,sizeof(double)); - for (int x=0; x<100; x++) { - for (int y=0; y<100; y++) { - rgb_rimg2[y*100+x]=sin(2*M_PI*sqrt(1.0+x*x+y*y)/20); - rgb_bimg2[y*100+x]=sin(2*M_PI*sqrt(1.0+x*x+y*y)/30); - rgb_gimg2[y*100+x]=cos(2*M_PI*sqrt(1.0+x*x+y*y)/30); - rgb_aimg2[y*100+x]=double(x)/100.0; - } - } - rgbimg=new JKQTPRGBMathImage(0,0,10,10, JKQTPMathImageBase::DoubleArray, rgb_rimg2, 100, 100, plotImgRGB->get_plotter()); - rgbimg->set_imageMin(-1); - rgbimg->set_imageMax(0.5); - rgbimg->set_imageMinB(-1); - rgbimg->set_imageMaxB(0.5); - rgbimg->set_imageName("R image"); - rgbimg->set_imageNameG("G image"); - rgbimg->set_imageNameB("B image"); - rgbimg->set_data(rgb_rimg2, rgb_gimg2, rgb_bimg2, 100, 100, JKQTPMathImageBase::DoubleArray); - rgbimg->set_dataModifier(rgb_aimg2, JKQTPMathImageBase::DoubleArray); - rgbimg->set_modifierMode(JKQTPMathImageBase::ModifyNone); - plotImgRGB->get_plotter()->addGraph(rgbimg); - rgbimg->set_autoImageRange(false); - rgbimg->set_colorBarTopVisible(true); - rgbimg->set_colorBarRightVisible(true); - rgbimg->set_colorbarsSideBySide(chkColorbars->isChecked()); - rgbimg2=new JKQTPColumnRGBMathImage(10,0,10,10,100,100, plotImgRGB->get_plotter()); - rgbimg2->set_imageMin(-1); - rgbimg2->set_imageMax(0.5); - rgbimg2->set_imageMinB(-1); - rgbimg2->set_imageMaxB(0.5); - rgbimg2->set_imageName("R image"); - rgbimg2->set_imageNameG("G image"); - rgbimg2->set_imageNameB("B image"); - rgbimg2->set_Nx(100); - rgbimg2->set_Ny(100); - rgbimg2->set_imageRColumn(rgb_colr=plotImgRGB->getDatastore()->addCopiedColumn(rgb_bimg2, 100*100, "R")); - rgbimg2->set_imageGColumn(rgb_colg=plotImgRGB->getDatastore()->addCopiedColumn(rgb_gimg2, 100*100, "G")); - rgbimg2->set_imageBColumn(rgb_colb=plotImgRGB->getDatastore()->addCopiedColumn(rgb_rimg2, 100*100, "B")); - rgbimg2->set_modifierColumn(rgb_cola=plotImgRGB->getDatastore()->addCopiedColumn(rgb_aimg2, 100*100, "alpha")); - rgbimg2->set_modifierMode(JKQTPMathImageBase::ModifyNone); - //rgbimg2->set_data(rgb_rimg2, rgb_gimg2, rgb_bimg2, 100, 100, JKQTPMathImageBase::DoubleArray); - plotImgRGB->get_plotter()->addGraph(rgbimg2); - rgbimg2->set_autoImageRange(true); - rgbimg2->set_colorBarTopVisible(true); - rgbimg2->set_colorBarRightVisible(true); - rgbimg2->set_colorbarsSideBySide(chkColorbars->isChecked()); - plotImgRGB->setAbsoluteXY(0,20,0,10); - plotImgRGB->set_doDrawing(true); - //plotImgRGB->zoomToFit(); - plotImgRGB->setXY(0,20,0,10); - - QComboBox* cmb=new QComboBox(winrgb); - frm->addRow(tr("mode 1:"), cmb); - cmb->addItem("RGB"); - cmb->addItem("HSV"); - cmb->addItem("HSL"); - cmb->addItem("CMY"); - cmb->setCurrentIndex(0); - connect(cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(setRGBMode1(int))); - - cmb=new QComboBox(winrgb); - frm->addRow(tr("mode 2:"), cmb); - cmb->addItem("RGB"); - cmb->addItem("HSV"); - cmb->addItem("HSL"); - cmb->addItem("CMY"); - connect(cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(setRGBMode2(int))); - cmb->setCurrentIndex(1); - - cmb=new QComboBox(winrgb); - frm->addRow(tr("modifier channel mode:"), cmb); - cmb->addItem("none"); - cmb->addItem("value"); - cmb->addItem("lightness"); - cmb->addItem("alpha"); - connect(cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(setRGBModifier(int))); - cmb->setCurrentIndex(0); - - QHBoxLayout* hblrgb=new QHBoxLayout(); - frm->addRow(tr("use channels:"), hblrgb); - - chkRGBUseR=new QCheckBox(tr("red"), winrgb); - hblrgb->addWidget(chkRGBUseR); - chkRGBUseR->setChecked(true); - connect(chkRGBUseR, SIGNAL(toggled(bool)), this, SLOT(updateRGBChannels())); - - chkRGBUseG=new QCheckBox(tr("green"), winrgb); - hblrgb->addWidget(chkRGBUseG); - chkRGBUseG->setChecked(true); - connect(chkRGBUseG, SIGNAL(toggled(bool)), this, SLOT(updateRGBChannels())); - - chkRGBUseB=new QCheckBox(tr("blue"), winrgb); - hblrgb->addWidget(chkRGBUseB); - chkRGBUseB->setChecked(true); - connect(chkRGBUseB, SIGNAL(toggled(bool)), this, SLOT(updateRGBChannels())); - - chkRGBUseA=new QCheckBox(tr("alpha"), winrgb); - hblrgb->addWidget(chkRGBUseA); - chkRGBUseB->setChecked(false); - connect(chkRGBUseB, SIGNAL(toggled(bool)), this, SLOT(updateRGBChannels())); - - - - - -} - -void TestWidgetRGBImages::setRGBColorBars(bool checked) -{ - rgbimg->set_colorbarsSideBySide(checked); - rgbimg2->set_colorbarsSideBySide(checked); - plotImgRGB->update_plot(); -} - -void TestWidgetRGBImages::setRGBMode1(int mode) -{ - rgbimg->set_rgbMode((JKQTPRGBMathImageRGBMode)mode); - plotImgRGB->update_plot(); -} - -void TestWidgetRGBImages::setRGBMode2(int mode) -{ - rgbimg2->set_rgbMode((JKQTPRGBMathImageRGBMode)mode); - plotImgRGB->update_plot(); -} - -void TestWidgetRGBImages::updateRGBChannels() -{ - if (chkRGBUseR->isChecked()) { - rgbimg->set_data(rgb_rimg2, 100, 100); - rgbimg2->set_imageRColumn(rgb_colr); - } else { - rgbimg->set_data(nullptr, 100, 100); - rgbimg2->set_imageRColumn(-1); - } - if (chkRGBUseG->isChecked()) { - rgbimg->set_dataG(rgb_gimg2); - rgbimg2->set_imageGColumn(rgb_colg); - } else { - rgbimg->set_dataG(nullptr); - rgbimg2->set_imageGColumn(-1); - } - if (chkRGBUseB->isChecked()) { - rgbimg->set_dataB(rgb_bimg2); - rgbimg2->set_imageBColumn(rgb_colb); - } else { - rgbimg->set_dataB(nullptr); - rgbimg2->set_imageBColumn(-1); - } - plotImgRGB->update_plot(); -} - -void TestWidgetRGBImages::setRGBModifier(int item) -{ - rgbimg->set_modifierMode(JKQTPMathImage::ModifierMode(item)); - rgbimg2->set_modifierMode(JKQTPMathImage::ModifierMode(item)); - plotImgRGB->update_plot(); -} - +#include "TestWidgetRGBImages.h" +#include +#include +#include +#include + + + + + + +TestWidgetRGBImages::TestWidgetRGBImages(QWidget *parent) : + QWidget(parent) +{ + + // plotter for images + QWidget* winrgb=new QWidget(this); + QVBoxLayout* layoutrgb=new QVBoxLayout(this); + QFormLayout* frm=new QFormLayout(nullptr); + winrgb->setLayout(layoutrgb); + winrgb->resize(1000, 800); + plotImgRGB=new JKQtPlotter(true, winrgb); + plotImgRGB->set_doDrawing(false); + plotImgRGB->get_plotter()->set_plotLabel(tr("\\textbf{RGB image plot}")); + plotImgRGB->setObjectName("plotImgRGB"); + plotImgRGB->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_img_rgb/"); + + /*plotImgRGB->get_plotter()->set_maintainAspectRatio(true); + plotImgRGB->get_plotter()->set_aspectRatio(1.0); + plotImgRGB->get_plotter()->set_maintainAxisAspectRatio(true); + plotImgRGB->get_plotter()->set_axisAspectRatio(1.0);*/ + + QCheckBox* chkColorbars=new QCheckBox(tr("color bars share space"), winrgb); + chkColorbars->setChecked(true); + connect(chkColorbars, SIGNAL(toggled(bool)), this, SLOT(setRGBColorBars(bool))); + layoutrgb->addWidget(chkColorbars); + layoutrgb->addLayout(frm); + layoutrgb->addWidget(plotImgRGB); + plotImgRGB->setXY(0,100,0,100); + plotImgRGB->setAbsoluteXY(0,100,0,100); + + rgb_rimg2=(double*)calloc(100*100,sizeof(double)); + rgb_bimg2=(double*)calloc(100*100,sizeof(double)); + rgb_gimg2=(double*)calloc(100*100,sizeof(double)); + rgb_aimg2=(double*)calloc(100*100,sizeof(double)); + for (int x=0; x<100; x++) { + for (int y=0; y<100; y++) { + rgb_rimg2[y*100+x]=sin(2*M_PI*sqrt(1.0+x*x+y*y)/20); + rgb_bimg2[y*100+x]=sin(2*M_PI*sqrt(1.0+x*x+y*y)/30); + rgb_gimg2[y*100+x]=cos(2*M_PI*sqrt(1.0+x*x+y*y)/30); + rgb_aimg2[y*100+x]=double(x)/100.0; + } + } + rgbimg=new JKQTPRGBMathImage(0,0,10,10, JKQTPMathImageBase::DoubleArray, rgb_rimg2, 100, 100, plotImgRGB->get_plotter()); + rgbimg->set_imageMin(-1); + rgbimg->set_imageMax(0.5); + rgbimg->set_imageMinB(-1); + rgbimg->set_imageMaxB(0.5); + rgbimg->set_imageName("R image"); + rgbimg->set_imageNameG("G image"); + rgbimg->set_imageNameB("B image"); + rgbimg->set_data(rgb_rimg2, rgb_gimg2, rgb_bimg2, 100, 100, JKQTPMathImageBase::DoubleArray); + rgbimg->set_dataModifier(rgb_aimg2, JKQTPMathImageBase::DoubleArray); + rgbimg->set_modifierMode(JKQTPMathImageBase::ModifyNone); + plotImgRGB->get_plotter()->addGraph(rgbimg); + rgbimg->set_autoImageRange(false); + rgbimg->set_colorBarTopVisible(true); + rgbimg->set_colorBarRightVisible(true); + rgbimg->set_colorbarsSideBySide(chkColorbars->isChecked()); + rgbimg2=new JKQTPColumnRGBMathImage(10,0,10,10,100,100, plotImgRGB->get_plotter()); + rgbimg2->set_imageMin(-1); + rgbimg2->set_imageMax(0.5); + rgbimg2->set_imageMinB(-1); + rgbimg2->set_imageMaxB(0.5); + rgbimg2->set_imageName("R image"); + rgbimg2->set_imageNameG("G image"); + rgbimg2->set_imageNameB("B image"); + rgbimg2->set_Nx(100); + rgbimg2->set_Ny(100); + rgbimg2->set_imageRColumn(rgb_colr=plotImgRGB->getDatastore()->addCopiedColumn(rgb_bimg2, 100*100, "R")); + rgbimg2->set_imageGColumn(rgb_colg=plotImgRGB->getDatastore()->addCopiedColumn(rgb_gimg2, 100*100, "G")); + rgbimg2->set_imageBColumn(rgb_colb=plotImgRGB->getDatastore()->addCopiedColumn(rgb_rimg2, 100*100, "B")); + rgbimg2->set_modifierColumn(rgb_cola=plotImgRGB->getDatastore()->addCopiedColumn(rgb_aimg2, 100*100, "alpha")); + rgbimg2->set_modifierMode(JKQTPMathImageBase::ModifyNone); + //rgbimg2->set_data(rgb_rimg2, rgb_gimg2, rgb_bimg2, 100, 100, JKQTPMathImageBase::DoubleArray); + plotImgRGB->get_plotter()->addGraph(rgbimg2); + rgbimg2->set_autoImageRange(true); + rgbimg2->set_colorBarTopVisible(true); + rgbimg2->set_colorBarRightVisible(true); + rgbimg2->set_colorbarsSideBySide(chkColorbars->isChecked()); + plotImgRGB->setAbsoluteXY(0,20,0,10); + plotImgRGB->set_doDrawing(true); + //plotImgRGB->zoomToFit(); + plotImgRGB->setXY(0,20,0,10); + + QComboBox* cmb=new QComboBox(winrgb); + frm->addRow(tr("mode 1:"), cmb); + cmb->addItem("RGB"); + cmb->addItem("HSV"); + cmb->addItem("HSL"); + cmb->addItem("CMY"); + cmb->setCurrentIndex(0); + connect(cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(setRGBMode1(int))); + + cmb=new QComboBox(winrgb); + frm->addRow(tr("mode 2:"), cmb); + cmb->addItem("RGB"); + cmb->addItem("HSV"); + cmb->addItem("HSL"); + cmb->addItem("CMY"); + connect(cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(setRGBMode2(int))); + cmb->setCurrentIndex(1); + + cmb=new QComboBox(winrgb); + frm->addRow(tr("modifier channel mode:"), cmb); + cmb->addItem("none"); + cmb->addItem("value"); + cmb->addItem("lightness"); + cmb->addItem("alpha"); + connect(cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(setRGBModifier(int))); + cmb->setCurrentIndex(0); + + QHBoxLayout* hblrgb=new QHBoxLayout(); + frm->addRow(tr("use channels:"), hblrgb); + + chkRGBUseR=new QCheckBox(tr("red"), winrgb); + hblrgb->addWidget(chkRGBUseR); + chkRGBUseR->setChecked(true); + connect(chkRGBUseR, SIGNAL(toggled(bool)), this, SLOT(updateRGBChannels())); + + chkRGBUseG=new QCheckBox(tr("green"), winrgb); + hblrgb->addWidget(chkRGBUseG); + chkRGBUseG->setChecked(true); + connect(chkRGBUseG, SIGNAL(toggled(bool)), this, SLOT(updateRGBChannels())); + + chkRGBUseB=new QCheckBox(tr("blue"), winrgb); + hblrgb->addWidget(chkRGBUseB); + chkRGBUseB->setChecked(true); + connect(chkRGBUseB, SIGNAL(toggled(bool)), this, SLOT(updateRGBChannels())); + + chkRGBUseA=new QCheckBox(tr("alpha"), winrgb); + hblrgb->addWidget(chkRGBUseA); + chkRGBUseB->setChecked(false); + connect(chkRGBUseB, SIGNAL(toggled(bool)), this, SLOT(updateRGBChannels())); + + + + + +} + +void TestWidgetRGBImages::setRGBColorBars(bool checked) +{ + rgbimg->set_colorbarsSideBySide(checked); + rgbimg2->set_colorbarsSideBySide(checked); + plotImgRGB->update_plot(); +} + +void TestWidgetRGBImages::setRGBMode1(int mode) +{ + rgbimg->set_rgbMode((JKQTPRGBMathImageRGBMode)mode); + plotImgRGB->update_plot(); +} + +void TestWidgetRGBImages::setRGBMode2(int mode) +{ + rgbimg2->set_rgbMode((JKQTPRGBMathImageRGBMode)mode); + plotImgRGB->update_plot(); +} + +void TestWidgetRGBImages::updateRGBChannels() +{ + if (chkRGBUseR->isChecked()) { + rgbimg->set_data(rgb_rimg2, 100, 100); + rgbimg2->set_imageRColumn(rgb_colr); + } else { + rgbimg->set_data(nullptr, 100, 100); + rgbimg2->set_imageRColumn(-1); + } + if (chkRGBUseG->isChecked()) { + rgbimg->set_dataG(rgb_gimg2); + rgbimg2->set_imageGColumn(rgb_colg); + } else { + rgbimg->set_dataG(nullptr); + rgbimg2->set_imageGColumn(-1); + } + if (chkRGBUseB->isChecked()) { + rgbimg->set_dataB(rgb_bimg2); + rgbimg2->set_imageBColumn(rgb_colb); + } else { + rgbimg->set_dataB(nullptr); + rgbimg2->set_imageBColumn(-1); + } + plotImgRGB->update_plot(); +} + +void TestWidgetRGBImages::setRGBModifier(int item) +{ + rgbimg->set_modifierMode(JKQTPMathImage::ModifierMode(item)); + rgbimg2->set_modifierMode(JKQTPMathImage::ModifierMode(item)); + plotImgRGB->update_plot(); +} + diff --git a/test/jkqtplot_test/TestWidgetRGBImages.h b/examples/jkqtplot_test/TestWidgetRGBImages.h similarity index 95% rename from test/jkqtplot_test/TestWidgetRGBImages.h rename to examples/jkqtplot_test/TestWidgetRGBImages.h index 7a822e5b56..ed7f245c3c 100644 --- a/test/jkqtplot_test/TestWidgetRGBImages.h +++ b/examples/jkqtplot_test/TestWidgetRGBImages.h @@ -1,69 +1,69 @@ -#ifndef TestWidgetRGBImages_H -#define TestWidgetRGBImages_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpelementsoverlay.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtplottergui/jkqtpgraphsmodel.h" -#include "jkqtplottertools/jkqtptools.h" - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestWidgetRGBImages : public QWidget -{ - Q_OBJECT - public: - explicit TestWidgetRGBImages(QWidget *parent = 0); - - signals: - - public slots: - void setRGBColorBars(bool checked); - - void setRGBMode1(int mode); - void setRGBMode2(int mode); - - void updateRGBChannels(); - void setRGBModifier(int item); - - - protected: - - - double* rgb_rimg2; - double* rgb_gimg2; - double* rgb_bimg2; - double* rgb_aimg2; - int rgb_colr, rgb_colb, rgb_colg, rgb_cola; - - - JKQtPlotter* plotImgRGB; - JKQTPRGBMathImage* rgbimg; - JKQTPColumnRGBMathImage* rgbimg2; - - QCheckBox* chkRGBUseR; - QCheckBox* chkRGBUseG; - QCheckBox* chkRGBUseB; - QCheckBox* chkRGBUseA; - -}; - - -#endif // TestWidgetRGBImages_H +#ifndef TestWidgetRGBImages_H +#define TestWidgetRGBImages_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpelementsoverlay.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpbaseelements.h" +#include "jkqtplottergui/jkqtpgraphsmodel.h" +#include "jkqtplottertools/jkqtptools.h" + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestWidgetRGBImages : public QWidget +{ + Q_OBJECT + public: + explicit TestWidgetRGBImages(QWidget *parent = 0); + + signals: + + public slots: + void setRGBColorBars(bool checked); + + void setRGBMode1(int mode); + void setRGBMode2(int mode); + + void updateRGBChannels(); + void setRGBModifier(int item); + + + protected: + + + double* rgb_rimg2; + double* rgb_gimg2; + double* rgb_bimg2; + double* rgb_aimg2; + int rgb_colr, rgb_colb, rgb_colg, rgb_cola; + + + JKQtPlotter* plotImgRGB; + JKQTPRGBMathImage* rgbimg; + JKQTPColumnRGBMathImage* rgbimg2; + + QCheckBox* chkRGBUseR; + QCheckBox* chkRGBUseG; + QCheckBox* chkRGBUseB; + QCheckBox* chkRGBUseA; + +}; + + +#endif // TestWidgetRGBImages_H diff --git a/test/jkqtplot_test/colorpalettes/All_idl_cmaps.xml b/examples/jkqtplot_test/colorpalettes/All_idl_cmaps.xml similarity index 100% rename from test/jkqtplot_test/colorpalettes/All_idl_cmaps.xml rename to examples/jkqtplot_test/colorpalettes/All_idl_cmaps.xml diff --git a/test/jkqtplot_test/colorpalettes/All_mpl_cmaps.xml b/examples/jkqtplot_test/colorpalettes/All_mpl_cmaps.xml similarity index 100% rename from test/jkqtplot_test/colorpalettes/All_mpl_cmaps.xml rename to examples/jkqtplot_test/colorpalettes/All_mpl_cmaps.xml diff --git a/test/jkqtplot_test/colorpalettes/CoolWarmUChar257.csv b/examples/jkqtplot_test/colorpalettes/CoolWarmUChar257.csv similarity index 100% rename from test/jkqtplot_test/colorpalettes/CoolWarmUChar257.csv rename to examples/jkqtplot_test/colorpalettes/CoolWarmUChar257.csv diff --git a/test/jkqtplot_test/colorpalettes/CoolWarmUChar33.csv b/examples/jkqtplot_test/colorpalettes/CoolWarmUChar33.csv similarity index 100% rename from test/jkqtplot_test/colorpalettes/CoolWarmUChar33.csv rename to examples/jkqtplot_test/colorpalettes/CoolWarmUChar33.csv diff --git a/test/jkqtplot_test/colorpalettes/NSW_Discrete_Z_ColorMap.xml b/examples/jkqtplot_test/colorpalettes/NSW_Discrete_Z_ColorMap.xml similarity index 100% rename from test/jkqtplot_test/colorpalettes/NSW_Discrete_Z_ColorMap.xml rename to examples/jkqtplot_test/colorpalettes/NSW_Discrete_Z_ColorMap.xml diff --git a/test/jkqtplot_test/colorpalettes/example_BGR.csv b/examples/jkqtplot_test/colorpalettes/example_BGR.csv similarity index 100% rename from test/jkqtplot_test/colorpalettes/example_BGR.csv rename to examples/jkqtplot_test/colorpalettes/example_BGR.csv diff --git a/test/jkqtplot_test/colorpalettes/example_BGR.rgb b/examples/jkqtplot_test/colorpalettes/example_BGR.rgb similarity index 100% rename from test/jkqtplot_test/colorpalettes/example_BGR.rgb rename to examples/jkqtplot_test/colorpalettes/example_BGR.rgb diff --git a/test/jkqtplot_test/colorpalettes/example_BGR.xml b/examples/jkqtplot_test/colorpalettes/example_BGR.xml similarity index 100% rename from test/jkqtplot_test/colorpalettes/example_BGR.xml rename to examples/jkqtplot_test/colorpalettes/example_BGR.xml diff --git a/test/jkqtplot_test/jkqtpemfengineadapter.cpp b/examples/jkqtplot_test/jkqtpemfengineadapter.cpp similarity index 95% rename from test/jkqtplot_test/jkqtpemfengineadapter.cpp rename to examples/jkqtplot_test/jkqtpemfengineadapter.cpp index fbb00fc6ac..159abce317 100644 --- a/test/jkqtplot_test/jkqtpemfengineadapter.cpp +++ b/examples/jkqtplot_test/jkqtpemfengineadapter.cpp @@ -1,52 +1,52 @@ -#include "jkqtpemfengineadapter.h" - -JKQTPEmfEngineAdapter::JKQTPEmfEngineAdapter() -{ -} - -QString JKQTPEmfEngineAdapter::getFilter() const -{ - return QObject::tr("Enhanced Metafile (*.emf)"); -} - -QString JKQTPEmfEngineAdapter::getFormatName() const -{ - return QObject::tr("EMF"); -} - -QString JKQTPEmfEngineAdapter::getFormatID() const -{ - return QObject::tr("EMF"); -} - -QStringList JKQTPEmfEngineAdapter::getFileExtension() const -{ - return QStringList("emf"); -} - -bool JKQTPEmfEngineAdapter::getSetAbsolutePaperSize() const -{ - return true; -} - -double JKQTPEmfEngineAdapter::getPrintSizeXInMM() const -{ - return -1; -} - -double JKQTPEmfEngineAdapter::getPrintSizeYInMM() const -{ - return -1; -} - -bool JKQTPEmfEngineAdapter::isPrinter() const -{ - return false; -} - -QPaintDevice *JKQTPEmfEngineAdapter::createPaintdevice(const QString &filename, int widthPix, int heightPix) const -{ - qDebug()<<"create EMF-device for "< -#include -#include "../../../jkqtpbaseplotter.h" - -class JKQTPEmfEngineAdapter : public JKQtBasePlotter::JKQTPPaintDeviceAdapter -{ - public: - JKQTPEmfEngineAdapter(); - - virtual QString getFilter() const; - virtual QString getFormatName() const; - virtual QString getFormatID() const; - virtual QStringList getFileExtension() const; - virtual bool getSetAbsolutePaperSize() const; - virtual double getPrintSizeXInMM() const ; - virtual double getPrintSizeYInMM() const ; - virtual bool isPrinter() const; - virtual QPaintDevice* createPaintdevice(const QString& filename, int widthPix, int heightPix) const; - -}; - -#endif // JKQTPEMFENGINEADAPTER_H +#ifndef JKQTPEMFENGINEADAPTER_H +#define JKQTPEMFENGINEADAPTER_H + +#include "EmfEngine/src/EmfEngine.h" +#include +#include +#include "../../../jkqtpbaseplotter.h" + +class JKQTPEmfEngineAdapter : public JKQtBasePlotter::JKQTPPaintDeviceAdapter +{ + public: + JKQTPEmfEngineAdapter(); + + virtual QString getFilter() const; + virtual QString getFormatName() const; + virtual QString getFormatID() const; + virtual QStringList getFileExtension() const; + virtual bool getSetAbsolutePaperSize() const; + virtual double getPrintSizeXInMM() const ; + virtual double getPrintSizeYInMM() const ; + virtual bool isPrinter() const; + virtual QPaintDevice* createPaintdevice(const QString& filename, int widthPix, int heightPix) const; + +}; + +#endif // JKQTPEMFENGINEADAPTER_H diff --git a/test/jkqtplot_test/jkqtplot_test.cpp b/examples/jkqtplot_test/jkqtplot_test.cpp similarity index 93% rename from test/jkqtplot_test/jkqtplot_test.cpp rename to examples/jkqtplot_test/jkqtplot_test.cpp index 97a71b5184..3d940844fd 100644 --- a/test/jkqtplot_test/jkqtplot_test.cpp +++ b/examples/jkqtplot_test/jkqtplot_test.cpp @@ -1,15 +1,15 @@ -#include -#include -#include -#include "testmain.h" - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - TestMain tab; - - tab.show(); - - return app.exec(); -} +#include +#include +#include +#include "testmain.h" + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + TestMain tab; + + tab.show(); + + return app.exec(); +} diff --git a/test/jkqtplot_test/jkqtplot_test.pro b/examples/jkqtplot_test/jkqtplot_test.pro similarity index 88% rename from test/jkqtplot_test/jkqtplot_test.pro rename to examples/jkqtplot_test/jkqtplot_test.pro index 7ac81c8943..361d6c34f3 100644 --- a/test/jkqtplot_test/jkqtplot_test.pro +++ b/examples/jkqtplot_test/jkqtplot_test.pro @@ -1,71 +1,75 @@ - -SOURCES += jkqtplot_test.cpp \ - testmain.cpp \ - TestWidgetFunctionPlots.cpp \ - TestWidgetGeometry.cpp \ - TestWidgetGraphs.cpp \ - TestWidgetImages.cpp \ - TestWidgetLogGraphs.cpp \ - TestWidgetParamScatterPlots.cpp \ - TestWidgetPeaksPlots.cpp \ - TestWidgetRGBImages.cpp \ - TestWidgetBarcharts.cpp \ - TestWidgetContourPlots.cpp \ - TestWidgetEmptyPlot.cpp \ - QTeXEngine/src/QTeXPaintEngine.cpp \ - QTeXEngine/src/QTeXPaintDevice.cpp - -greaterThan(QT_MAJOR_VERSION, 4) { -} else { - win32 { - SOURCES += jkqtpemfengineadapter.cpp \ - EmfEngine/src/EmfPaintDevice.cpp \ - EmfEngine/src/EmfEngine.cpp \ - - HEADERS +=EmfEngine/src/EmfEngine.h \ - jkqtpemfengineadapter.h - - LIBS += -lgdi32 - } -} - - -HEADERS += testmain.h \ - TestWidgetFunctionPlots.h \ - TestWidgetGeometry.h \ - TestWidgetGraphs.h \ - TestWidgetImages.h \ - TestWidgetLogGraphs.h \ - TestWidgetParamScatterPlots.h \ - TestWidgetPeaksPlots.h \ - TestWidgetRGBImages.h \ - TestWidgetBarcharts.h \ - TestWidgetContourPlots.h \ - TestWidgetEmptyPlot.h \ - QTeXEngine/src/QTeXEngine.h - - -RESOURCES += jkqtplot_test.qrc - - -win32-msvc*: DEFINES += _USE_MATH_DEFINES - -TARGET = jkqtplot_test - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - - -# include JKQtPlotter source code -DEPENDPATH += $$PWD -#$$PWD/../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER + +SOURCES += jkqtplot_test.cpp \ + testmain.cpp \ + TestWidgetFunctionPlots.cpp \ + TestWidgetGeometry.cpp \ + TestWidgetGraphs.cpp \ + TestWidgetImages.cpp \ + TestWidgetLogGraphs.cpp \ + TestWidgetParamScatterPlots.cpp \ + TestWidgetPeaksPlots.cpp \ + TestWidgetRGBImages.cpp \ + TestWidgetBarcharts.cpp \ + TestWidgetContourPlots.cpp \ + TestWidgetEmptyPlot.cpp \ + QTeXEngine/src/QTeXPaintEngine.cpp \ + QTeXEngine/src/QTeXPaintDevice.cpp + +greaterThan(QT_MAJOR_VERSION, 4) { +} else { + win32 { + SOURCES += jkqtpemfengineadapter.cpp \ + EmfEngine/src/EmfPaintDevice.cpp \ + EmfEngine/src/EmfEngine.cpp \ + + HEADERS +=EmfEngine/src/EmfEngine.h \ + jkqtpemfengineadapter.h + + LIBS += -lgdi32 + } +} + + +HEADERS += testmain.h \ + TestWidgetFunctionPlots.h \ + TestWidgetGeometry.h \ + TestWidgetGraphs.h \ + TestWidgetImages.h \ + TestWidgetLogGraphs.h \ + TestWidgetParamScatterPlots.h \ + TestWidgetPeaksPlots.h \ + TestWidgetRGBImages.h \ + TestWidgetBarcharts.h \ + TestWidgetContourPlots.h \ + TestWidgetEmptyPlot.h \ + QTeXEngine/src/QTeXEngine.h + + +RESOURCES += jkqtplot_test.qrc + + +win32-msvc*: DEFINES += _USE_MATH_DEFINES + +TARGET = jkqtplot_test + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + + +# include JKQtPlotter source code +DEPENDPATH += $$PWD +#$$PWD/../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/jkqtplot_test/jkqtplot_test.qrc b/examples/jkqtplot_test/jkqtplot_test.qrc similarity index 100% rename from test/jkqtplot_test/jkqtplot_test.qrc rename to examples/jkqtplot_test/jkqtplot_test.qrc diff --git a/test/jkqtplot_test/jkqtplot_test_and_lib.pro b/examples/jkqtplot_test/jkqtplot_test_and_lib.pro similarity index 100% rename from test/jkqtplot_test/jkqtplot_test_and_lib.pro rename to examples/jkqtplot_test/jkqtplot_test_and_lib.pro diff --git a/test/jkqtplot_test/lena.png b/examples/jkqtplot_test/lena.png similarity index 100% rename from test/jkqtplot_test/lena.png rename to examples/jkqtplot_test/lena.png diff --git a/test/jkqtplot_test/test.bmp b/examples/jkqtplot_test/test.bmp similarity index 100% rename from test/jkqtplot_test/test.bmp rename to examples/jkqtplot_test/test.bmp diff --git a/test/jkqtplot_test/test.csv b/examples/jkqtplot_test/test.csv similarity index 97% rename from test/jkqtplot_test/test.csv rename to examples/jkqtplot_test/test.csv index f440ac1313..3966283e1f 100644 --- a/test/jkqtplot_test/test.csv +++ b/examples/jkqtplot_test/test.csv @@ -1,202 +1,202 @@ -# x1, y11, y12 -0.0000000000, 0.0000000000, 1.0000000000 -0.1256637061, 0.1253332336, 0.9921147013 -0.2513274123, 0.2486898872, 0.9685831611 -0.3769911184, 0.3681245527, 0.9297764859 -0.5026548246, 0.4817536741, 0.8763066800 -0.6283185307, 0.5877852523, 0.8090169944 -0.7539822369, 0.6845471059, 0.7289686274 -0.8796459430, 0.7705132428, 0.6374239897 -1.0053096491, 0.8443279255, 0.5358267950 -1.1309733553, 0.9048270525, 0.4257792916 -1.2566370614, 0.9510565163, 0.3090169944 -1.3823007676, 0.9822872507, 0.1873813146 -1.5079644737, 0.9980267284, 0.0627905195 -1.6336281799, 0.9980267284, -0.0627905195 -1.7592918860, 0.9822872507, -0.1873813146 -1.8849555922, 0.9510565163, -0.3090169944 -2.0106192983, 0.9048270525, -0.4257792916 -2.1362830044, 0.8443279255, -0.5358267950 -2.2619467106, 0.7705132428, -0.6374239897 -2.3876104167, 0.6845471059, -0.7289686274 -2.5132741229, 0.5877852523, -0.8090169944 -2.6389378290, 0.4817536741, -0.8763066800 -2.7646015352, 0.3681245527, -0.9297764859 -2.8902652413, 0.2486898872, -0.9685831611 -3.0159289474, 0.1253332336, -0.9921147013 -3.1415926536, -0.0000000000, -1.0000000000 -3.2672563597, -0.1253332336, -0.9921147013 -3.3929200659, -0.2486898872, -0.9685831611 -3.5185837720, -0.3681245527, -0.9297764859 -3.6442474782, -0.4817536741, -0.8763066800 -3.7699111843, -0.5877852523, -0.8090169944 -3.8955748905, -0.6845471059, -0.7289686274 -4.0212385966, -0.7705132428, -0.6374239897 -4.1469023027, -0.8443279255, -0.5358267950 -4.2725660089, -0.9048270525, -0.4257792916 -4.3982297150, -0.9510565163, -0.3090169944 -4.5238934212, -0.9822872507, -0.1873813146 -4.6495571273, -0.9980267284, -0.0627905195 -4.7752208335, -0.9980267284, 0.0627905195 -4.9008845396, -0.9822872507, 0.1873813146 -5.0265482457, -0.9510565163, 0.3090169944 -5.1522119519, -0.9048270525, 0.4257792916 -5.2778756580, -0.8443279255, 0.5358267950 -5.4035393642, -0.7705132428, 0.6374239897 -5.5292030703, -0.6845471059, 0.7289686274 -5.6548667765, -0.5877852523, 0.8090169944 -5.7805304826, -0.4817536741, 0.8763066800 -5.9061941887, -0.3681245527, 0.9297764859 -6.0318578949, -0.2486898872, 0.9685831611 -6.1575216010, -0.1253332336, 0.9921147013 -6.2831853072, 0.0000000000, 1.0000000000 -6.4088490133, 0.1253332336, 0.9921147013 -6.5345127195, 0.2486898872, 0.9685831611 -6.6601764256, 0.3681245527, 0.9297764859 -6.7858401318, 0.4817536741, 0.8763066800 -6.9115038379, 0.5877852523, 0.8090169944 -7.0371675440, 0.6845471059, 0.7289686274 -7.1628312502, 0.7705132428, 0.6374239897 -7.2884949563, 0.8443279255, 0.5358267950 -7.4141586625, 0.9048270525, 0.4257792916 -7.5398223686, 0.9510565163, 0.3090169944 -7.6654860748, 0.9822872507, 0.1873813146 -7.7911497809, 0.9980267284, 0.0627905195 -7.9168134870, 0.9980267284, -0.0627905195 -8.0424771932, 0.9822872507, -0.1873813146 -8.1681408993, 0.9510565163, -0.3090169944 -8.2938046055, 0.9048270525, -0.4257792916 -8.4194683116, 0.8443279255, -0.5358267950 -8.5451320178, 0.7705132428, -0.6374239897 -8.6707957239, 0.6845471059, -0.7289686274 -8.7964594301, 0.5877852523, -0.8090169944 -8.9221231362, 0.4817536741, -0.8763066800 -9.0477868423, 0.3681245527, -0.9297764859 -9.1734505485, 0.2486898872, -0.9685831611 -9.2991142546, 0.1253332336, -0.9921147013 -9.4247779608, -0.0000000000, -1.0000000000 -9.5504416669, -0.1253332336, -0.9921147013 -9.6761053731, -0.2486898872, -0.9685831611 -9.8017690792, -0.3681245527, -0.9297764859 -9.9274327853, -0.4817536741, -0.8763066800 -10.0530964915, -0.5877852523, -0.8090169944 -10.1787601976, -0.6845471059, -0.7289686274 -10.3044239038, -0.7705132428, -0.6374239897 -10.4300876099, -0.8443279255, -0.5358267950 -10.5557513161, -0.9048270525, -0.4257792916 -10.6814150222, -0.9510565163, -0.3090169944 -10.8070787283, -0.9822872507, -0.1873813146 -10.9327424345, -0.9980267284, -0.0627905195 -11.0584061406, -0.9980267284, 0.0627905195 -11.1840698468, -0.9822872507, 0.1873813146 -11.3097335529, -0.9510565163, 0.3090169944 -11.4353972591, -0.9048270525, 0.4257792916 -11.5610609652, -0.8443279255, 0.5358267950 -11.6867246714, -0.7705132428, 0.6374239897 -11.8123883775, -0.6845471059, 0.7289686274 -11.9380520836, -0.5877852523, 0.8090169944 -12.0637157898, -0.4817536741, 0.8763066800 -12.1893794959, -0.3681245527, 0.9297764859 -12.3150432021, -0.2486898872, 0.9685831611 -12.4407069082, -0.1253332336, 0.9921147013 -12.5663706144, 0.0000000000, 1.0000000000 -12.6920343205, 0.1253332336, 0.9921147013 -12.8176980266, 0.2486898872, 0.9685831611 -12.9433617328, 0.3681245527, 0.9297764859 -13.0690254389, 0.4817536741, 0.8763066800 -13.1946891451, 0.5877852523, 0.8090169944 -13.3203528512, 0.6845471059, 0.7289686274 -13.4460165574, 0.7705132428, 0.6374239897 -13.5716802635, 0.8443279255, 0.5358267950 -13.6973439697, 0.9048270525, 0.4257792916 -13.8230076758, 0.9510565163, 0.3090169944 -13.9486713819, 0.9822872507, 0.1873813146 -14.0743350881, 0.9980267284, 0.0627905195 -14.1999987942, 0.9980267284, -0.0627905195 -14.3256625004, 0.9822872507, -0.1873813146 -14.4513262065, 0.9510565163, -0.3090169944 -14.5769899127, 0.9048270525, -0.4257792916 -14.7026536188, 0.8443279255, -0.5358267950 -14.8283173249, 0.7705132428, -0.6374239897 -14.9539810311, 0.6845471059, -0.7289686274 -15.0796447372, 0.5877852523, -0.8090169944 -15.2053084434, 0.4817536741, -0.8763066800 -15.3309721495, 0.3681245527, -0.9297764859 -15.4566358557, 0.2486898872, -0.9685831611 -15.5822995618, 0.1253332336, -0.9921147013 -15.7079632679, -0.0000000000, -1.0000000000 -15.8336269741, -0.1253332336, -0.9921147013 -15.9592906802, -0.2486898872, -0.9685831611 -16.0849543864, -0.3681245527, -0.9297764859 -16.2106180925, -0.4817536741, -0.8763066800 -16.3362817987, -0.5877852523, -0.8090169944 -16.4619455048, -0.6845471059, -0.7289686274 -16.5876092110, -0.7705132428, -0.6374239897 -16.7132729171, -0.8443279255, -0.5358267950 -16.8389366232, -0.9048270525, -0.4257792916 -16.9646003294, -0.9510565163, -0.3090169944 -17.0902640355, -0.9822872507, -0.1873813146 -17.2159277417, -0.9980267284, -0.0627905195 -17.3415914478, -0.9980267284, 0.0627905195 -17.4672551540, -0.9822872507, 0.1873813146 -17.5929188601, -0.9510565163, 0.3090169944 -17.7185825662, -0.9048270525, 0.4257792916 -17.8442462724, -0.8443279255, 0.5358267950 -17.9699099785, -0.7705132428, 0.6374239897 -18.0955736847, -0.6845471059, 0.7289686274 -18.2212373908, -0.5877852523, 0.8090169944 -18.3469010970, -0.4817536741, 0.8763066800 -18.4725648031, -0.3681245527, 0.9297764859 -18.5982285093, -0.2486898872, 0.9685831611 -18.7238922154, -0.1253332336, 0.9921147013 -18.8495559215, 0.0000000000, 1.0000000000 -18.9752196277, 0.1253332336, 0.9921147013 -19.1008833338, 0.2486898872, 0.9685831611 -19.2265470400, 0.3681245527, 0.9297764859 -19.3522107461, 0.4817536741, 0.8763066800 -19.4778744523, 0.5877852523, 0.8090169944 -19.6035381584, 0.6845471059, 0.7289686274 -19.7292018645, 0.7705132428, 0.6374239897 -19.8548655707, 0.8443279255, 0.5358267950 -19.9805292768, 0.9048270525, 0.4257792916 -20.1061929830, 0.9510565163, 0.3090169944 -20.2318566891, 0.9822872507, 0.1873813146 -20.3575203953, 0.9980267284, 0.0627905195 -20.4831841014, 0.9980267284, -0.0627905195 -20.6088478075, 0.9822872507, -0.1873813146 -20.7345115137, 0.9510565163, -0.3090169944 -20.8601752198, 0.9048270525, -0.4257792916 -20.9858389260, 0.8443279255, -0.5358267950 -21.1115026321, 0.7705132428, -0.6374239897 -21.2371663383, 0.6845471059, -0.7289686274 -21.3628300444, 0.5877852523, -0.8090169944 -21.4884937506, 0.4817536741, -0.8763066800 -21.6141574567, 0.3681245527, -0.9297764859 -21.7398211628, 0.2486898872, -0.9685831611 -21.8654848690, 0.1253332336, -0.9921147013 -21.9911485751, -0.0000000000, -1.0000000000 -22.1168122813, -0.1253332336, -0.9921147013 -22.2424759874, -0.2486898872, -0.9685831611 -22.3681396936, -0.3681245527, -0.9297764859 -22.4938033997, -0.4817536741, -0.8763066800 -22.6194671058, -0.5877852523, -0.8090169944 -22.7451308120, -0.6845471059, -0.7289686274 -22.8707945181, -0.7705132428, -0.6374239897 -22.9964582243, -0.8443279255, -0.5358267950 -23.1221219304, -0.9048270525, -0.4257792916 -23.2477856366, -0.9510565163, -0.3090169944 -23.3734493427, -0.9822872507, -0.1873813146 -23.4991130489, -0.9980267284, -0.0627905195 -23.6247767550, -0.9980267284, 0.0627905195 -23.7504404611, -0.9822872507, 0.1873813146 -23.8761041673, -0.9510565163, 0.3090169944 -24.0017678734, -0.9048270525, 0.4257792916 -24.1274315796, -0.8443279255, 0.5358267950 -24.2530952857, -0.7705132428, 0.6374239897 -24.3787589919, -0.6845471059, 0.7289686274 -24.5044226980, -0.5877852523, 0.8090169944 -24.6300864041, -0.4817536741, 0.8763066800 -24.7557501103, -0.3681245527, 0.9297764859 -24.8814138164, -0.2486898872, 0.9685831611 -25.0070775226, -0.1253332336, 0.9921147013 - +# x1, y11, y12 +0.0000000000, 0.0000000000, 1.0000000000 +0.1256637061, 0.1253332336, 0.9921147013 +0.2513274123, 0.2486898872, 0.9685831611 +0.3769911184, 0.3681245527, 0.9297764859 +0.5026548246, 0.4817536741, 0.8763066800 +0.6283185307, 0.5877852523, 0.8090169944 +0.7539822369, 0.6845471059, 0.7289686274 +0.8796459430, 0.7705132428, 0.6374239897 +1.0053096491, 0.8443279255, 0.5358267950 +1.1309733553, 0.9048270525, 0.4257792916 +1.2566370614, 0.9510565163, 0.3090169944 +1.3823007676, 0.9822872507, 0.1873813146 +1.5079644737, 0.9980267284, 0.0627905195 +1.6336281799, 0.9980267284, -0.0627905195 +1.7592918860, 0.9822872507, -0.1873813146 +1.8849555922, 0.9510565163, -0.3090169944 +2.0106192983, 0.9048270525, -0.4257792916 +2.1362830044, 0.8443279255, -0.5358267950 +2.2619467106, 0.7705132428, -0.6374239897 +2.3876104167, 0.6845471059, -0.7289686274 +2.5132741229, 0.5877852523, -0.8090169944 +2.6389378290, 0.4817536741, -0.8763066800 +2.7646015352, 0.3681245527, -0.9297764859 +2.8902652413, 0.2486898872, -0.9685831611 +3.0159289474, 0.1253332336, -0.9921147013 +3.1415926536, -0.0000000000, -1.0000000000 +3.2672563597, -0.1253332336, -0.9921147013 +3.3929200659, -0.2486898872, -0.9685831611 +3.5185837720, -0.3681245527, -0.9297764859 +3.6442474782, -0.4817536741, -0.8763066800 +3.7699111843, -0.5877852523, -0.8090169944 +3.8955748905, -0.6845471059, -0.7289686274 +4.0212385966, -0.7705132428, -0.6374239897 +4.1469023027, -0.8443279255, -0.5358267950 +4.2725660089, -0.9048270525, -0.4257792916 +4.3982297150, -0.9510565163, -0.3090169944 +4.5238934212, -0.9822872507, -0.1873813146 +4.6495571273, -0.9980267284, -0.0627905195 +4.7752208335, -0.9980267284, 0.0627905195 +4.9008845396, -0.9822872507, 0.1873813146 +5.0265482457, -0.9510565163, 0.3090169944 +5.1522119519, -0.9048270525, 0.4257792916 +5.2778756580, -0.8443279255, 0.5358267950 +5.4035393642, -0.7705132428, 0.6374239897 +5.5292030703, -0.6845471059, 0.7289686274 +5.6548667765, -0.5877852523, 0.8090169944 +5.7805304826, -0.4817536741, 0.8763066800 +5.9061941887, -0.3681245527, 0.9297764859 +6.0318578949, -0.2486898872, 0.9685831611 +6.1575216010, -0.1253332336, 0.9921147013 +6.2831853072, 0.0000000000, 1.0000000000 +6.4088490133, 0.1253332336, 0.9921147013 +6.5345127195, 0.2486898872, 0.9685831611 +6.6601764256, 0.3681245527, 0.9297764859 +6.7858401318, 0.4817536741, 0.8763066800 +6.9115038379, 0.5877852523, 0.8090169944 +7.0371675440, 0.6845471059, 0.7289686274 +7.1628312502, 0.7705132428, 0.6374239897 +7.2884949563, 0.8443279255, 0.5358267950 +7.4141586625, 0.9048270525, 0.4257792916 +7.5398223686, 0.9510565163, 0.3090169944 +7.6654860748, 0.9822872507, 0.1873813146 +7.7911497809, 0.9980267284, 0.0627905195 +7.9168134870, 0.9980267284, -0.0627905195 +8.0424771932, 0.9822872507, -0.1873813146 +8.1681408993, 0.9510565163, -0.3090169944 +8.2938046055, 0.9048270525, -0.4257792916 +8.4194683116, 0.8443279255, -0.5358267950 +8.5451320178, 0.7705132428, -0.6374239897 +8.6707957239, 0.6845471059, -0.7289686274 +8.7964594301, 0.5877852523, -0.8090169944 +8.9221231362, 0.4817536741, -0.8763066800 +9.0477868423, 0.3681245527, -0.9297764859 +9.1734505485, 0.2486898872, -0.9685831611 +9.2991142546, 0.1253332336, -0.9921147013 +9.4247779608, -0.0000000000, -1.0000000000 +9.5504416669, -0.1253332336, -0.9921147013 +9.6761053731, -0.2486898872, -0.9685831611 +9.8017690792, -0.3681245527, -0.9297764859 +9.9274327853, -0.4817536741, -0.8763066800 +10.0530964915, -0.5877852523, -0.8090169944 +10.1787601976, -0.6845471059, -0.7289686274 +10.3044239038, -0.7705132428, -0.6374239897 +10.4300876099, -0.8443279255, -0.5358267950 +10.5557513161, -0.9048270525, -0.4257792916 +10.6814150222, -0.9510565163, -0.3090169944 +10.8070787283, -0.9822872507, -0.1873813146 +10.9327424345, -0.9980267284, -0.0627905195 +11.0584061406, -0.9980267284, 0.0627905195 +11.1840698468, -0.9822872507, 0.1873813146 +11.3097335529, -0.9510565163, 0.3090169944 +11.4353972591, -0.9048270525, 0.4257792916 +11.5610609652, -0.8443279255, 0.5358267950 +11.6867246714, -0.7705132428, 0.6374239897 +11.8123883775, -0.6845471059, 0.7289686274 +11.9380520836, -0.5877852523, 0.8090169944 +12.0637157898, -0.4817536741, 0.8763066800 +12.1893794959, -0.3681245527, 0.9297764859 +12.3150432021, -0.2486898872, 0.9685831611 +12.4407069082, -0.1253332336, 0.9921147013 +12.5663706144, 0.0000000000, 1.0000000000 +12.6920343205, 0.1253332336, 0.9921147013 +12.8176980266, 0.2486898872, 0.9685831611 +12.9433617328, 0.3681245527, 0.9297764859 +13.0690254389, 0.4817536741, 0.8763066800 +13.1946891451, 0.5877852523, 0.8090169944 +13.3203528512, 0.6845471059, 0.7289686274 +13.4460165574, 0.7705132428, 0.6374239897 +13.5716802635, 0.8443279255, 0.5358267950 +13.6973439697, 0.9048270525, 0.4257792916 +13.8230076758, 0.9510565163, 0.3090169944 +13.9486713819, 0.9822872507, 0.1873813146 +14.0743350881, 0.9980267284, 0.0627905195 +14.1999987942, 0.9980267284, -0.0627905195 +14.3256625004, 0.9822872507, -0.1873813146 +14.4513262065, 0.9510565163, -0.3090169944 +14.5769899127, 0.9048270525, -0.4257792916 +14.7026536188, 0.8443279255, -0.5358267950 +14.8283173249, 0.7705132428, -0.6374239897 +14.9539810311, 0.6845471059, -0.7289686274 +15.0796447372, 0.5877852523, -0.8090169944 +15.2053084434, 0.4817536741, -0.8763066800 +15.3309721495, 0.3681245527, -0.9297764859 +15.4566358557, 0.2486898872, -0.9685831611 +15.5822995618, 0.1253332336, -0.9921147013 +15.7079632679, -0.0000000000, -1.0000000000 +15.8336269741, -0.1253332336, -0.9921147013 +15.9592906802, -0.2486898872, -0.9685831611 +16.0849543864, -0.3681245527, -0.9297764859 +16.2106180925, -0.4817536741, -0.8763066800 +16.3362817987, -0.5877852523, -0.8090169944 +16.4619455048, -0.6845471059, -0.7289686274 +16.5876092110, -0.7705132428, -0.6374239897 +16.7132729171, -0.8443279255, -0.5358267950 +16.8389366232, -0.9048270525, -0.4257792916 +16.9646003294, -0.9510565163, -0.3090169944 +17.0902640355, -0.9822872507, -0.1873813146 +17.2159277417, -0.9980267284, -0.0627905195 +17.3415914478, -0.9980267284, 0.0627905195 +17.4672551540, -0.9822872507, 0.1873813146 +17.5929188601, -0.9510565163, 0.3090169944 +17.7185825662, -0.9048270525, 0.4257792916 +17.8442462724, -0.8443279255, 0.5358267950 +17.9699099785, -0.7705132428, 0.6374239897 +18.0955736847, -0.6845471059, 0.7289686274 +18.2212373908, -0.5877852523, 0.8090169944 +18.3469010970, -0.4817536741, 0.8763066800 +18.4725648031, -0.3681245527, 0.9297764859 +18.5982285093, -0.2486898872, 0.9685831611 +18.7238922154, -0.1253332336, 0.9921147013 +18.8495559215, 0.0000000000, 1.0000000000 +18.9752196277, 0.1253332336, 0.9921147013 +19.1008833338, 0.2486898872, 0.9685831611 +19.2265470400, 0.3681245527, 0.9297764859 +19.3522107461, 0.4817536741, 0.8763066800 +19.4778744523, 0.5877852523, 0.8090169944 +19.6035381584, 0.6845471059, 0.7289686274 +19.7292018645, 0.7705132428, 0.6374239897 +19.8548655707, 0.8443279255, 0.5358267950 +19.9805292768, 0.9048270525, 0.4257792916 +20.1061929830, 0.9510565163, 0.3090169944 +20.2318566891, 0.9822872507, 0.1873813146 +20.3575203953, 0.9980267284, 0.0627905195 +20.4831841014, 0.9980267284, -0.0627905195 +20.6088478075, 0.9822872507, -0.1873813146 +20.7345115137, 0.9510565163, -0.3090169944 +20.8601752198, 0.9048270525, -0.4257792916 +20.9858389260, 0.8443279255, -0.5358267950 +21.1115026321, 0.7705132428, -0.6374239897 +21.2371663383, 0.6845471059, -0.7289686274 +21.3628300444, 0.5877852523, -0.8090169944 +21.4884937506, 0.4817536741, -0.8763066800 +21.6141574567, 0.3681245527, -0.9297764859 +21.7398211628, 0.2486898872, -0.9685831611 +21.8654848690, 0.1253332336, -0.9921147013 +21.9911485751, -0.0000000000, -1.0000000000 +22.1168122813, -0.1253332336, -0.9921147013 +22.2424759874, -0.2486898872, -0.9685831611 +22.3681396936, -0.3681245527, -0.9297764859 +22.4938033997, -0.4817536741, -0.8763066800 +22.6194671058, -0.5877852523, -0.8090169944 +22.7451308120, -0.6845471059, -0.7289686274 +22.8707945181, -0.7705132428, -0.6374239897 +22.9964582243, -0.8443279255, -0.5358267950 +23.1221219304, -0.9048270525, -0.4257792916 +23.2477856366, -0.9510565163, -0.3090169944 +23.3734493427, -0.9822872507, -0.1873813146 +23.4991130489, -0.9980267284, -0.0627905195 +23.6247767550, -0.9980267284, 0.0627905195 +23.7504404611, -0.9822872507, 0.1873813146 +23.8761041673, -0.9510565163, 0.3090169944 +24.0017678734, -0.9048270525, 0.4257792916 +24.1274315796, -0.8443279255, 0.5358267950 +24.2530952857, -0.7705132428, 0.6374239897 +24.3787589919, -0.6845471059, 0.7289686274 +24.5044226980, -0.5877852523, 0.8090169944 +24.6300864041, -0.4817536741, 0.8763066800 +24.7557501103, -0.3681245527, 0.9297764859 +24.8814138164, -0.2486898872, 0.9685831611 +25.0070775226, -0.1253332336, 0.9921147013 + diff --git a/test/jkqtplot_test/test.dif b/examples/jkqtplot_test/test.dif similarity index 88% rename from test/jkqtplot_test/test.dif rename to examples/jkqtplot_test/test.dif index 1e401eea92..8a660e33f6 100644 --- a/test/jkqtplot_test/test.dif +++ b/examples/jkqtplot_test/test.dif @@ -1,1619 +1,1619 @@ -TABLE -0,1 -"" -VECTORS -0,3 -"" -TUPLES -0,200 -"" --1,0 -BOT -1,0 -"x1" -1,0 -"y11" -1,0 -"y12" --1,0 -BOT -0,0.0000000000 -V -0,0.0000000000 -V -0,1.0000000000 -V --1,0 -BOT -0,0.1256637061 -V -0,0.1253332336 -V -0,0.9921147013 -V --1,0 -BOT -0,0.2513274123 -V -0,0.2486898872 -V -0,0.9685831611 -V --1,0 -BOT -0,0.3769911184 -V -0,0.3681245527 -V -0,0.9297764859 -V --1,0 -BOT -0,0.5026548246 -V -0,0.4817536741 -V -0,0.8763066800 -V --1,0 -BOT -0,0.6283185307 -V -0,0.5877852523 -V -0,0.8090169944 -V --1,0 -BOT -0,0.7539822369 -V -0,0.6845471059 -V -0,0.7289686274 -V --1,0 -BOT -0,0.8796459430 -V -0,0.7705132428 -V -0,0.6374239897 -V --1,0 -BOT -0,1.0053096491 -V -0,0.8443279255 -V -0,0.5358267950 -V --1,0 -BOT -0,1.1309733553 -V -0,0.9048270525 -V -0,0.4257792916 -V --1,0 -BOT -0,1.2566370614 -V -0,0.9510565163 -V -0,0.3090169944 -V --1,0 -BOT -0,1.3823007676 -V -0,0.9822872507 -V -0,0.1873813146 -V --1,0 -BOT -0,1.5079644737 -V -0,0.9980267284 -V -0,0.0627905195 -V --1,0 -BOT -0,1.6336281799 -V -0,0.9980267284 -V -0,-0.0627905195 -V --1,0 -BOT -0,1.7592918860 -V -0,0.9822872507 -V -0,-0.1873813146 -V --1,0 -BOT -0,1.8849555922 -V -0,0.9510565163 -V -0,-0.3090169944 -V --1,0 -BOT -0,2.0106192983 -V -0,0.9048270525 -V -0,-0.4257792916 -V --1,0 -BOT -0,2.1362830044 -V -0,0.8443279255 -V -0,-0.5358267950 -V --1,0 -BOT -0,2.2619467106 -V -0,0.7705132428 -V -0,-0.6374239897 -V --1,0 -BOT -0,2.3876104167 -V -0,0.6845471059 -V -0,-0.7289686274 -V --1,0 -BOT -0,2.5132741229 -V -0,0.5877852523 -V -0,-0.8090169944 -V --1,0 -BOT -0,2.6389378290 -V -0,0.4817536741 -V -0,-0.8763066800 -V --1,0 -BOT -0,2.7646015352 -V -0,0.3681245527 -V -0,-0.9297764859 -V --1,0 -BOT -0,2.8902652413 -V -0,0.2486898872 -V -0,-0.9685831611 -V --1,0 -BOT -0,3.0159289474 -V -0,0.1253332336 -V -0,-0.9921147013 -V --1,0 -BOT -0,3.1415926536 -V -0,-0.0000000000 -V -0,-1.0000000000 -V --1,0 -BOT -0,3.2672563597 -V -0,-0.1253332336 -V -0,-0.9921147013 -V --1,0 -BOT -0,3.3929200659 -V -0,-0.2486898872 -V -0,-0.9685831611 -V --1,0 -BOT -0,3.5185837720 -V -0,-0.3681245527 -V -0,-0.9297764859 -V --1,0 -BOT -0,3.6442474782 -V -0,-0.4817536741 -V -0,-0.8763066800 -V --1,0 -BOT -0,3.7699111843 -V -0,-0.5877852523 -V -0,-0.8090169944 -V --1,0 -BOT -0,3.8955748905 -V -0,-0.6845471059 -V -0,-0.7289686274 -V --1,0 -BOT -0,4.0212385966 -V -0,-0.7705132428 -V -0,-0.6374239897 -V --1,0 -BOT -0,4.1469023027 -V -0,-0.8443279255 -V -0,-0.5358267950 -V --1,0 -BOT -0,4.2725660089 -V -0,-0.9048270525 -V -0,-0.4257792916 -V --1,0 -BOT -0,4.3982297150 -V -0,-0.9510565163 -V -0,-0.3090169944 -V --1,0 -BOT -0,4.5238934212 -V -0,-0.9822872507 -V -0,-0.1873813146 -V --1,0 -BOT -0,4.6495571273 -V -0,-0.9980267284 -V -0,-0.0627905195 -V --1,0 -BOT -0,4.7752208335 -V -0,-0.9980267284 -V -0,0.0627905195 -V --1,0 -BOT -0,4.9008845396 -V -0,-0.9822872507 -V -0,0.1873813146 -V --1,0 -BOT -0,5.0265482457 -V -0,-0.9510565163 -V -0,0.3090169944 -V --1,0 -BOT -0,5.1522119519 -V -0,-0.9048270525 -V -0,0.4257792916 -V --1,0 -BOT -0,5.2778756580 -V -0,-0.8443279255 -V -0,0.5358267950 -V --1,0 -BOT -0,5.4035393642 -V -0,-0.7705132428 -V -0,0.6374239897 -V --1,0 -BOT -0,5.5292030703 -V -0,-0.6845471059 -V -0,0.7289686274 -V --1,0 -BOT -0,5.6548667765 -V -0,-0.5877852523 -V -0,0.8090169944 -V --1,0 -BOT -0,5.7805304826 -V -0,-0.4817536741 -V -0,0.8763066800 -V --1,0 -BOT -0,5.9061941887 -V -0,-0.3681245527 -V -0,0.9297764859 -V --1,0 -BOT -0,6.0318578949 -V -0,-0.2486898872 -V -0,0.9685831611 -V --1,0 -BOT -0,6.1575216010 -V -0,-0.1253332336 -V -0,0.9921147013 -V --1,0 -BOT -0,6.2831853072 -V -0,0.0000000000 -V -0,1.0000000000 -V --1,0 -BOT -0,6.4088490133 -V -0,0.1253332336 -V -0,0.9921147013 -V --1,0 -BOT -0,6.5345127195 -V -0,0.2486898872 -V -0,0.9685831611 -V --1,0 -BOT -0,6.6601764256 -V -0,0.3681245527 -V -0,0.9297764859 -V --1,0 -BOT -0,6.7858401318 -V -0,0.4817536741 -V -0,0.8763066800 -V --1,0 -BOT -0,6.9115038379 -V -0,0.5877852523 -V -0,0.8090169944 -V --1,0 -BOT -0,7.0371675440 -V -0,0.6845471059 -V -0,0.7289686274 -V --1,0 -BOT -0,7.1628312502 -V -0,0.7705132428 -V -0,0.6374239897 -V --1,0 -BOT -0,7.2884949563 -V -0,0.8443279255 -V -0,0.5358267950 -V --1,0 -BOT -0,7.4141586625 -V -0,0.9048270525 -V -0,0.4257792916 -V --1,0 -BOT -0,7.5398223686 -V -0,0.9510565163 -V -0,0.3090169944 -V --1,0 -BOT -0,7.6654860748 -V -0,0.9822872507 -V -0,0.1873813146 -V --1,0 -BOT -0,7.7911497809 -V -0,0.9980267284 -V -0,0.0627905195 -V --1,0 -BOT -0,7.9168134870 -V -0,0.9980267284 -V -0,-0.0627905195 -V --1,0 -BOT -0,8.0424771932 -V -0,0.9822872507 -V -0,-0.1873813146 -V --1,0 -BOT -0,8.1681408993 -V -0,0.9510565163 -V -0,-0.3090169944 -V --1,0 -BOT -0,8.2938046055 -V -0,0.9048270525 -V -0,-0.4257792916 -V --1,0 -BOT -0,8.4194683116 -V -0,0.8443279255 -V -0,-0.5358267950 -V --1,0 -BOT -0,8.5451320178 -V -0,0.7705132428 -V -0,-0.6374239897 -V --1,0 -BOT -0,8.6707957239 -V -0,0.6845471059 -V -0,-0.7289686274 -V --1,0 -BOT -0,8.7964594301 -V -0,0.5877852523 -V -0,-0.8090169944 -V --1,0 -BOT -0,8.9221231362 -V -0,0.4817536741 -V -0,-0.8763066800 -V --1,0 -BOT -0,9.0477868423 -V -0,0.3681245527 -V -0,-0.9297764859 -V --1,0 -BOT -0,9.1734505485 -V -0,0.2486898872 -V -0,-0.9685831611 -V --1,0 -BOT -0,9.2991142546 -V -0,0.1253332336 -V -0,-0.9921147013 -V --1,0 -BOT -0,9.4247779608 -V -0,-0.0000000000 -V -0,-1.0000000000 -V --1,0 -BOT -0,9.5504416669 -V -0,-0.1253332336 -V -0,-0.9921147013 -V --1,0 -BOT -0,9.6761053731 -V -0,-0.2486898872 -V -0,-0.9685831611 -V --1,0 -BOT -0,9.8017690792 -V -0,-0.3681245527 -V -0,-0.9297764859 -V --1,0 -BOT -0,9.9274327853 -V -0,-0.4817536741 -V -0,-0.8763066800 -V --1,0 -BOT -0,10.0530964915 -V -0,-0.5877852523 -V -0,-0.8090169944 -V --1,0 -BOT -0,10.1787601976 -V -0,-0.6845471059 -V -0,-0.7289686274 -V --1,0 -BOT -0,10.3044239038 -V -0,-0.7705132428 -V -0,-0.6374239897 -V --1,0 -BOT -0,10.4300876099 -V -0,-0.8443279255 -V -0,-0.5358267950 -V --1,0 -BOT -0,10.5557513161 -V -0,-0.9048270525 -V -0,-0.4257792916 -V --1,0 -BOT -0,10.6814150222 -V -0,-0.9510565163 -V -0,-0.3090169944 -V --1,0 -BOT -0,10.8070787283 -V -0,-0.9822872507 -V -0,-0.1873813146 -V --1,0 -BOT -0,10.9327424345 -V -0,-0.9980267284 -V -0,-0.0627905195 -V --1,0 -BOT -0,11.0584061406 -V -0,-0.9980267284 -V -0,0.0627905195 -V --1,0 -BOT -0,11.1840698468 -V -0,-0.9822872507 -V -0,0.1873813146 -V --1,0 -BOT -0,11.3097335529 -V -0,-0.9510565163 -V -0,0.3090169944 -V --1,0 -BOT -0,11.4353972591 -V -0,-0.9048270525 -V -0,0.4257792916 -V --1,0 -BOT -0,11.5610609652 -V -0,-0.8443279255 -V -0,0.5358267950 -V --1,0 -BOT -0,11.6867246714 -V -0,-0.7705132428 -V -0,0.6374239897 -V --1,0 -BOT -0,11.8123883775 -V -0,-0.6845471059 -V -0,0.7289686274 -V --1,0 -BOT -0,11.9380520836 -V -0,-0.5877852523 -V -0,0.8090169944 -V --1,0 -BOT -0,12.0637157898 -V -0,-0.4817536741 -V -0,0.8763066800 -V --1,0 -BOT -0,12.1893794959 -V -0,-0.3681245527 -V -0,0.9297764859 -V --1,0 -BOT -0,12.3150432021 -V -0,-0.2486898872 -V -0,0.9685831611 -V --1,0 -BOT -0,12.4407069082 -V -0,-0.1253332336 -V -0,0.9921147013 -V --1,0 -BOT -0,12.5663706144 -V -0,0.0000000000 -V -0,1.0000000000 -V --1,0 -BOT -0,12.6920343205 -V -0,0.1253332336 -V -0,0.9921147013 -V --1,0 -BOT -0,12.8176980266 -V -0,0.2486898872 -V -0,0.9685831611 -V --1,0 -BOT -0,12.9433617328 -V -0,0.3681245527 -V -0,0.9297764859 -V --1,0 -BOT -0,13.0690254389 -V -0,0.4817536741 -V -0,0.8763066800 -V --1,0 -BOT -0,13.1946891451 -V -0,0.5877852523 -V -0,0.8090169944 -V --1,0 -BOT -0,13.3203528512 -V -0,0.6845471059 -V -0,0.7289686274 -V --1,0 -BOT -0,13.4460165574 -V -0,0.7705132428 -V -0,0.6374239897 -V --1,0 -BOT -0,13.5716802635 -V -0,0.8443279255 -V -0,0.5358267950 -V --1,0 -BOT -0,13.6973439697 -V -0,0.9048270525 -V -0,0.4257792916 -V --1,0 -BOT -0,13.8230076758 -V -0,0.9510565163 -V -0,0.3090169944 -V --1,0 -BOT -0,13.9486713819 -V -0,0.9822872507 -V -0,0.1873813146 -V --1,0 -BOT -0,14.0743350881 -V -0,0.9980267284 -V -0,0.0627905195 -V --1,0 -BOT -0,14.1999987942 -V -0,0.9980267284 -V -0,-0.0627905195 -V --1,0 -BOT -0,14.3256625004 -V -0,0.9822872507 -V -0,-0.1873813146 -V --1,0 -BOT -0,14.4513262065 -V -0,0.9510565163 -V -0,-0.3090169944 -V --1,0 -BOT -0,14.5769899127 -V -0,0.9048270525 -V -0,-0.4257792916 -V --1,0 -BOT -0,14.7026536188 -V -0,0.8443279255 -V -0,-0.5358267950 -V --1,0 -BOT -0,14.8283173249 -V -0,0.7705132428 -V -0,-0.6374239897 -V --1,0 -BOT -0,14.9539810311 -V -0,0.6845471059 -V -0,-0.7289686274 -V --1,0 -BOT -0,15.0796447372 -V -0,0.5877852523 -V -0,-0.8090169944 -V --1,0 -BOT -0,15.2053084434 -V -0,0.4817536741 -V -0,-0.8763066800 -V --1,0 -BOT -0,15.3309721495 -V -0,0.3681245527 -V -0,-0.9297764859 -V --1,0 -BOT -0,15.4566358557 -V -0,0.2486898872 -V -0,-0.9685831611 -V --1,0 -BOT -0,15.5822995618 -V -0,0.1253332336 -V -0,-0.9921147013 -V --1,0 -BOT -0,15.7079632679 -V -0,-0.0000000000 -V -0,-1.0000000000 -V --1,0 -BOT -0,15.8336269741 -V -0,-0.1253332336 -V -0,-0.9921147013 -V --1,0 -BOT -0,15.9592906802 -V -0,-0.2486898872 -V -0,-0.9685831611 -V --1,0 -BOT -0,16.0849543864 -V -0,-0.3681245527 -V -0,-0.9297764859 -V --1,0 -BOT -0,16.2106180925 -V -0,-0.4817536741 -V -0,-0.8763066800 -V --1,0 -BOT -0,16.3362817987 -V -0,-0.5877852523 -V -0,-0.8090169944 -V --1,0 -BOT -0,16.4619455048 -V -0,-0.6845471059 -V -0,-0.7289686274 -V --1,0 -BOT -0,16.5876092110 -V -0,-0.7705132428 -V -0,-0.6374239897 -V --1,0 -BOT -0,16.7132729171 -V -0,-0.8443279255 -V -0,-0.5358267950 -V --1,0 -BOT -0,16.8389366232 -V -0,-0.9048270525 -V -0,-0.4257792916 -V --1,0 -BOT -0,16.9646003294 -V -0,-0.9510565163 -V -0,-0.3090169944 -V --1,0 -BOT -0,17.0902640355 -V -0,-0.9822872507 -V -0,-0.1873813146 -V --1,0 -BOT -0,17.2159277417 -V -0,-0.9980267284 -V -0,-0.0627905195 -V --1,0 -BOT -0,17.3415914478 -V -0,-0.9980267284 -V -0,0.0627905195 -V --1,0 -BOT -0,17.4672551540 -V -0,-0.9822872507 -V -0,0.1873813146 -V --1,0 -BOT -0,17.5929188601 -V -0,-0.9510565163 -V -0,0.3090169944 -V --1,0 -BOT -0,17.7185825662 -V -0,-0.9048270525 -V -0,0.4257792916 -V --1,0 -BOT -0,17.8442462724 -V -0,-0.8443279255 -V -0,0.5358267950 -V --1,0 -BOT -0,17.9699099785 -V -0,-0.7705132428 -V -0,0.6374239897 -V --1,0 -BOT -0,18.0955736847 -V -0,-0.6845471059 -V -0,0.7289686274 -V --1,0 -BOT -0,18.2212373908 -V -0,-0.5877852523 -V -0,0.8090169944 -V --1,0 -BOT -0,18.3469010970 -V -0,-0.4817536741 -V -0,0.8763066800 -V --1,0 -BOT -0,18.4725648031 -V -0,-0.3681245527 -V -0,0.9297764859 -V --1,0 -BOT -0,18.5982285093 -V -0,-0.2486898872 -V -0,0.9685831611 -V --1,0 -BOT -0,18.7238922154 -V -0,-0.1253332336 -V -0,0.9921147013 -V --1,0 -BOT -0,18.8495559215 -V -0,0.0000000000 -V -0,1.0000000000 -V --1,0 -BOT -0,18.9752196277 -V -0,0.1253332336 -V -0,0.9921147013 -V --1,0 -BOT -0,19.1008833338 -V -0,0.2486898872 -V -0,0.9685831611 -V --1,0 -BOT -0,19.2265470400 -V -0,0.3681245527 -V -0,0.9297764859 -V --1,0 -BOT -0,19.3522107461 -V -0,0.4817536741 -V -0,0.8763066800 -V --1,0 -BOT -0,19.4778744523 -V -0,0.5877852523 -V -0,0.8090169944 -V --1,0 -BOT -0,19.6035381584 -V -0,0.6845471059 -V -0,0.7289686274 -V --1,0 -BOT -0,19.7292018645 -V -0,0.7705132428 -V -0,0.6374239897 -V --1,0 -BOT -0,19.8548655707 -V -0,0.8443279255 -V -0,0.5358267950 -V --1,0 -BOT -0,19.9805292768 -V -0,0.9048270525 -V -0,0.4257792916 -V --1,0 -BOT -0,20.1061929830 -V -0,0.9510565163 -V -0,0.3090169944 -V --1,0 -BOT -0,20.2318566891 -V -0,0.9822872507 -V -0,0.1873813146 -V --1,0 -BOT -0,20.3575203953 -V -0,0.9980267284 -V -0,0.0627905195 -V --1,0 -BOT -0,20.4831841014 -V -0,0.9980267284 -V -0,-0.0627905195 -V --1,0 -BOT -0,20.6088478075 -V -0,0.9822872507 -V -0,-0.1873813146 -V --1,0 -BOT -0,20.7345115137 -V -0,0.9510565163 -V -0,-0.3090169944 -V --1,0 -BOT -0,20.8601752198 -V -0,0.9048270525 -V -0,-0.4257792916 -V --1,0 -BOT -0,20.9858389260 -V -0,0.8443279255 -V -0,-0.5358267950 -V --1,0 -BOT -0,21.1115026321 -V -0,0.7705132428 -V -0,-0.6374239897 -V --1,0 -BOT -0,21.2371663383 -V -0,0.6845471059 -V -0,-0.7289686274 -V --1,0 -BOT -0,21.3628300444 -V -0,0.5877852523 -V -0,-0.8090169944 -V --1,0 -BOT -0,21.4884937506 -V -0,0.4817536741 -V -0,-0.8763066800 -V --1,0 -BOT -0,21.6141574567 -V -0,0.3681245527 -V -0,-0.9297764859 -V --1,0 -BOT -0,21.7398211628 -V -0,0.2486898872 -V -0,-0.9685831611 -V --1,0 -BOT -0,21.8654848690 -V -0,0.1253332336 -V -0,-0.9921147013 -V --1,0 -BOT -0,21.9911485751 -V -0,-0.0000000000 -V -0,-1.0000000000 -V --1,0 -BOT -0,22.1168122813 -V -0,-0.1253332336 -V -0,-0.9921147013 -V --1,0 -BOT -0,22.2424759874 -V -0,-0.2486898872 -V -0,-0.9685831611 -V --1,0 -BOT -0,22.3681396936 -V -0,-0.3681245527 -V -0,-0.9297764859 -V --1,0 -BOT -0,22.4938033997 -V -0,-0.4817536741 -V -0,-0.8763066800 -V --1,0 -BOT -0,22.6194671058 -V -0,-0.5877852523 -V -0,-0.8090169944 -V --1,0 -BOT -0,22.7451308120 -V -0,-0.6845471059 -V -0,-0.7289686274 -V --1,0 -BOT -0,22.8707945181 -V -0,-0.7705132428 -V -0,-0.6374239897 -V --1,0 -BOT -0,22.9964582243 -V -0,-0.8443279255 -V -0,-0.5358267950 -V --1,0 -BOT -0,23.1221219304 -V -0,-0.9048270525 -V -0,-0.4257792916 -V --1,0 -BOT -0,23.2477856366 -V -0,-0.9510565163 -V -0,-0.3090169944 -V --1,0 -BOT -0,23.3734493427 -V -0,-0.9822872507 -V -0,-0.1873813146 -V --1,0 -BOT -0,23.4991130489 -V -0,-0.9980267284 -V -0,-0.0627905195 -V --1,0 -BOT -0,23.6247767550 -V -0,-0.9980267284 -V -0,0.0627905195 -V --1,0 -BOT -0,23.7504404611 -V -0,-0.9822872507 -V -0,0.1873813146 -V --1,0 -BOT -0,23.8761041673 -V -0,-0.9510565163 -V -0,0.3090169944 -V --1,0 -BOT -0,24.0017678734 -V -0,-0.9048270525 -V -0,0.4257792916 -V --1,0 -BOT -0,24.1274315796 -V -0,-0.8443279255 -V -0,0.5358267950 -V --1,0 -BOT -0,24.2530952857 -V -0,-0.7705132428 -V -0,0.6374239897 -V --1,0 -BOT -0,24.3787589919 -V -0,-0.6845471059 -V -0,0.7289686274 -V --1,0 -BOT -0,24.5044226980 -V -0,-0.5877852523 -V -0,0.8090169944 -V --1,0 -BOT -0,24.6300864041 -V -0,-0.4817536741 -V -0,0.8763066800 -V --1,0 -BOT -0,24.7557501103 -V -0,-0.3681245527 -V -0,0.9297764859 -V --1,0 -BOT -0,24.8814138164 -V -0,-0.2486898872 -V -0,0.9685831611 -V --1,0 -BOT -0,25.0070775226 -V -0,-0.1253332336 -V -0,0.9921147013 -V --1,0 -EOT +TABLE +0,1 +"" +VECTORS +0,3 +"" +TUPLES +0,200 +"" +-1,0 +BOT +1,0 +"x1" +1,0 +"y11" +1,0 +"y12" +-1,0 +BOT +0,0.0000000000 +V +0,0.0000000000 +V +0,1.0000000000 +V +-1,0 +BOT +0,0.1256637061 +V +0,0.1253332336 +V +0,0.9921147013 +V +-1,0 +BOT +0,0.2513274123 +V +0,0.2486898872 +V +0,0.9685831611 +V +-1,0 +BOT +0,0.3769911184 +V +0,0.3681245527 +V +0,0.9297764859 +V +-1,0 +BOT +0,0.5026548246 +V +0,0.4817536741 +V +0,0.8763066800 +V +-1,0 +BOT +0,0.6283185307 +V +0,0.5877852523 +V +0,0.8090169944 +V +-1,0 +BOT +0,0.7539822369 +V +0,0.6845471059 +V +0,0.7289686274 +V +-1,0 +BOT +0,0.8796459430 +V +0,0.7705132428 +V +0,0.6374239897 +V +-1,0 +BOT +0,1.0053096491 +V +0,0.8443279255 +V +0,0.5358267950 +V +-1,0 +BOT +0,1.1309733553 +V +0,0.9048270525 +V +0,0.4257792916 +V +-1,0 +BOT +0,1.2566370614 +V +0,0.9510565163 +V +0,0.3090169944 +V +-1,0 +BOT +0,1.3823007676 +V +0,0.9822872507 +V +0,0.1873813146 +V +-1,0 +BOT +0,1.5079644737 +V +0,0.9980267284 +V +0,0.0627905195 +V +-1,0 +BOT +0,1.6336281799 +V +0,0.9980267284 +V +0,-0.0627905195 +V +-1,0 +BOT +0,1.7592918860 +V +0,0.9822872507 +V +0,-0.1873813146 +V +-1,0 +BOT +0,1.8849555922 +V +0,0.9510565163 +V +0,-0.3090169944 +V +-1,0 +BOT +0,2.0106192983 +V +0,0.9048270525 +V +0,-0.4257792916 +V +-1,0 +BOT +0,2.1362830044 +V +0,0.8443279255 +V +0,-0.5358267950 +V +-1,0 +BOT +0,2.2619467106 +V +0,0.7705132428 +V +0,-0.6374239897 +V +-1,0 +BOT +0,2.3876104167 +V +0,0.6845471059 +V +0,-0.7289686274 +V +-1,0 +BOT +0,2.5132741229 +V +0,0.5877852523 +V +0,-0.8090169944 +V +-1,0 +BOT +0,2.6389378290 +V +0,0.4817536741 +V +0,-0.8763066800 +V +-1,0 +BOT +0,2.7646015352 +V +0,0.3681245527 +V +0,-0.9297764859 +V +-1,0 +BOT +0,2.8902652413 +V +0,0.2486898872 +V +0,-0.9685831611 +V +-1,0 +BOT +0,3.0159289474 +V +0,0.1253332336 +V +0,-0.9921147013 +V +-1,0 +BOT +0,3.1415926536 +V +0,-0.0000000000 +V +0,-1.0000000000 +V +-1,0 +BOT +0,3.2672563597 +V +0,-0.1253332336 +V +0,-0.9921147013 +V +-1,0 +BOT +0,3.3929200659 +V +0,-0.2486898872 +V +0,-0.9685831611 +V +-1,0 +BOT +0,3.5185837720 +V +0,-0.3681245527 +V +0,-0.9297764859 +V +-1,0 +BOT +0,3.6442474782 +V +0,-0.4817536741 +V +0,-0.8763066800 +V +-1,0 +BOT +0,3.7699111843 +V +0,-0.5877852523 +V +0,-0.8090169944 +V +-1,0 +BOT +0,3.8955748905 +V +0,-0.6845471059 +V +0,-0.7289686274 +V +-1,0 +BOT +0,4.0212385966 +V +0,-0.7705132428 +V +0,-0.6374239897 +V +-1,0 +BOT +0,4.1469023027 +V +0,-0.8443279255 +V +0,-0.5358267950 +V +-1,0 +BOT +0,4.2725660089 +V +0,-0.9048270525 +V +0,-0.4257792916 +V +-1,0 +BOT +0,4.3982297150 +V +0,-0.9510565163 +V +0,-0.3090169944 +V +-1,0 +BOT +0,4.5238934212 +V +0,-0.9822872507 +V +0,-0.1873813146 +V +-1,0 +BOT +0,4.6495571273 +V +0,-0.9980267284 +V +0,-0.0627905195 +V +-1,0 +BOT +0,4.7752208335 +V +0,-0.9980267284 +V +0,0.0627905195 +V +-1,0 +BOT +0,4.9008845396 +V +0,-0.9822872507 +V +0,0.1873813146 +V +-1,0 +BOT +0,5.0265482457 +V +0,-0.9510565163 +V +0,0.3090169944 +V +-1,0 +BOT +0,5.1522119519 +V +0,-0.9048270525 +V +0,0.4257792916 +V +-1,0 +BOT +0,5.2778756580 +V +0,-0.8443279255 +V +0,0.5358267950 +V +-1,0 +BOT +0,5.4035393642 +V +0,-0.7705132428 +V +0,0.6374239897 +V +-1,0 +BOT +0,5.5292030703 +V +0,-0.6845471059 +V +0,0.7289686274 +V +-1,0 +BOT +0,5.6548667765 +V +0,-0.5877852523 +V +0,0.8090169944 +V +-1,0 +BOT +0,5.7805304826 +V +0,-0.4817536741 +V +0,0.8763066800 +V +-1,0 +BOT +0,5.9061941887 +V +0,-0.3681245527 +V +0,0.9297764859 +V +-1,0 +BOT +0,6.0318578949 +V +0,-0.2486898872 +V +0,0.9685831611 +V +-1,0 +BOT +0,6.1575216010 +V +0,-0.1253332336 +V +0,0.9921147013 +V +-1,0 +BOT +0,6.2831853072 +V +0,0.0000000000 +V +0,1.0000000000 +V +-1,0 +BOT +0,6.4088490133 +V +0,0.1253332336 +V +0,0.9921147013 +V +-1,0 +BOT +0,6.5345127195 +V +0,0.2486898872 +V +0,0.9685831611 +V +-1,0 +BOT +0,6.6601764256 +V +0,0.3681245527 +V +0,0.9297764859 +V +-1,0 +BOT +0,6.7858401318 +V +0,0.4817536741 +V +0,0.8763066800 +V +-1,0 +BOT +0,6.9115038379 +V +0,0.5877852523 +V +0,0.8090169944 +V +-1,0 +BOT +0,7.0371675440 +V +0,0.6845471059 +V +0,0.7289686274 +V +-1,0 +BOT +0,7.1628312502 +V +0,0.7705132428 +V +0,0.6374239897 +V +-1,0 +BOT +0,7.2884949563 +V +0,0.8443279255 +V +0,0.5358267950 +V +-1,0 +BOT +0,7.4141586625 +V +0,0.9048270525 +V +0,0.4257792916 +V +-1,0 +BOT +0,7.5398223686 +V +0,0.9510565163 +V +0,0.3090169944 +V +-1,0 +BOT +0,7.6654860748 +V +0,0.9822872507 +V +0,0.1873813146 +V +-1,0 +BOT +0,7.7911497809 +V +0,0.9980267284 +V +0,0.0627905195 +V +-1,0 +BOT +0,7.9168134870 +V +0,0.9980267284 +V +0,-0.0627905195 +V +-1,0 +BOT +0,8.0424771932 +V +0,0.9822872507 +V +0,-0.1873813146 +V +-1,0 +BOT +0,8.1681408993 +V +0,0.9510565163 +V +0,-0.3090169944 +V +-1,0 +BOT +0,8.2938046055 +V +0,0.9048270525 +V +0,-0.4257792916 +V +-1,0 +BOT +0,8.4194683116 +V +0,0.8443279255 +V +0,-0.5358267950 +V +-1,0 +BOT +0,8.5451320178 +V +0,0.7705132428 +V +0,-0.6374239897 +V +-1,0 +BOT +0,8.6707957239 +V +0,0.6845471059 +V +0,-0.7289686274 +V +-1,0 +BOT +0,8.7964594301 +V +0,0.5877852523 +V +0,-0.8090169944 +V +-1,0 +BOT +0,8.9221231362 +V +0,0.4817536741 +V +0,-0.8763066800 +V +-1,0 +BOT +0,9.0477868423 +V +0,0.3681245527 +V +0,-0.9297764859 +V +-1,0 +BOT +0,9.1734505485 +V +0,0.2486898872 +V +0,-0.9685831611 +V +-1,0 +BOT +0,9.2991142546 +V +0,0.1253332336 +V +0,-0.9921147013 +V +-1,0 +BOT +0,9.4247779608 +V +0,-0.0000000000 +V +0,-1.0000000000 +V +-1,0 +BOT +0,9.5504416669 +V +0,-0.1253332336 +V +0,-0.9921147013 +V +-1,0 +BOT +0,9.6761053731 +V +0,-0.2486898872 +V +0,-0.9685831611 +V +-1,0 +BOT +0,9.8017690792 +V +0,-0.3681245527 +V +0,-0.9297764859 +V +-1,0 +BOT +0,9.9274327853 +V +0,-0.4817536741 +V +0,-0.8763066800 +V +-1,0 +BOT +0,10.0530964915 +V +0,-0.5877852523 +V +0,-0.8090169944 +V +-1,0 +BOT +0,10.1787601976 +V +0,-0.6845471059 +V +0,-0.7289686274 +V +-1,0 +BOT +0,10.3044239038 +V +0,-0.7705132428 +V +0,-0.6374239897 +V +-1,0 +BOT +0,10.4300876099 +V +0,-0.8443279255 +V +0,-0.5358267950 +V +-1,0 +BOT +0,10.5557513161 +V +0,-0.9048270525 +V +0,-0.4257792916 +V +-1,0 +BOT +0,10.6814150222 +V +0,-0.9510565163 +V +0,-0.3090169944 +V +-1,0 +BOT +0,10.8070787283 +V +0,-0.9822872507 +V +0,-0.1873813146 +V +-1,0 +BOT +0,10.9327424345 +V +0,-0.9980267284 +V +0,-0.0627905195 +V +-1,0 +BOT +0,11.0584061406 +V +0,-0.9980267284 +V +0,0.0627905195 +V +-1,0 +BOT +0,11.1840698468 +V +0,-0.9822872507 +V +0,0.1873813146 +V +-1,0 +BOT +0,11.3097335529 +V +0,-0.9510565163 +V +0,0.3090169944 +V +-1,0 +BOT +0,11.4353972591 +V +0,-0.9048270525 +V +0,0.4257792916 +V +-1,0 +BOT +0,11.5610609652 +V +0,-0.8443279255 +V +0,0.5358267950 +V +-1,0 +BOT +0,11.6867246714 +V +0,-0.7705132428 +V +0,0.6374239897 +V +-1,0 +BOT +0,11.8123883775 +V +0,-0.6845471059 +V +0,0.7289686274 +V +-1,0 +BOT +0,11.9380520836 +V +0,-0.5877852523 +V +0,0.8090169944 +V +-1,0 +BOT +0,12.0637157898 +V +0,-0.4817536741 +V +0,0.8763066800 +V +-1,0 +BOT +0,12.1893794959 +V +0,-0.3681245527 +V +0,0.9297764859 +V +-1,0 +BOT +0,12.3150432021 +V +0,-0.2486898872 +V +0,0.9685831611 +V +-1,0 +BOT +0,12.4407069082 +V +0,-0.1253332336 +V +0,0.9921147013 +V +-1,0 +BOT +0,12.5663706144 +V +0,0.0000000000 +V +0,1.0000000000 +V +-1,0 +BOT +0,12.6920343205 +V +0,0.1253332336 +V +0,0.9921147013 +V +-1,0 +BOT +0,12.8176980266 +V +0,0.2486898872 +V +0,0.9685831611 +V +-1,0 +BOT +0,12.9433617328 +V +0,0.3681245527 +V +0,0.9297764859 +V +-1,0 +BOT +0,13.0690254389 +V +0,0.4817536741 +V +0,0.8763066800 +V +-1,0 +BOT +0,13.1946891451 +V +0,0.5877852523 +V +0,0.8090169944 +V +-1,0 +BOT +0,13.3203528512 +V +0,0.6845471059 +V +0,0.7289686274 +V +-1,0 +BOT +0,13.4460165574 +V +0,0.7705132428 +V +0,0.6374239897 +V +-1,0 +BOT +0,13.5716802635 +V +0,0.8443279255 +V +0,0.5358267950 +V +-1,0 +BOT +0,13.6973439697 +V +0,0.9048270525 +V +0,0.4257792916 +V +-1,0 +BOT +0,13.8230076758 +V +0,0.9510565163 +V +0,0.3090169944 +V +-1,0 +BOT +0,13.9486713819 +V +0,0.9822872507 +V +0,0.1873813146 +V +-1,0 +BOT +0,14.0743350881 +V +0,0.9980267284 +V +0,0.0627905195 +V +-1,0 +BOT +0,14.1999987942 +V +0,0.9980267284 +V +0,-0.0627905195 +V +-1,0 +BOT +0,14.3256625004 +V +0,0.9822872507 +V +0,-0.1873813146 +V +-1,0 +BOT +0,14.4513262065 +V +0,0.9510565163 +V +0,-0.3090169944 +V +-1,0 +BOT +0,14.5769899127 +V +0,0.9048270525 +V +0,-0.4257792916 +V +-1,0 +BOT +0,14.7026536188 +V +0,0.8443279255 +V +0,-0.5358267950 +V +-1,0 +BOT +0,14.8283173249 +V +0,0.7705132428 +V +0,-0.6374239897 +V +-1,0 +BOT +0,14.9539810311 +V +0,0.6845471059 +V +0,-0.7289686274 +V +-1,0 +BOT +0,15.0796447372 +V +0,0.5877852523 +V +0,-0.8090169944 +V +-1,0 +BOT +0,15.2053084434 +V +0,0.4817536741 +V +0,-0.8763066800 +V +-1,0 +BOT +0,15.3309721495 +V +0,0.3681245527 +V +0,-0.9297764859 +V +-1,0 +BOT +0,15.4566358557 +V +0,0.2486898872 +V +0,-0.9685831611 +V +-1,0 +BOT +0,15.5822995618 +V +0,0.1253332336 +V +0,-0.9921147013 +V +-1,0 +BOT +0,15.7079632679 +V +0,-0.0000000000 +V +0,-1.0000000000 +V +-1,0 +BOT +0,15.8336269741 +V +0,-0.1253332336 +V +0,-0.9921147013 +V +-1,0 +BOT +0,15.9592906802 +V +0,-0.2486898872 +V +0,-0.9685831611 +V +-1,0 +BOT +0,16.0849543864 +V +0,-0.3681245527 +V +0,-0.9297764859 +V +-1,0 +BOT +0,16.2106180925 +V +0,-0.4817536741 +V +0,-0.8763066800 +V +-1,0 +BOT +0,16.3362817987 +V +0,-0.5877852523 +V +0,-0.8090169944 +V +-1,0 +BOT +0,16.4619455048 +V +0,-0.6845471059 +V +0,-0.7289686274 +V +-1,0 +BOT +0,16.5876092110 +V +0,-0.7705132428 +V +0,-0.6374239897 +V +-1,0 +BOT +0,16.7132729171 +V +0,-0.8443279255 +V +0,-0.5358267950 +V +-1,0 +BOT +0,16.8389366232 +V +0,-0.9048270525 +V +0,-0.4257792916 +V +-1,0 +BOT +0,16.9646003294 +V +0,-0.9510565163 +V +0,-0.3090169944 +V +-1,0 +BOT +0,17.0902640355 +V +0,-0.9822872507 +V +0,-0.1873813146 +V +-1,0 +BOT +0,17.2159277417 +V +0,-0.9980267284 +V +0,-0.0627905195 +V +-1,0 +BOT +0,17.3415914478 +V +0,-0.9980267284 +V +0,0.0627905195 +V +-1,0 +BOT +0,17.4672551540 +V +0,-0.9822872507 +V +0,0.1873813146 +V +-1,0 +BOT +0,17.5929188601 +V +0,-0.9510565163 +V +0,0.3090169944 +V +-1,0 +BOT +0,17.7185825662 +V +0,-0.9048270525 +V +0,0.4257792916 +V +-1,0 +BOT +0,17.8442462724 +V +0,-0.8443279255 +V +0,0.5358267950 +V +-1,0 +BOT +0,17.9699099785 +V +0,-0.7705132428 +V +0,0.6374239897 +V +-1,0 +BOT +0,18.0955736847 +V +0,-0.6845471059 +V +0,0.7289686274 +V +-1,0 +BOT +0,18.2212373908 +V +0,-0.5877852523 +V +0,0.8090169944 +V +-1,0 +BOT +0,18.3469010970 +V +0,-0.4817536741 +V +0,0.8763066800 +V +-1,0 +BOT +0,18.4725648031 +V +0,-0.3681245527 +V +0,0.9297764859 +V +-1,0 +BOT +0,18.5982285093 +V +0,-0.2486898872 +V +0,0.9685831611 +V +-1,0 +BOT +0,18.7238922154 +V +0,-0.1253332336 +V +0,0.9921147013 +V +-1,0 +BOT +0,18.8495559215 +V +0,0.0000000000 +V +0,1.0000000000 +V +-1,0 +BOT +0,18.9752196277 +V +0,0.1253332336 +V +0,0.9921147013 +V +-1,0 +BOT +0,19.1008833338 +V +0,0.2486898872 +V +0,0.9685831611 +V +-1,0 +BOT +0,19.2265470400 +V +0,0.3681245527 +V +0,0.9297764859 +V +-1,0 +BOT +0,19.3522107461 +V +0,0.4817536741 +V +0,0.8763066800 +V +-1,0 +BOT +0,19.4778744523 +V +0,0.5877852523 +V +0,0.8090169944 +V +-1,0 +BOT +0,19.6035381584 +V +0,0.6845471059 +V +0,0.7289686274 +V +-1,0 +BOT +0,19.7292018645 +V +0,0.7705132428 +V +0,0.6374239897 +V +-1,0 +BOT +0,19.8548655707 +V +0,0.8443279255 +V +0,0.5358267950 +V +-1,0 +BOT +0,19.9805292768 +V +0,0.9048270525 +V +0,0.4257792916 +V +-1,0 +BOT +0,20.1061929830 +V +0,0.9510565163 +V +0,0.3090169944 +V +-1,0 +BOT +0,20.2318566891 +V +0,0.9822872507 +V +0,0.1873813146 +V +-1,0 +BOT +0,20.3575203953 +V +0,0.9980267284 +V +0,0.0627905195 +V +-1,0 +BOT +0,20.4831841014 +V +0,0.9980267284 +V +0,-0.0627905195 +V +-1,0 +BOT +0,20.6088478075 +V +0,0.9822872507 +V +0,-0.1873813146 +V +-1,0 +BOT +0,20.7345115137 +V +0,0.9510565163 +V +0,-0.3090169944 +V +-1,0 +BOT +0,20.8601752198 +V +0,0.9048270525 +V +0,-0.4257792916 +V +-1,0 +BOT +0,20.9858389260 +V +0,0.8443279255 +V +0,-0.5358267950 +V +-1,0 +BOT +0,21.1115026321 +V +0,0.7705132428 +V +0,-0.6374239897 +V +-1,0 +BOT +0,21.2371663383 +V +0,0.6845471059 +V +0,-0.7289686274 +V +-1,0 +BOT +0,21.3628300444 +V +0,0.5877852523 +V +0,-0.8090169944 +V +-1,0 +BOT +0,21.4884937506 +V +0,0.4817536741 +V +0,-0.8763066800 +V +-1,0 +BOT +0,21.6141574567 +V +0,0.3681245527 +V +0,-0.9297764859 +V +-1,0 +BOT +0,21.7398211628 +V +0,0.2486898872 +V +0,-0.9685831611 +V +-1,0 +BOT +0,21.8654848690 +V +0,0.1253332336 +V +0,-0.9921147013 +V +-1,0 +BOT +0,21.9911485751 +V +0,-0.0000000000 +V +0,-1.0000000000 +V +-1,0 +BOT +0,22.1168122813 +V +0,-0.1253332336 +V +0,-0.9921147013 +V +-1,0 +BOT +0,22.2424759874 +V +0,-0.2486898872 +V +0,-0.9685831611 +V +-1,0 +BOT +0,22.3681396936 +V +0,-0.3681245527 +V +0,-0.9297764859 +V +-1,0 +BOT +0,22.4938033997 +V +0,-0.4817536741 +V +0,-0.8763066800 +V +-1,0 +BOT +0,22.6194671058 +V +0,-0.5877852523 +V +0,-0.8090169944 +V +-1,0 +BOT +0,22.7451308120 +V +0,-0.6845471059 +V +0,-0.7289686274 +V +-1,0 +BOT +0,22.8707945181 +V +0,-0.7705132428 +V +0,-0.6374239897 +V +-1,0 +BOT +0,22.9964582243 +V +0,-0.8443279255 +V +0,-0.5358267950 +V +-1,0 +BOT +0,23.1221219304 +V +0,-0.9048270525 +V +0,-0.4257792916 +V +-1,0 +BOT +0,23.2477856366 +V +0,-0.9510565163 +V +0,-0.3090169944 +V +-1,0 +BOT +0,23.3734493427 +V +0,-0.9822872507 +V +0,-0.1873813146 +V +-1,0 +BOT +0,23.4991130489 +V +0,-0.9980267284 +V +0,-0.0627905195 +V +-1,0 +BOT +0,23.6247767550 +V +0,-0.9980267284 +V +0,0.0627905195 +V +-1,0 +BOT +0,23.7504404611 +V +0,-0.9822872507 +V +0,0.1873813146 +V +-1,0 +BOT +0,23.8761041673 +V +0,-0.9510565163 +V +0,0.3090169944 +V +-1,0 +BOT +0,24.0017678734 +V +0,-0.9048270525 +V +0,0.4257792916 +V +-1,0 +BOT +0,24.1274315796 +V +0,-0.8443279255 +V +0,0.5358267950 +V +-1,0 +BOT +0,24.2530952857 +V +0,-0.7705132428 +V +0,0.6374239897 +V +-1,0 +BOT +0,24.3787589919 +V +0,-0.6845471059 +V +0,0.7289686274 +V +-1,0 +BOT +0,24.5044226980 +V +0,-0.5877852523 +V +0,0.8090169944 +V +-1,0 +BOT +0,24.6300864041 +V +0,-0.4817536741 +V +0,0.8763066800 +V +-1,0 +BOT +0,24.7557501103 +V +0,-0.3681245527 +V +0,0.9297764859 +V +-1,0 +BOT +0,24.8814138164 +V +0,-0.2486898872 +V +0,0.9685831611 +V +-1,0 +BOT +0,25.0070775226 +V +0,-0.1253332336 +V +0,0.9921147013 +V +-1,0 +EOT diff --git a/test/jkqtplot_test/test.gex.txt b/examples/jkqtplot_test/test.gex.txt similarity index 97% rename from test/jkqtplot_test/test.gex.txt rename to examples/jkqtplot_test/test.gex.txt index 29119c1b0b..51caa07dda 100644 --- a/test/jkqtplot_test/test.gex.txt +++ b/examples/jkqtplot_test/test.gex.txt @@ -1,202 +1,202 @@ - x1;y11;y12 -0,0000000000;0,0000000000;1,0000000000 -0,1256637061;0,1253332336;0,9921147013 -0,2513274123;0,2486898872;0,9685831611 -0,3769911184;0,3681245527;0,9297764859 -0,5026548246;0,4817536741;0,8763066800 -0,6283185307;0,5877852523;0,8090169944 -0,7539822369;0,6845471059;0,7289686274 -0,8796459430;0,7705132428;0,6374239897 -1,0053096491;0,8443279255;0,5358267950 -1,1309733553;0,9048270525;0,4257792916 -1,2566370614;0,9510565163;0,3090169944 -1,3823007676;0,9822872507;0,1873813146 -1,5079644737;0,9980267284;0,0627905195 -1,6336281799;0,9980267284;-0,0627905195 -1,7592918860;0,9822872507;-0,1873813146 -1,8849555922;0,9510565163;-0,3090169944 -2,0106192983;0,9048270525;-0,4257792916 -2,1362830044;0,8443279255;-0,5358267950 -2,2619467106;0,7705132428;-0,6374239897 -2,3876104167;0,6845471059;-0,7289686274 -2,5132741229;0,5877852523;-0,8090169944 -2,6389378290;0,4817536741;-0,8763066800 -2,7646015352;0,3681245527;-0,9297764859 -2,8902652413;0,2486898872;-0,9685831611 -3,0159289474;0,1253332336;-0,9921147013 -3,1415926536;-0,0000000000;-1,0000000000 -3,2672563597;-0,1253332336;-0,9921147013 -3,3929200659;-0,2486898872;-0,9685831611 -3,5185837720;-0,3681245527;-0,9297764859 -3,6442474782;-0,4817536741;-0,8763066800 -3,7699111843;-0,5877852523;-0,8090169944 -3,8955748905;-0,6845471059;-0,7289686274 -4,0212385966;-0,7705132428;-0,6374239897 -4,1469023027;-0,8443279255;-0,5358267950 -4,2725660089;-0,9048270525;-0,4257792916 -4,3982297150;-0,9510565163;-0,3090169944 -4,5238934212;-0,9822872507;-0,1873813146 -4,6495571273;-0,9980267284;-0,0627905195 -4,7752208335;-0,9980267284;0,0627905195 -4,9008845396;-0,9822872507;0,1873813146 -5,0265482457;-0,9510565163;0,3090169944 -5,1522119519;-0,9048270525;0,4257792916 -5,2778756580;-0,8443279255;0,5358267950 -5,4035393642;-0,7705132428;0,6374239897 -5,5292030703;-0,6845471059;0,7289686274 -5,6548667765;-0,5877852523;0,8090169944 -5,7805304826;-0,4817536741;0,8763066800 -5,9061941887;-0,3681245527;0,9297764859 -6,0318578949;-0,2486898872;0,9685831611 -6,1575216010;-0,1253332336;0,9921147013 -6,2831853072;0,0000000000;1,0000000000 -6,4088490133;0,1253332336;0,9921147013 -6,5345127195;0,2486898872;0,9685831611 -6,6601764256;0,3681245527;0,9297764859 -6,7858401318;0,4817536741;0,8763066800 -6,9115038379;0,5877852523;0,8090169944 -7,0371675440;0,6845471059;0,7289686274 -7,1628312502;0,7705132428;0,6374239897 -7,2884949563;0,8443279255;0,5358267950 -7,4141586625;0,9048270525;0,4257792916 -7,5398223686;0,9510565163;0,3090169944 -7,6654860748;0,9822872507;0,1873813146 -7,7911497809;0,9980267284;0,0627905195 -7,9168134870;0,9980267284;-0,0627905195 -8,0424771932;0,9822872507;-0,1873813146 -8,1681408993;0,9510565163;-0,3090169944 -8,2938046055;0,9048270525;-0,4257792916 -8,4194683116;0,8443279255;-0,5358267950 -8,5451320178;0,7705132428;-0,6374239897 -8,6707957239;0,6845471059;-0,7289686274 -8,7964594301;0,5877852523;-0,8090169944 -8,9221231362;0,4817536741;-0,8763066800 -9,0477868423;0,3681245527;-0,9297764859 -9,1734505485;0,2486898872;-0,9685831611 -9,2991142546;0,1253332336;-0,9921147013 -9,4247779608;-0,0000000000;-1,0000000000 -9,5504416669;-0,1253332336;-0,9921147013 -9,6761053731;-0,2486898872;-0,9685831611 -9,8017690792;-0,3681245527;-0,9297764859 -9,9274327853;-0,4817536741;-0,8763066800 -10,0530964915;-0,5877852523;-0,8090169944 -10,1787601976;-0,6845471059;-0,7289686274 -10,3044239038;-0,7705132428;-0,6374239897 -10,4300876099;-0,8443279255;-0,5358267950 -10,5557513161;-0,9048270525;-0,4257792916 -10,6814150222;-0,9510565163;-0,3090169944 -10,8070787283;-0,9822872507;-0,1873813146 -10,9327424345;-0,9980267284;-0,0627905195 -11,0584061406;-0,9980267284;0,0627905195 -11,1840698468;-0,9822872507;0,1873813146 -11,3097335529;-0,9510565163;0,3090169944 -11,4353972591;-0,9048270525;0,4257792916 -11,5610609652;-0,8443279255;0,5358267950 -11,6867246714;-0,7705132428;0,6374239897 -11,8123883775;-0,6845471059;0,7289686274 -11,9380520836;-0,5877852523;0,8090169944 -12,0637157898;-0,4817536741;0,8763066800 -12,1893794959;-0,3681245527;0,9297764859 -12,3150432021;-0,2486898872;0,9685831611 -12,4407069082;-0,1253332336;0,9921147013 -12,5663706144;0,0000000000;1,0000000000 -12,6920343205;0,1253332336;0,9921147013 -12,8176980266;0,2486898872;0,9685831611 -12,9433617328;0,3681245527;0,9297764859 -13,0690254389;0,4817536741;0,8763066800 -13,1946891451;0,5877852523;0,8090169944 -13,3203528512;0,6845471059;0,7289686274 -13,4460165574;0,7705132428;0,6374239897 -13,5716802635;0,8443279255;0,5358267950 -13,6973439697;0,9048270525;0,4257792916 -13,8230076758;0,9510565163;0,3090169944 -13,9486713819;0,9822872507;0,1873813146 -14,0743350881;0,9980267284;0,0627905195 -14,1999987942;0,9980267284;-0,0627905195 -14,3256625004;0,9822872507;-0,1873813146 -14,4513262065;0,9510565163;-0,3090169944 -14,5769899127;0,9048270525;-0,4257792916 -14,7026536188;0,8443279255;-0,5358267950 -14,8283173249;0,7705132428;-0,6374239897 -14,9539810311;0,6845471059;-0,7289686274 -15,0796447372;0,5877852523;-0,8090169944 -15,2053084434;0,4817536741;-0,8763066800 -15,3309721495;0,3681245527;-0,9297764859 -15,4566358557;0,2486898872;-0,9685831611 -15,5822995618;0,1253332336;-0,9921147013 -15,7079632679;-0,0000000000;-1,0000000000 -15,8336269741;-0,1253332336;-0,9921147013 -15,9592906802;-0,2486898872;-0,9685831611 -16,0849543864;-0,3681245527;-0,9297764859 -16,2106180925;-0,4817536741;-0,8763066800 -16,3362817987;-0,5877852523;-0,8090169944 -16,4619455048;-0,6845471059;-0,7289686274 -16,5876092110;-0,7705132428;-0,6374239897 -16,7132729171;-0,8443279255;-0,5358267950 -16,8389366232;-0,9048270525;-0,4257792916 -16,9646003294;-0,9510565163;-0,3090169944 -17,0902640355;-0,9822872507;-0,1873813146 -17,2159277417;-0,9980267284;-0,0627905195 -17,3415914478;-0,9980267284;0,0627905195 -17,4672551540;-0,9822872507;0,1873813146 -17,5929188601;-0,9510565163;0,3090169944 -17,7185825662;-0,9048270525;0,4257792916 -17,8442462724;-0,8443279255;0,5358267950 -17,9699099785;-0,7705132428;0,6374239897 -18,0955736847;-0,6845471059;0,7289686274 -18,2212373908;-0,5877852523;0,8090169944 -18,3469010970;-0,4817536741;0,8763066800 -18,4725648031;-0,3681245527;0,9297764859 -18,5982285093;-0,2486898872;0,9685831611 -18,7238922154;-0,1253332336;0,9921147013 -18,8495559215;0,0000000000;1,0000000000 -18,9752196277;0,1253332336;0,9921147013 -19,1008833338;0,2486898872;0,9685831611 -19,2265470400;0,3681245527;0,9297764859 -19,3522107461;0,4817536741;0,8763066800 -19,4778744523;0,5877852523;0,8090169944 -19,6035381584;0,6845471059;0,7289686274 -19,7292018645;0,7705132428;0,6374239897 -19,8548655707;0,8443279255;0,5358267950 -19,9805292768;0,9048270525;0,4257792916 -20,1061929830;0,9510565163;0,3090169944 -20,2318566891;0,9822872507;0,1873813146 -20,3575203953;0,9980267284;0,0627905195 -20,4831841014;0,9980267284;-0,0627905195 -20,6088478075;0,9822872507;-0,1873813146 -20,7345115137;0,9510565163;-0,3090169944 -20,8601752198;0,9048270525;-0,4257792916 -20,9858389260;0,8443279255;-0,5358267950 -21,1115026321;0,7705132428;-0,6374239897 -21,2371663383;0,6845471059;-0,7289686274 -21,3628300444;0,5877852523;-0,8090169944 -21,4884937506;0,4817536741;-0,8763066800 -21,6141574567;0,3681245527;-0,9297764859 -21,7398211628;0,2486898872;-0,9685831611 -21,8654848690;0,1253332336;-0,9921147013 -21,9911485751;-0,0000000000;-1,0000000000 -22,1168122813;-0,1253332336;-0,9921147013 -22,2424759874;-0,2486898872;-0,9685831611 -22,3681396936;-0,3681245527;-0,9297764859 -22,4938033997;-0,4817536741;-0,8763066800 -22,6194671058;-0,5877852523;-0,8090169944 -22,7451308120;-0,6845471059;-0,7289686274 -22,8707945181;-0,7705132428;-0,6374239897 -22,9964582243;-0,8443279255;-0,5358267950 -23,1221219304;-0,9048270525;-0,4257792916 -23,2477856366;-0,9510565163;-0,3090169944 -23,3734493427;-0,9822872507;-0,1873813146 -23,4991130489;-0,9980267284;-0,0627905195 -23,6247767550;-0,9980267284;0,0627905195 -23,7504404611;-0,9822872507;0,1873813146 -23,8761041673;-0,9510565163;0,3090169944 -24,0017678734;-0,9048270525;0,4257792916 -24,1274315796;-0,8443279255;0,5358267950 -24,2530952857;-0,7705132428;0,6374239897 -24,3787589919;-0,6845471059;0,7289686274 -24,5044226980;-0,5877852523;0,8090169944 -24,6300864041;-0,4817536741;0,8763066800 -24,7557501103;-0,3681245527;0,9297764859 -24,8814138164;-0,2486898872;0,9685831611 -25,0070775226;-0,1253332336;0,9921147013 - + x1;y11;y12 +0,0000000000;0,0000000000;1,0000000000 +0,1256637061;0,1253332336;0,9921147013 +0,2513274123;0,2486898872;0,9685831611 +0,3769911184;0,3681245527;0,9297764859 +0,5026548246;0,4817536741;0,8763066800 +0,6283185307;0,5877852523;0,8090169944 +0,7539822369;0,6845471059;0,7289686274 +0,8796459430;0,7705132428;0,6374239897 +1,0053096491;0,8443279255;0,5358267950 +1,1309733553;0,9048270525;0,4257792916 +1,2566370614;0,9510565163;0,3090169944 +1,3823007676;0,9822872507;0,1873813146 +1,5079644737;0,9980267284;0,0627905195 +1,6336281799;0,9980267284;-0,0627905195 +1,7592918860;0,9822872507;-0,1873813146 +1,8849555922;0,9510565163;-0,3090169944 +2,0106192983;0,9048270525;-0,4257792916 +2,1362830044;0,8443279255;-0,5358267950 +2,2619467106;0,7705132428;-0,6374239897 +2,3876104167;0,6845471059;-0,7289686274 +2,5132741229;0,5877852523;-0,8090169944 +2,6389378290;0,4817536741;-0,8763066800 +2,7646015352;0,3681245527;-0,9297764859 +2,8902652413;0,2486898872;-0,9685831611 +3,0159289474;0,1253332336;-0,9921147013 +3,1415926536;-0,0000000000;-1,0000000000 +3,2672563597;-0,1253332336;-0,9921147013 +3,3929200659;-0,2486898872;-0,9685831611 +3,5185837720;-0,3681245527;-0,9297764859 +3,6442474782;-0,4817536741;-0,8763066800 +3,7699111843;-0,5877852523;-0,8090169944 +3,8955748905;-0,6845471059;-0,7289686274 +4,0212385966;-0,7705132428;-0,6374239897 +4,1469023027;-0,8443279255;-0,5358267950 +4,2725660089;-0,9048270525;-0,4257792916 +4,3982297150;-0,9510565163;-0,3090169944 +4,5238934212;-0,9822872507;-0,1873813146 +4,6495571273;-0,9980267284;-0,0627905195 +4,7752208335;-0,9980267284;0,0627905195 +4,9008845396;-0,9822872507;0,1873813146 +5,0265482457;-0,9510565163;0,3090169944 +5,1522119519;-0,9048270525;0,4257792916 +5,2778756580;-0,8443279255;0,5358267950 +5,4035393642;-0,7705132428;0,6374239897 +5,5292030703;-0,6845471059;0,7289686274 +5,6548667765;-0,5877852523;0,8090169944 +5,7805304826;-0,4817536741;0,8763066800 +5,9061941887;-0,3681245527;0,9297764859 +6,0318578949;-0,2486898872;0,9685831611 +6,1575216010;-0,1253332336;0,9921147013 +6,2831853072;0,0000000000;1,0000000000 +6,4088490133;0,1253332336;0,9921147013 +6,5345127195;0,2486898872;0,9685831611 +6,6601764256;0,3681245527;0,9297764859 +6,7858401318;0,4817536741;0,8763066800 +6,9115038379;0,5877852523;0,8090169944 +7,0371675440;0,6845471059;0,7289686274 +7,1628312502;0,7705132428;0,6374239897 +7,2884949563;0,8443279255;0,5358267950 +7,4141586625;0,9048270525;0,4257792916 +7,5398223686;0,9510565163;0,3090169944 +7,6654860748;0,9822872507;0,1873813146 +7,7911497809;0,9980267284;0,0627905195 +7,9168134870;0,9980267284;-0,0627905195 +8,0424771932;0,9822872507;-0,1873813146 +8,1681408993;0,9510565163;-0,3090169944 +8,2938046055;0,9048270525;-0,4257792916 +8,4194683116;0,8443279255;-0,5358267950 +8,5451320178;0,7705132428;-0,6374239897 +8,6707957239;0,6845471059;-0,7289686274 +8,7964594301;0,5877852523;-0,8090169944 +8,9221231362;0,4817536741;-0,8763066800 +9,0477868423;0,3681245527;-0,9297764859 +9,1734505485;0,2486898872;-0,9685831611 +9,2991142546;0,1253332336;-0,9921147013 +9,4247779608;-0,0000000000;-1,0000000000 +9,5504416669;-0,1253332336;-0,9921147013 +9,6761053731;-0,2486898872;-0,9685831611 +9,8017690792;-0,3681245527;-0,9297764859 +9,9274327853;-0,4817536741;-0,8763066800 +10,0530964915;-0,5877852523;-0,8090169944 +10,1787601976;-0,6845471059;-0,7289686274 +10,3044239038;-0,7705132428;-0,6374239897 +10,4300876099;-0,8443279255;-0,5358267950 +10,5557513161;-0,9048270525;-0,4257792916 +10,6814150222;-0,9510565163;-0,3090169944 +10,8070787283;-0,9822872507;-0,1873813146 +10,9327424345;-0,9980267284;-0,0627905195 +11,0584061406;-0,9980267284;0,0627905195 +11,1840698468;-0,9822872507;0,1873813146 +11,3097335529;-0,9510565163;0,3090169944 +11,4353972591;-0,9048270525;0,4257792916 +11,5610609652;-0,8443279255;0,5358267950 +11,6867246714;-0,7705132428;0,6374239897 +11,8123883775;-0,6845471059;0,7289686274 +11,9380520836;-0,5877852523;0,8090169944 +12,0637157898;-0,4817536741;0,8763066800 +12,1893794959;-0,3681245527;0,9297764859 +12,3150432021;-0,2486898872;0,9685831611 +12,4407069082;-0,1253332336;0,9921147013 +12,5663706144;0,0000000000;1,0000000000 +12,6920343205;0,1253332336;0,9921147013 +12,8176980266;0,2486898872;0,9685831611 +12,9433617328;0,3681245527;0,9297764859 +13,0690254389;0,4817536741;0,8763066800 +13,1946891451;0,5877852523;0,8090169944 +13,3203528512;0,6845471059;0,7289686274 +13,4460165574;0,7705132428;0,6374239897 +13,5716802635;0,8443279255;0,5358267950 +13,6973439697;0,9048270525;0,4257792916 +13,8230076758;0,9510565163;0,3090169944 +13,9486713819;0,9822872507;0,1873813146 +14,0743350881;0,9980267284;0,0627905195 +14,1999987942;0,9980267284;-0,0627905195 +14,3256625004;0,9822872507;-0,1873813146 +14,4513262065;0,9510565163;-0,3090169944 +14,5769899127;0,9048270525;-0,4257792916 +14,7026536188;0,8443279255;-0,5358267950 +14,8283173249;0,7705132428;-0,6374239897 +14,9539810311;0,6845471059;-0,7289686274 +15,0796447372;0,5877852523;-0,8090169944 +15,2053084434;0,4817536741;-0,8763066800 +15,3309721495;0,3681245527;-0,9297764859 +15,4566358557;0,2486898872;-0,9685831611 +15,5822995618;0,1253332336;-0,9921147013 +15,7079632679;-0,0000000000;-1,0000000000 +15,8336269741;-0,1253332336;-0,9921147013 +15,9592906802;-0,2486898872;-0,9685831611 +16,0849543864;-0,3681245527;-0,9297764859 +16,2106180925;-0,4817536741;-0,8763066800 +16,3362817987;-0,5877852523;-0,8090169944 +16,4619455048;-0,6845471059;-0,7289686274 +16,5876092110;-0,7705132428;-0,6374239897 +16,7132729171;-0,8443279255;-0,5358267950 +16,8389366232;-0,9048270525;-0,4257792916 +16,9646003294;-0,9510565163;-0,3090169944 +17,0902640355;-0,9822872507;-0,1873813146 +17,2159277417;-0,9980267284;-0,0627905195 +17,3415914478;-0,9980267284;0,0627905195 +17,4672551540;-0,9822872507;0,1873813146 +17,5929188601;-0,9510565163;0,3090169944 +17,7185825662;-0,9048270525;0,4257792916 +17,8442462724;-0,8443279255;0,5358267950 +17,9699099785;-0,7705132428;0,6374239897 +18,0955736847;-0,6845471059;0,7289686274 +18,2212373908;-0,5877852523;0,8090169944 +18,3469010970;-0,4817536741;0,8763066800 +18,4725648031;-0,3681245527;0,9297764859 +18,5982285093;-0,2486898872;0,9685831611 +18,7238922154;-0,1253332336;0,9921147013 +18,8495559215;0,0000000000;1,0000000000 +18,9752196277;0,1253332336;0,9921147013 +19,1008833338;0,2486898872;0,9685831611 +19,2265470400;0,3681245527;0,9297764859 +19,3522107461;0,4817536741;0,8763066800 +19,4778744523;0,5877852523;0,8090169944 +19,6035381584;0,6845471059;0,7289686274 +19,7292018645;0,7705132428;0,6374239897 +19,8548655707;0,8443279255;0,5358267950 +19,9805292768;0,9048270525;0,4257792916 +20,1061929830;0,9510565163;0,3090169944 +20,2318566891;0,9822872507;0,1873813146 +20,3575203953;0,9980267284;0,0627905195 +20,4831841014;0,9980267284;-0,0627905195 +20,6088478075;0,9822872507;-0,1873813146 +20,7345115137;0,9510565163;-0,3090169944 +20,8601752198;0,9048270525;-0,4257792916 +20,9858389260;0,8443279255;-0,5358267950 +21,1115026321;0,7705132428;-0,6374239897 +21,2371663383;0,6845471059;-0,7289686274 +21,3628300444;0,5877852523;-0,8090169944 +21,4884937506;0,4817536741;-0,8763066800 +21,6141574567;0,3681245527;-0,9297764859 +21,7398211628;0,2486898872;-0,9685831611 +21,8654848690;0,1253332336;-0,9921147013 +21,9911485751;-0,0000000000;-1,0000000000 +22,1168122813;-0,1253332336;-0,9921147013 +22,2424759874;-0,2486898872;-0,9685831611 +22,3681396936;-0,3681245527;-0,9297764859 +22,4938033997;-0,4817536741;-0,8763066800 +22,6194671058;-0,5877852523;-0,8090169944 +22,7451308120;-0,6845471059;-0,7289686274 +22,8707945181;-0,7705132428;-0,6374239897 +22,9964582243;-0,8443279255;-0,5358267950 +23,1221219304;-0,9048270525;-0,4257792916 +23,2477856366;-0,9510565163;-0,3090169944 +23,3734493427;-0,9822872507;-0,1873813146 +23,4991130489;-0,9980267284;-0,0627905195 +23,6247767550;-0,9980267284;0,0627905195 +23,7504404611;-0,9822872507;0,1873813146 +23,8761041673;-0,9510565163;0,3090169944 +24,0017678734;-0,9048270525;0,4257792916 +24,1274315796;-0,8443279255;0,5358267950 +24,2530952857;-0,7705132428;0,6374239897 +24,3787589919;-0,6845471059;0,7289686274 +24,5044226980;-0,5877852523;0,8090169944 +24,6300864041;-0,4817536741;0,8763066800 +24,7557501103;-0,3681245527;0,9297764859 +24,8814138164;-0,2486898872;0,9685831611 +25,0070775226;-0,1253332336;0,9921147013 + diff --git a/test/jkqtplot_test/test.jpg b/examples/jkqtplot_test/test.jpg similarity index 100% rename from test/jkqtplot_test/test.jpg rename to examples/jkqtplot_test/test.jpg diff --git a/test/jkqtplot_test/test.png b/examples/jkqtplot_test/test.png similarity index 100% rename from test/jkqtplot_test/test.png rename to examples/jkqtplot_test/test.png diff --git a/test/jkqtplot_test/test.ps b/examples/jkqtplot_test/test.ps similarity index 100% rename from test/jkqtplot_test/test.ps rename to examples/jkqtplot_test/test.ps diff --git a/test/jkqtplot_test/test.semi.txt b/examples/jkqtplot_test/test.semi.txt similarity index 97% rename from test/jkqtplot_test/test.semi.txt rename to examples/jkqtplot_test/test.semi.txt index c9b0e11ce3..414eb7a99c 100644 --- a/test/jkqtplot_test/test.semi.txt +++ b/examples/jkqtplot_test/test.semi.txt @@ -1,202 +1,202 @@ -# x1;y11;y12 -0.0000000000;0.0000000000;1.0000000000 -0.1256637061;0.1253332336;0.9921147013 -0.2513274123;0.2486898872;0.9685831611 -0.3769911184;0.3681245527;0.9297764859 -0.5026548246;0.4817536741;0.8763066800 -0.6283185307;0.5877852523;0.8090169944 -0.7539822369;0.6845471059;0.7289686274 -0.8796459430;0.7705132428;0.6374239897 -1.0053096491;0.8443279255;0.5358267950 -1.1309733553;0.9048270525;0.4257792916 -1.2566370614;0.9510565163;0.3090169944 -1.3823007676;0.9822872507;0.1873813146 -1.5079644737;0.9980267284;0.0627905195 -1.6336281799;0.9980267284;-0.0627905195 -1.7592918860;0.9822872507;-0.1873813146 -1.8849555922;0.9510565163;-0.3090169944 -2.0106192983;0.9048270525;-0.4257792916 -2.1362830044;0.8443279255;-0.5358267950 -2.2619467106;0.7705132428;-0.6374239897 -2.3876104167;0.6845471059;-0.7289686274 -2.5132741229;0.5877852523;-0.8090169944 -2.6389378290;0.4817536741;-0.8763066800 -2.7646015352;0.3681245527;-0.9297764859 -2.8902652413;0.2486898872;-0.9685831611 -3.0159289474;0.1253332336;-0.9921147013 -3.1415926536;-0.0000000000;-1.0000000000 -3.2672563597;-0.1253332336;-0.9921147013 -3.3929200659;-0.2486898872;-0.9685831611 -3.5185837720;-0.3681245527;-0.9297764859 -3.6442474782;-0.4817536741;-0.8763066800 -3.7699111843;-0.5877852523;-0.8090169944 -3.8955748905;-0.6845471059;-0.7289686274 -4.0212385966;-0.7705132428;-0.6374239897 -4.1469023027;-0.8443279255;-0.5358267950 -4.2725660089;-0.9048270525;-0.4257792916 -4.3982297150;-0.9510565163;-0.3090169944 -4.5238934212;-0.9822872507;-0.1873813146 -4.6495571273;-0.9980267284;-0.0627905195 -4.7752208335;-0.9980267284;0.0627905195 -4.9008845396;-0.9822872507;0.1873813146 -5.0265482457;-0.9510565163;0.3090169944 -5.1522119519;-0.9048270525;0.4257792916 -5.2778756580;-0.8443279255;0.5358267950 -5.4035393642;-0.7705132428;0.6374239897 -5.5292030703;-0.6845471059;0.7289686274 -5.6548667765;-0.5877852523;0.8090169944 -5.7805304826;-0.4817536741;0.8763066800 -5.9061941887;-0.3681245527;0.9297764859 -6.0318578949;-0.2486898872;0.9685831611 -6.1575216010;-0.1253332336;0.9921147013 -6.2831853072;0.0000000000;1.0000000000 -6.4088490133;0.1253332336;0.9921147013 -6.5345127195;0.2486898872;0.9685831611 -6.6601764256;0.3681245527;0.9297764859 -6.7858401318;0.4817536741;0.8763066800 -6.9115038379;0.5877852523;0.8090169944 -7.0371675440;0.6845471059;0.7289686274 -7.1628312502;0.7705132428;0.6374239897 -7.2884949563;0.8443279255;0.5358267950 -7.4141586625;0.9048270525;0.4257792916 -7.5398223686;0.9510565163;0.3090169944 -7.6654860748;0.9822872507;0.1873813146 -7.7911497809;0.9980267284;0.0627905195 -7.9168134870;0.9980267284;-0.0627905195 -8.0424771932;0.9822872507;-0.1873813146 -8.1681408993;0.9510565163;-0.3090169944 -8.2938046055;0.9048270525;-0.4257792916 -8.4194683116;0.8443279255;-0.5358267950 -8.5451320178;0.7705132428;-0.6374239897 -8.6707957239;0.6845471059;-0.7289686274 -8.7964594301;0.5877852523;-0.8090169944 -8.9221231362;0.4817536741;-0.8763066800 -9.0477868423;0.3681245527;-0.9297764859 -9.1734505485;0.2486898872;-0.9685831611 -9.2991142546;0.1253332336;-0.9921147013 -9.4247779608;-0.0000000000;-1.0000000000 -9.5504416669;-0.1253332336;-0.9921147013 -9.6761053731;-0.2486898872;-0.9685831611 -9.8017690792;-0.3681245527;-0.9297764859 -9.9274327853;-0.4817536741;-0.8763066800 -10.0530964915;-0.5877852523;-0.8090169944 -10.1787601976;-0.6845471059;-0.7289686274 -10.3044239038;-0.7705132428;-0.6374239897 -10.4300876099;-0.8443279255;-0.5358267950 -10.5557513161;-0.9048270525;-0.4257792916 -10.6814150222;-0.9510565163;-0.3090169944 -10.8070787283;-0.9822872507;-0.1873813146 -10.9327424345;-0.9980267284;-0.0627905195 -11.0584061406;-0.9980267284;0.0627905195 -11.1840698468;-0.9822872507;0.1873813146 -11.3097335529;-0.9510565163;0.3090169944 -11.4353972591;-0.9048270525;0.4257792916 -11.5610609652;-0.8443279255;0.5358267950 -11.6867246714;-0.7705132428;0.6374239897 -11.8123883775;-0.6845471059;0.7289686274 -11.9380520836;-0.5877852523;0.8090169944 -12.0637157898;-0.4817536741;0.8763066800 -12.1893794959;-0.3681245527;0.9297764859 -12.3150432021;-0.2486898872;0.9685831611 -12.4407069082;-0.1253332336;0.9921147013 -12.5663706144;0.0000000000;1.0000000000 -12.6920343205;0.1253332336;0.9921147013 -12.8176980266;0.2486898872;0.9685831611 -12.9433617328;0.3681245527;0.9297764859 -13.0690254389;0.4817536741;0.8763066800 -13.1946891451;0.5877852523;0.8090169944 -13.3203528512;0.6845471059;0.7289686274 -13.4460165574;0.7705132428;0.6374239897 -13.5716802635;0.8443279255;0.5358267950 -13.6973439697;0.9048270525;0.4257792916 -13.8230076758;0.9510565163;0.3090169944 -13.9486713819;0.9822872507;0.1873813146 -14.0743350881;0.9980267284;0.0627905195 -14.1999987942;0.9980267284;-0.0627905195 -14.3256625004;0.9822872507;-0.1873813146 -14.4513262065;0.9510565163;-0.3090169944 -14.5769899127;0.9048270525;-0.4257792916 -14.7026536188;0.8443279255;-0.5358267950 -14.8283173249;0.7705132428;-0.6374239897 -14.9539810311;0.6845471059;-0.7289686274 -15.0796447372;0.5877852523;-0.8090169944 -15.2053084434;0.4817536741;-0.8763066800 -15.3309721495;0.3681245527;-0.9297764859 -15.4566358557;0.2486898872;-0.9685831611 -15.5822995618;0.1253332336;-0.9921147013 -15.7079632679;-0.0000000000;-1.0000000000 -15.8336269741;-0.1253332336;-0.9921147013 -15.9592906802;-0.2486898872;-0.9685831611 -16.0849543864;-0.3681245527;-0.9297764859 -16.2106180925;-0.4817536741;-0.8763066800 -16.3362817987;-0.5877852523;-0.8090169944 -16.4619455048;-0.6845471059;-0.7289686274 -16.5876092110;-0.7705132428;-0.6374239897 -16.7132729171;-0.8443279255;-0.5358267950 -16.8389366232;-0.9048270525;-0.4257792916 -16.9646003294;-0.9510565163;-0.3090169944 -17.0902640355;-0.9822872507;-0.1873813146 -17.2159277417;-0.9980267284;-0.0627905195 -17.3415914478;-0.9980267284;0.0627905195 -17.4672551540;-0.9822872507;0.1873813146 -17.5929188601;-0.9510565163;0.3090169944 -17.7185825662;-0.9048270525;0.4257792916 -17.8442462724;-0.8443279255;0.5358267950 -17.9699099785;-0.7705132428;0.6374239897 -18.0955736847;-0.6845471059;0.7289686274 -18.2212373908;-0.5877852523;0.8090169944 -18.3469010970;-0.4817536741;0.8763066800 -18.4725648031;-0.3681245527;0.9297764859 -18.5982285093;-0.2486898872;0.9685831611 -18.7238922154;-0.1253332336;0.9921147013 -18.8495559215;0.0000000000;1.0000000000 -18.9752196277;0.1253332336;0.9921147013 -19.1008833338;0.2486898872;0.9685831611 -19.2265470400;0.3681245527;0.9297764859 -19.3522107461;0.4817536741;0.8763066800 -19.4778744523;0.5877852523;0.8090169944 -19.6035381584;0.6845471059;0.7289686274 -19.7292018645;0.7705132428;0.6374239897 -19.8548655707;0.8443279255;0.5358267950 -19.9805292768;0.9048270525;0.4257792916 -20.1061929830;0.9510565163;0.3090169944 -20.2318566891;0.9822872507;0.1873813146 -20.3575203953;0.9980267284;0.0627905195 -20.4831841014;0.9980267284;-0.0627905195 -20.6088478075;0.9822872507;-0.1873813146 -20.7345115137;0.9510565163;-0.3090169944 -20.8601752198;0.9048270525;-0.4257792916 -20.9858389260;0.8443279255;-0.5358267950 -21.1115026321;0.7705132428;-0.6374239897 -21.2371663383;0.6845471059;-0.7289686274 -21.3628300444;0.5877852523;-0.8090169944 -21.4884937506;0.4817536741;-0.8763066800 -21.6141574567;0.3681245527;-0.9297764859 -21.7398211628;0.2486898872;-0.9685831611 -21.8654848690;0.1253332336;-0.9921147013 -21.9911485751;-0.0000000000;-1.0000000000 -22.1168122813;-0.1253332336;-0.9921147013 -22.2424759874;-0.2486898872;-0.9685831611 -22.3681396936;-0.3681245527;-0.9297764859 -22.4938033997;-0.4817536741;-0.8763066800 -22.6194671058;-0.5877852523;-0.8090169944 -22.7451308120;-0.6845471059;-0.7289686274 -22.8707945181;-0.7705132428;-0.6374239897 -22.9964582243;-0.8443279255;-0.5358267950 -23.1221219304;-0.9048270525;-0.4257792916 -23.2477856366;-0.9510565163;-0.3090169944 -23.3734493427;-0.9822872507;-0.1873813146 -23.4991130489;-0.9980267284;-0.0627905195 -23.6247767550;-0.9980267284;0.0627905195 -23.7504404611;-0.9822872507;0.1873813146 -23.8761041673;-0.9510565163;0.3090169944 -24.0017678734;-0.9048270525;0.4257792916 -24.1274315796;-0.8443279255;0.5358267950 -24.2530952857;-0.7705132428;0.6374239897 -24.3787589919;-0.6845471059;0.7289686274 -24.5044226980;-0.5877852523;0.8090169944 -24.6300864041;-0.4817536741;0.8763066800 -24.7557501103;-0.3681245527;0.9297764859 -24.8814138164;-0.2486898872;0.9685831611 -25.0070775226;-0.1253332336;0.9921147013 - +# x1;y11;y12 +0.0000000000;0.0000000000;1.0000000000 +0.1256637061;0.1253332336;0.9921147013 +0.2513274123;0.2486898872;0.9685831611 +0.3769911184;0.3681245527;0.9297764859 +0.5026548246;0.4817536741;0.8763066800 +0.6283185307;0.5877852523;0.8090169944 +0.7539822369;0.6845471059;0.7289686274 +0.8796459430;0.7705132428;0.6374239897 +1.0053096491;0.8443279255;0.5358267950 +1.1309733553;0.9048270525;0.4257792916 +1.2566370614;0.9510565163;0.3090169944 +1.3823007676;0.9822872507;0.1873813146 +1.5079644737;0.9980267284;0.0627905195 +1.6336281799;0.9980267284;-0.0627905195 +1.7592918860;0.9822872507;-0.1873813146 +1.8849555922;0.9510565163;-0.3090169944 +2.0106192983;0.9048270525;-0.4257792916 +2.1362830044;0.8443279255;-0.5358267950 +2.2619467106;0.7705132428;-0.6374239897 +2.3876104167;0.6845471059;-0.7289686274 +2.5132741229;0.5877852523;-0.8090169944 +2.6389378290;0.4817536741;-0.8763066800 +2.7646015352;0.3681245527;-0.9297764859 +2.8902652413;0.2486898872;-0.9685831611 +3.0159289474;0.1253332336;-0.9921147013 +3.1415926536;-0.0000000000;-1.0000000000 +3.2672563597;-0.1253332336;-0.9921147013 +3.3929200659;-0.2486898872;-0.9685831611 +3.5185837720;-0.3681245527;-0.9297764859 +3.6442474782;-0.4817536741;-0.8763066800 +3.7699111843;-0.5877852523;-0.8090169944 +3.8955748905;-0.6845471059;-0.7289686274 +4.0212385966;-0.7705132428;-0.6374239897 +4.1469023027;-0.8443279255;-0.5358267950 +4.2725660089;-0.9048270525;-0.4257792916 +4.3982297150;-0.9510565163;-0.3090169944 +4.5238934212;-0.9822872507;-0.1873813146 +4.6495571273;-0.9980267284;-0.0627905195 +4.7752208335;-0.9980267284;0.0627905195 +4.9008845396;-0.9822872507;0.1873813146 +5.0265482457;-0.9510565163;0.3090169944 +5.1522119519;-0.9048270525;0.4257792916 +5.2778756580;-0.8443279255;0.5358267950 +5.4035393642;-0.7705132428;0.6374239897 +5.5292030703;-0.6845471059;0.7289686274 +5.6548667765;-0.5877852523;0.8090169944 +5.7805304826;-0.4817536741;0.8763066800 +5.9061941887;-0.3681245527;0.9297764859 +6.0318578949;-0.2486898872;0.9685831611 +6.1575216010;-0.1253332336;0.9921147013 +6.2831853072;0.0000000000;1.0000000000 +6.4088490133;0.1253332336;0.9921147013 +6.5345127195;0.2486898872;0.9685831611 +6.6601764256;0.3681245527;0.9297764859 +6.7858401318;0.4817536741;0.8763066800 +6.9115038379;0.5877852523;0.8090169944 +7.0371675440;0.6845471059;0.7289686274 +7.1628312502;0.7705132428;0.6374239897 +7.2884949563;0.8443279255;0.5358267950 +7.4141586625;0.9048270525;0.4257792916 +7.5398223686;0.9510565163;0.3090169944 +7.6654860748;0.9822872507;0.1873813146 +7.7911497809;0.9980267284;0.0627905195 +7.9168134870;0.9980267284;-0.0627905195 +8.0424771932;0.9822872507;-0.1873813146 +8.1681408993;0.9510565163;-0.3090169944 +8.2938046055;0.9048270525;-0.4257792916 +8.4194683116;0.8443279255;-0.5358267950 +8.5451320178;0.7705132428;-0.6374239897 +8.6707957239;0.6845471059;-0.7289686274 +8.7964594301;0.5877852523;-0.8090169944 +8.9221231362;0.4817536741;-0.8763066800 +9.0477868423;0.3681245527;-0.9297764859 +9.1734505485;0.2486898872;-0.9685831611 +9.2991142546;0.1253332336;-0.9921147013 +9.4247779608;-0.0000000000;-1.0000000000 +9.5504416669;-0.1253332336;-0.9921147013 +9.6761053731;-0.2486898872;-0.9685831611 +9.8017690792;-0.3681245527;-0.9297764859 +9.9274327853;-0.4817536741;-0.8763066800 +10.0530964915;-0.5877852523;-0.8090169944 +10.1787601976;-0.6845471059;-0.7289686274 +10.3044239038;-0.7705132428;-0.6374239897 +10.4300876099;-0.8443279255;-0.5358267950 +10.5557513161;-0.9048270525;-0.4257792916 +10.6814150222;-0.9510565163;-0.3090169944 +10.8070787283;-0.9822872507;-0.1873813146 +10.9327424345;-0.9980267284;-0.0627905195 +11.0584061406;-0.9980267284;0.0627905195 +11.1840698468;-0.9822872507;0.1873813146 +11.3097335529;-0.9510565163;0.3090169944 +11.4353972591;-0.9048270525;0.4257792916 +11.5610609652;-0.8443279255;0.5358267950 +11.6867246714;-0.7705132428;0.6374239897 +11.8123883775;-0.6845471059;0.7289686274 +11.9380520836;-0.5877852523;0.8090169944 +12.0637157898;-0.4817536741;0.8763066800 +12.1893794959;-0.3681245527;0.9297764859 +12.3150432021;-0.2486898872;0.9685831611 +12.4407069082;-0.1253332336;0.9921147013 +12.5663706144;0.0000000000;1.0000000000 +12.6920343205;0.1253332336;0.9921147013 +12.8176980266;0.2486898872;0.9685831611 +12.9433617328;0.3681245527;0.9297764859 +13.0690254389;0.4817536741;0.8763066800 +13.1946891451;0.5877852523;0.8090169944 +13.3203528512;0.6845471059;0.7289686274 +13.4460165574;0.7705132428;0.6374239897 +13.5716802635;0.8443279255;0.5358267950 +13.6973439697;0.9048270525;0.4257792916 +13.8230076758;0.9510565163;0.3090169944 +13.9486713819;0.9822872507;0.1873813146 +14.0743350881;0.9980267284;0.0627905195 +14.1999987942;0.9980267284;-0.0627905195 +14.3256625004;0.9822872507;-0.1873813146 +14.4513262065;0.9510565163;-0.3090169944 +14.5769899127;0.9048270525;-0.4257792916 +14.7026536188;0.8443279255;-0.5358267950 +14.8283173249;0.7705132428;-0.6374239897 +14.9539810311;0.6845471059;-0.7289686274 +15.0796447372;0.5877852523;-0.8090169944 +15.2053084434;0.4817536741;-0.8763066800 +15.3309721495;0.3681245527;-0.9297764859 +15.4566358557;0.2486898872;-0.9685831611 +15.5822995618;0.1253332336;-0.9921147013 +15.7079632679;-0.0000000000;-1.0000000000 +15.8336269741;-0.1253332336;-0.9921147013 +15.9592906802;-0.2486898872;-0.9685831611 +16.0849543864;-0.3681245527;-0.9297764859 +16.2106180925;-0.4817536741;-0.8763066800 +16.3362817987;-0.5877852523;-0.8090169944 +16.4619455048;-0.6845471059;-0.7289686274 +16.5876092110;-0.7705132428;-0.6374239897 +16.7132729171;-0.8443279255;-0.5358267950 +16.8389366232;-0.9048270525;-0.4257792916 +16.9646003294;-0.9510565163;-0.3090169944 +17.0902640355;-0.9822872507;-0.1873813146 +17.2159277417;-0.9980267284;-0.0627905195 +17.3415914478;-0.9980267284;0.0627905195 +17.4672551540;-0.9822872507;0.1873813146 +17.5929188601;-0.9510565163;0.3090169944 +17.7185825662;-0.9048270525;0.4257792916 +17.8442462724;-0.8443279255;0.5358267950 +17.9699099785;-0.7705132428;0.6374239897 +18.0955736847;-0.6845471059;0.7289686274 +18.2212373908;-0.5877852523;0.8090169944 +18.3469010970;-0.4817536741;0.8763066800 +18.4725648031;-0.3681245527;0.9297764859 +18.5982285093;-0.2486898872;0.9685831611 +18.7238922154;-0.1253332336;0.9921147013 +18.8495559215;0.0000000000;1.0000000000 +18.9752196277;0.1253332336;0.9921147013 +19.1008833338;0.2486898872;0.9685831611 +19.2265470400;0.3681245527;0.9297764859 +19.3522107461;0.4817536741;0.8763066800 +19.4778744523;0.5877852523;0.8090169944 +19.6035381584;0.6845471059;0.7289686274 +19.7292018645;0.7705132428;0.6374239897 +19.8548655707;0.8443279255;0.5358267950 +19.9805292768;0.9048270525;0.4257792916 +20.1061929830;0.9510565163;0.3090169944 +20.2318566891;0.9822872507;0.1873813146 +20.3575203953;0.9980267284;0.0627905195 +20.4831841014;0.9980267284;-0.0627905195 +20.6088478075;0.9822872507;-0.1873813146 +20.7345115137;0.9510565163;-0.3090169944 +20.8601752198;0.9048270525;-0.4257792916 +20.9858389260;0.8443279255;-0.5358267950 +21.1115026321;0.7705132428;-0.6374239897 +21.2371663383;0.6845471059;-0.7289686274 +21.3628300444;0.5877852523;-0.8090169944 +21.4884937506;0.4817536741;-0.8763066800 +21.6141574567;0.3681245527;-0.9297764859 +21.7398211628;0.2486898872;-0.9685831611 +21.8654848690;0.1253332336;-0.9921147013 +21.9911485751;-0.0000000000;-1.0000000000 +22.1168122813;-0.1253332336;-0.9921147013 +22.2424759874;-0.2486898872;-0.9685831611 +22.3681396936;-0.3681245527;-0.9297764859 +22.4938033997;-0.4817536741;-0.8763066800 +22.6194671058;-0.5877852523;-0.8090169944 +22.7451308120;-0.6845471059;-0.7289686274 +22.8707945181;-0.7705132428;-0.6374239897 +22.9964582243;-0.8443279255;-0.5358267950 +23.1221219304;-0.9048270525;-0.4257792916 +23.2477856366;-0.9510565163;-0.3090169944 +23.3734493427;-0.9822872507;-0.1873813146 +23.4991130489;-0.9980267284;-0.0627905195 +23.6247767550;-0.9980267284;0.0627905195 +23.7504404611;-0.9822872507;0.1873813146 +23.8761041673;-0.9510565163;0.3090169944 +24.0017678734;-0.9048270525;0.4257792916 +24.1274315796;-0.8443279255;0.5358267950 +24.2530952857;-0.7705132428;0.6374239897 +24.3787589919;-0.6845471059;0.7289686274 +24.5044226980;-0.5877852523;0.8090169944 +24.6300864041;-0.4817536741;0.8763066800 +24.7557501103;-0.3681245527;0.9297764859 +24.8814138164;-0.2486898872;0.9685831611 +25.0070775226;-0.1253332336;0.9921147013 + diff --git a/test/jkqtplot_test/test.slk b/examples/jkqtplot_test/test.slk similarity index 96% rename from test/jkqtplot_test/test.slk rename to examples/jkqtplot_test/test.slk index 8a6ac06e1a..b58459c8ae 100644 --- a/test/jkqtplot_test/test.slk +++ b/examples/jkqtplot_test/test.slk @@ -1,609 +1,609 @@ -ID;P -C;Y1;X1;K"x1" -F;Y1;X1;SDB -C;Y1;X2;K"y11" -F;Y1;X2;SDB -C;Y1;X3;K"y12" -F;Y1;X3;SDB -C;X1;Y2;N;K0.0000000000 -C;X2;Y2;N;K0.0000000000 -C;X3;Y2;N;K1.0000000000 -C;X1;Y3;N;K0.1256637061 -C;X2;Y3;N;K0.1253332336 -C;X3;Y3;N;K0.9921147013 -C;X1;Y4;N;K0.2513274123 -C;X2;Y4;N;K0.2486898872 -C;X3;Y4;N;K0.9685831611 -C;X1;Y5;N;K0.3769911184 -C;X2;Y5;N;K0.3681245527 -C;X3;Y5;N;K0.9297764859 -C;X1;Y6;N;K0.5026548246 -C;X2;Y6;N;K0.4817536741 -C;X3;Y6;N;K0.8763066800 -C;X1;Y7;N;K0.6283185307 -C;X2;Y7;N;K0.5877852523 -C;X3;Y7;N;K0.8090169944 -C;X1;Y8;N;K0.7539822369 -C;X2;Y8;N;K0.6845471059 -C;X3;Y8;N;K0.7289686274 -C;X1;Y9;N;K0.8796459430 -C;X2;Y9;N;K0.7705132428 -C;X3;Y9;N;K0.6374239897 -C;X1;Y10;N;K1.0053096491 -C;X2;Y10;N;K0.8443279255 -C;X3;Y10;N;K0.5358267950 -C;X1;Y11;N;K1.1309733553 -C;X2;Y11;N;K0.9048270525 -C;X3;Y11;N;K0.4257792916 -C;X1;Y12;N;K1.2566370614 -C;X2;Y12;N;K0.9510565163 -C;X3;Y12;N;K0.3090169944 -C;X1;Y13;N;K1.3823007676 -C;X2;Y13;N;K0.9822872507 -C;X3;Y13;N;K0.1873813146 -C;X1;Y14;N;K1.5079644737 -C;X2;Y14;N;K0.9980267284 -C;X3;Y14;N;K0.0627905195 -C;X1;Y15;N;K1.6336281799 -C;X2;Y15;N;K0.9980267284 -C;X3;Y15;N;K-0.0627905195 -C;X1;Y16;N;K1.7592918860 -C;X2;Y16;N;K0.9822872507 -C;X3;Y16;N;K-0.1873813146 -C;X1;Y17;N;K1.8849555922 -C;X2;Y17;N;K0.9510565163 -C;X3;Y17;N;K-0.3090169944 -C;X1;Y18;N;K2.0106192983 -C;X2;Y18;N;K0.9048270525 -C;X3;Y18;N;K-0.4257792916 -C;X1;Y19;N;K2.1362830044 -C;X2;Y19;N;K0.8443279255 -C;X3;Y19;N;K-0.5358267950 -C;X1;Y20;N;K2.2619467106 -C;X2;Y20;N;K0.7705132428 -C;X3;Y20;N;K-0.6374239897 -C;X1;Y21;N;K2.3876104167 -C;X2;Y21;N;K0.6845471059 -C;X3;Y21;N;K-0.7289686274 -C;X1;Y22;N;K2.5132741229 -C;X2;Y22;N;K0.5877852523 -C;X3;Y22;N;K-0.8090169944 -C;X1;Y23;N;K2.6389378290 -C;X2;Y23;N;K0.4817536741 -C;X3;Y23;N;K-0.8763066800 -C;X1;Y24;N;K2.7646015352 -C;X2;Y24;N;K0.3681245527 -C;X3;Y24;N;K-0.9297764859 -C;X1;Y25;N;K2.8902652413 -C;X2;Y25;N;K0.2486898872 -C;X3;Y25;N;K-0.9685831611 -C;X1;Y26;N;K3.0159289474 -C;X2;Y26;N;K0.1253332336 -C;X3;Y26;N;K-0.9921147013 -C;X1;Y27;N;K3.1415926536 -C;X2;Y27;N;K-0.0000000000 -C;X3;Y27;N;K-1.0000000000 -C;X1;Y28;N;K3.2672563597 -C;X2;Y28;N;K-0.1253332336 -C;X3;Y28;N;K-0.9921147013 -C;X1;Y29;N;K3.3929200659 -C;X2;Y29;N;K-0.2486898872 -C;X3;Y29;N;K-0.9685831611 -C;X1;Y30;N;K3.5185837720 -C;X2;Y30;N;K-0.3681245527 -C;X3;Y30;N;K-0.9297764859 -C;X1;Y31;N;K3.6442474782 -C;X2;Y31;N;K-0.4817536741 -C;X3;Y31;N;K-0.8763066800 -C;X1;Y32;N;K3.7699111843 -C;X2;Y32;N;K-0.5877852523 -C;X3;Y32;N;K-0.8090169944 -C;X1;Y33;N;K3.8955748905 -C;X2;Y33;N;K-0.6845471059 -C;X3;Y33;N;K-0.7289686274 -C;X1;Y34;N;K4.0212385966 -C;X2;Y34;N;K-0.7705132428 -C;X3;Y34;N;K-0.6374239897 -C;X1;Y35;N;K4.1469023027 -C;X2;Y35;N;K-0.8443279255 -C;X3;Y35;N;K-0.5358267950 -C;X1;Y36;N;K4.2725660089 -C;X2;Y36;N;K-0.9048270525 -C;X3;Y36;N;K-0.4257792916 -C;X1;Y37;N;K4.3982297150 -C;X2;Y37;N;K-0.9510565163 -C;X3;Y37;N;K-0.3090169944 -C;X1;Y38;N;K4.5238934212 -C;X2;Y38;N;K-0.9822872507 -C;X3;Y38;N;K-0.1873813146 -C;X1;Y39;N;K4.6495571273 -C;X2;Y39;N;K-0.9980267284 -C;X3;Y39;N;K-0.0627905195 -C;X1;Y40;N;K4.7752208335 -C;X2;Y40;N;K-0.9980267284 -C;X3;Y40;N;K0.0627905195 -C;X1;Y41;N;K4.9008845396 -C;X2;Y41;N;K-0.9822872507 -C;X3;Y41;N;K0.1873813146 -C;X1;Y42;N;K5.0265482457 -C;X2;Y42;N;K-0.9510565163 -C;X3;Y42;N;K0.3090169944 -C;X1;Y43;N;K5.1522119519 -C;X2;Y43;N;K-0.9048270525 -C;X3;Y43;N;K0.4257792916 -C;X1;Y44;N;K5.2778756580 -C;X2;Y44;N;K-0.8443279255 -C;X3;Y44;N;K0.5358267950 -C;X1;Y45;N;K5.4035393642 -C;X2;Y45;N;K-0.7705132428 -C;X3;Y45;N;K0.6374239897 -C;X1;Y46;N;K5.5292030703 -C;X2;Y46;N;K-0.6845471059 -C;X3;Y46;N;K0.7289686274 -C;X1;Y47;N;K5.6548667765 -C;X2;Y47;N;K-0.5877852523 -C;X3;Y47;N;K0.8090169944 -C;X1;Y48;N;K5.7805304826 -C;X2;Y48;N;K-0.4817536741 -C;X3;Y48;N;K0.8763066800 -C;X1;Y49;N;K5.9061941887 -C;X2;Y49;N;K-0.3681245527 -C;X3;Y49;N;K0.9297764859 -C;X1;Y50;N;K6.0318578949 -C;X2;Y50;N;K-0.2486898872 -C;X3;Y50;N;K0.9685831611 -C;X1;Y51;N;K6.1575216010 -C;X2;Y51;N;K-0.1253332336 -C;X3;Y51;N;K0.9921147013 -C;X1;Y52;N;K6.2831853072 -C;X2;Y52;N;K0.0000000000 -C;X3;Y52;N;K1.0000000000 -C;X1;Y53;N;K6.4088490133 -C;X2;Y53;N;K0.1253332336 -C;X3;Y53;N;K0.9921147013 -C;X1;Y54;N;K6.5345127195 -C;X2;Y54;N;K0.2486898872 -C;X3;Y54;N;K0.9685831611 -C;X1;Y55;N;K6.6601764256 -C;X2;Y55;N;K0.3681245527 -C;X3;Y55;N;K0.9297764859 -C;X1;Y56;N;K6.7858401318 -C;X2;Y56;N;K0.4817536741 -C;X3;Y56;N;K0.8763066800 -C;X1;Y57;N;K6.9115038379 -C;X2;Y57;N;K0.5877852523 -C;X3;Y57;N;K0.8090169944 -C;X1;Y58;N;K7.0371675440 -C;X2;Y58;N;K0.6845471059 -C;X3;Y58;N;K0.7289686274 -C;X1;Y59;N;K7.1628312502 -C;X2;Y59;N;K0.7705132428 -C;X3;Y59;N;K0.6374239897 -C;X1;Y60;N;K7.2884949563 -C;X2;Y60;N;K0.8443279255 -C;X3;Y60;N;K0.5358267950 -C;X1;Y61;N;K7.4141586625 -C;X2;Y61;N;K0.9048270525 -C;X3;Y61;N;K0.4257792916 -C;X1;Y62;N;K7.5398223686 -C;X2;Y62;N;K0.9510565163 -C;X3;Y62;N;K0.3090169944 -C;X1;Y63;N;K7.6654860748 -C;X2;Y63;N;K0.9822872507 -C;X3;Y63;N;K0.1873813146 -C;X1;Y64;N;K7.7911497809 -C;X2;Y64;N;K0.9980267284 -C;X3;Y64;N;K0.0627905195 -C;X1;Y65;N;K7.9168134870 -C;X2;Y65;N;K0.9980267284 -C;X3;Y65;N;K-0.0627905195 -C;X1;Y66;N;K8.0424771932 -C;X2;Y66;N;K0.9822872507 -C;X3;Y66;N;K-0.1873813146 -C;X1;Y67;N;K8.1681408993 -C;X2;Y67;N;K0.9510565163 -C;X3;Y67;N;K-0.3090169944 -C;X1;Y68;N;K8.2938046055 -C;X2;Y68;N;K0.9048270525 -C;X3;Y68;N;K-0.4257792916 -C;X1;Y69;N;K8.4194683116 -C;X2;Y69;N;K0.8443279255 -C;X3;Y69;N;K-0.5358267950 -C;X1;Y70;N;K8.5451320178 -C;X2;Y70;N;K0.7705132428 -C;X3;Y70;N;K-0.6374239897 -C;X1;Y71;N;K8.6707957239 -C;X2;Y71;N;K0.6845471059 -C;X3;Y71;N;K-0.7289686274 -C;X1;Y72;N;K8.7964594301 -C;X2;Y72;N;K0.5877852523 -C;X3;Y72;N;K-0.8090169944 -C;X1;Y73;N;K8.9221231362 -C;X2;Y73;N;K0.4817536741 -C;X3;Y73;N;K-0.8763066800 -C;X1;Y74;N;K9.0477868423 -C;X2;Y74;N;K0.3681245527 -C;X3;Y74;N;K-0.9297764859 -C;X1;Y75;N;K9.1734505485 -C;X2;Y75;N;K0.2486898872 -C;X3;Y75;N;K-0.9685831611 -C;X1;Y76;N;K9.2991142546 -C;X2;Y76;N;K0.1253332336 -C;X3;Y76;N;K-0.9921147013 -C;X1;Y77;N;K9.4247779608 -C;X2;Y77;N;K-0.0000000000 -C;X3;Y77;N;K-1.0000000000 -C;X1;Y78;N;K9.5504416669 -C;X2;Y78;N;K-0.1253332336 -C;X3;Y78;N;K-0.9921147013 -C;X1;Y79;N;K9.6761053731 -C;X2;Y79;N;K-0.2486898872 -C;X3;Y79;N;K-0.9685831611 -C;X1;Y80;N;K9.8017690792 -C;X2;Y80;N;K-0.3681245527 -C;X3;Y80;N;K-0.9297764859 -C;X1;Y81;N;K9.9274327853 -C;X2;Y81;N;K-0.4817536741 -C;X3;Y81;N;K-0.8763066800 -C;X1;Y82;N;K10.0530964915 -C;X2;Y82;N;K-0.5877852523 -C;X3;Y82;N;K-0.8090169944 -C;X1;Y83;N;K10.1787601976 -C;X2;Y83;N;K-0.6845471059 -C;X3;Y83;N;K-0.7289686274 -C;X1;Y84;N;K10.3044239038 -C;X2;Y84;N;K-0.7705132428 -C;X3;Y84;N;K-0.6374239897 -C;X1;Y85;N;K10.4300876099 -C;X2;Y85;N;K-0.8443279255 -C;X3;Y85;N;K-0.5358267950 -C;X1;Y86;N;K10.5557513161 -C;X2;Y86;N;K-0.9048270525 -C;X3;Y86;N;K-0.4257792916 -C;X1;Y87;N;K10.6814150222 -C;X2;Y87;N;K-0.9510565163 -C;X3;Y87;N;K-0.3090169944 -C;X1;Y88;N;K10.8070787283 -C;X2;Y88;N;K-0.9822872507 -C;X3;Y88;N;K-0.1873813146 -C;X1;Y89;N;K10.9327424345 -C;X2;Y89;N;K-0.9980267284 -C;X3;Y89;N;K-0.0627905195 -C;X1;Y90;N;K11.0584061406 -C;X2;Y90;N;K-0.9980267284 -C;X3;Y90;N;K0.0627905195 -C;X1;Y91;N;K11.1840698468 -C;X2;Y91;N;K-0.9822872507 -C;X3;Y91;N;K0.1873813146 -C;X1;Y92;N;K11.3097335529 -C;X2;Y92;N;K-0.9510565163 -C;X3;Y92;N;K0.3090169944 -C;X1;Y93;N;K11.4353972591 -C;X2;Y93;N;K-0.9048270525 -C;X3;Y93;N;K0.4257792916 -C;X1;Y94;N;K11.5610609652 -C;X2;Y94;N;K-0.8443279255 -C;X3;Y94;N;K0.5358267950 -C;X1;Y95;N;K11.6867246714 -C;X2;Y95;N;K-0.7705132428 -C;X3;Y95;N;K0.6374239897 -C;X1;Y96;N;K11.8123883775 -C;X2;Y96;N;K-0.6845471059 -C;X3;Y96;N;K0.7289686274 -C;X1;Y97;N;K11.9380520836 -C;X2;Y97;N;K-0.5877852523 -C;X3;Y97;N;K0.8090169944 -C;X1;Y98;N;K12.0637157898 -C;X2;Y98;N;K-0.4817536741 -C;X3;Y98;N;K0.8763066800 -C;X1;Y99;N;K12.1893794959 -C;X2;Y99;N;K-0.3681245527 -C;X3;Y99;N;K0.9297764859 -C;X1;Y100;N;K12.3150432021 -C;X2;Y100;N;K-0.2486898872 -C;X3;Y100;N;K0.9685831611 -C;X1;Y101;N;K12.4407069082 -C;X2;Y101;N;K-0.1253332336 -C;X3;Y101;N;K0.9921147013 -C;X1;Y102;N;K12.5663706144 -C;X2;Y102;N;K0.0000000000 -C;X3;Y102;N;K1.0000000000 -C;X1;Y103;N;K12.6920343205 -C;X2;Y103;N;K0.1253332336 -C;X3;Y103;N;K0.9921147013 -C;X1;Y104;N;K12.8176980266 -C;X2;Y104;N;K0.2486898872 -C;X3;Y104;N;K0.9685831611 -C;X1;Y105;N;K12.9433617328 -C;X2;Y105;N;K0.3681245527 -C;X3;Y105;N;K0.9297764859 -C;X1;Y106;N;K13.0690254389 -C;X2;Y106;N;K0.4817536741 -C;X3;Y106;N;K0.8763066800 -C;X1;Y107;N;K13.1946891451 -C;X2;Y107;N;K0.5877852523 -C;X3;Y107;N;K0.8090169944 -C;X1;Y108;N;K13.3203528512 -C;X2;Y108;N;K0.6845471059 -C;X3;Y108;N;K0.7289686274 -C;X1;Y109;N;K13.4460165574 -C;X2;Y109;N;K0.7705132428 -C;X3;Y109;N;K0.6374239897 -C;X1;Y110;N;K13.5716802635 -C;X2;Y110;N;K0.8443279255 -C;X3;Y110;N;K0.5358267950 -C;X1;Y111;N;K13.6973439697 -C;X2;Y111;N;K0.9048270525 -C;X3;Y111;N;K0.4257792916 -C;X1;Y112;N;K13.8230076758 -C;X2;Y112;N;K0.9510565163 -C;X3;Y112;N;K0.3090169944 -C;X1;Y113;N;K13.9486713819 -C;X2;Y113;N;K0.9822872507 -C;X3;Y113;N;K0.1873813146 -C;X1;Y114;N;K14.0743350881 -C;X2;Y114;N;K0.9980267284 -C;X3;Y114;N;K0.0627905195 -C;X1;Y115;N;K14.1999987942 -C;X2;Y115;N;K0.9980267284 -C;X3;Y115;N;K-0.0627905195 -C;X1;Y116;N;K14.3256625004 -C;X2;Y116;N;K0.9822872507 -C;X3;Y116;N;K-0.1873813146 -C;X1;Y117;N;K14.4513262065 -C;X2;Y117;N;K0.9510565163 -C;X3;Y117;N;K-0.3090169944 -C;X1;Y118;N;K14.5769899127 -C;X2;Y118;N;K0.9048270525 -C;X3;Y118;N;K-0.4257792916 -C;X1;Y119;N;K14.7026536188 -C;X2;Y119;N;K0.8443279255 -C;X3;Y119;N;K-0.5358267950 -C;X1;Y120;N;K14.8283173249 -C;X2;Y120;N;K0.7705132428 -C;X3;Y120;N;K-0.6374239897 -C;X1;Y121;N;K14.9539810311 -C;X2;Y121;N;K0.6845471059 -C;X3;Y121;N;K-0.7289686274 -C;X1;Y122;N;K15.0796447372 -C;X2;Y122;N;K0.5877852523 -C;X3;Y122;N;K-0.8090169944 -C;X1;Y123;N;K15.2053084434 -C;X2;Y123;N;K0.4817536741 -C;X3;Y123;N;K-0.8763066800 -C;X1;Y124;N;K15.3309721495 -C;X2;Y124;N;K0.3681245527 -C;X3;Y124;N;K-0.9297764859 -C;X1;Y125;N;K15.4566358557 -C;X2;Y125;N;K0.2486898872 -C;X3;Y125;N;K-0.9685831611 -C;X1;Y126;N;K15.5822995618 -C;X2;Y126;N;K0.1253332336 -C;X3;Y126;N;K-0.9921147013 -C;X1;Y127;N;K15.7079632679 -C;X2;Y127;N;K-0.0000000000 -C;X3;Y127;N;K-1.0000000000 -C;X1;Y128;N;K15.8336269741 -C;X2;Y128;N;K-0.1253332336 -C;X3;Y128;N;K-0.9921147013 -C;X1;Y129;N;K15.9592906802 -C;X2;Y129;N;K-0.2486898872 -C;X3;Y129;N;K-0.9685831611 -C;X1;Y130;N;K16.0849543864 -C;X2;Y130;N;K-0.3681245527 -C;X3;Y130;N;K-0.9297764859 -C;X1;Y131;N;K16.2106180925 -C;X2;Y131;N;K-0.4817536741 -C;X3;Y131;N;K-0.8763066800 -C;X1;Y132;N;K16.3362817987 -C;X2;Y132;N;K-0.5877852523 -C;X3;Y132;N;K-0.8090169944 -C;X1;Y133;N;K16.4619455048 -C;X2;Y133;N;K-0.6845471059 -C;X3;Y133;N;K-0.7289686274 -C;X1;Y134;N;K16.5876092110 -C;X2;Y134;N;K-0.7705132428 -C;X3;Y134;N;K-0.6374239897 -C;X1;Y135;N;K16.7132729171 -C;X2;Y135;N;K-0.8443279255 -C;X3;Y135;N;K-0.5358267950 -C;X1;Y136;N;K16.8389366232 -C;X2;Y136;N;K-0.9048270525 -C;X3;Y136;N;K-0.4257792916 -C;X1;Y137;N;K16.9646003294 -C;X2;Y137;N;K-0.9510565163 -C;X3;Y137;N;K-0.3090169944 -C;X1;Y138;N;K17.0902640355 -C;X2;Y138;N;K-0.9822872507 -C;X3;Y138;N;K-0.1873813146 -C;X1;Y139;N;K17.2159277417 -C;X2;Y139;N;K-0.9980267284 -C;X3;Y139;N;K-0.0627905195 -C;X1;Y140;N;K17.3415914478 -C;X2;Y140;N;K-0.9980267284 -C;X3;Y140;N;K0.0627905195 -C;X1;Y141;N;K17.4672551540 -C;X2;Y141;N;K-0.9822872507 -C;X3;Y141;N;K0.1873813146 -C;X1;Y142;N;K17.5929188601 -C;X2;Y142;N;K-0.9510565163 -C;X3;Y142;N;K0.3090169944 -C;X1;Y143;N;K17.7185825662 -C;X2;Y143;N;K-0.9048270525 -C;X3;Y143;N;K0.4257792916 -C;X1;Y144;N;K17.8442462724 -C;X2;Y144;N;K-0.8443279255 -C;X3;Y144;N;K0.5358267950 -C;X1;Y145;N;K17.9699099785 -C;X2;Y145;N;K-0.7705132428 -C;X3;Y145;N;K0.6374239897 -C;X1;Y146;N;K18.0955736847 -C;X2;Y146;N;K-0.6845471059 -C;X3;Y146;N;K0.7289686274 -C;X1;Y147;N;K18.2212373908 -C;X2;Y147;N;K-0.5877852523 -C;X3;Y147;N;K0.8090169944 -C;X1;Y148;N;K18.3469010970 -C;X2;Y148;N;K-0.4817536741 -C;X3;Y148;N;K0.8763066800 -C;X1;Y149;N;K18.4725648031 -C;X2;Y149;N;K-0.3681245527 -C;X3;Y149;N;K0.9297764859 -C;X1;Y150;N;K18.5982285093 -C;X2;Y150;N;K-0.2486898872 -C;X3;Y150;N;K0.9685831611 -C;X1;Y151;N;K18.7238922154 -C;X2;Y151;N;K-0.1253332336 -C;X3;Y151;N;K0.9921147013 -C;X1;Y152;N;K18.8495559215 -C;X2;Y152;N;K0.0000000000 -C;X3;Y152;N;K1.0000000000 -C;X1;Y153;N;K18.9752196277 -C;X2;Y153;N;K0.1253332336 -C;X3;Y153;N;K0.9921147013 -C;X1;Y154;N;K19.1008833338 -C;X2;Y154;N;K0.2486898872 -C;X3;Y154;N;K0.9685831611 -C;X1;Y155;N;K19.2265470400 -C;X2;Y155;N;K0.3681245527 -C;X3;Y155;N;K0.9297764859 -C;X1;Y156;N;K19.3522107461 -C;X2;Y156;N;K0.4817536741 -C;X3;Y156;N;K0.8763066800 -C;X1;Y157;N;K19.4778744523 -C;X2;Y157;N;K0.5877852523 -C;X3;Y157;N;K0.8090169944 -C;X1;Y158;N;K19.6035381584 -C;X2;Y158;N;K0.6845471059 -C;X3;Y158;N;K0.7289686274 -C;X1;Y159;N;K19.7292018645 -C;X2;Y159;N;K0.7705132428 -C;X3;Y159;N;K0.6374239897 -C;X1;Y160;N;K19.8548655707 -C;X2;Y160;N;K0.8443279255 -C;X3;Y160;N;K0.5358267950 -C;X1;Y161;N;K19.9805292768 -C;X2;Y161;N;K0.9048270525 -C;X3;Y161;N;K0.4257792916 -C;X1;Y162;N;K20.1061929830 -C;X2;Y162;N;K0.9510565163 -C;X3;Y162;N;K0.3090169944 -C;X1;Y163;N;K20.2318566891 -C;X2;Y163;N;K0.9822872507 -C;X3;Y163;N;K0.1873813146 -C;X1;Y164;N;K20.3575203953 -C;X2;Y164;N;K0.9980267284 -C;X3;Y164;N;K0.0627905195 -C;X1;Y165;N;K20.4831841014 -C;X2;Y165;N;K0.9980267284 -C;X3;Y165;N;K-0.0627905195 -C;X1;Y166;N;K20.6088478075 -C;X2;Y166;N;K0.9822872507 -C;X3;Y166;N;K-0.1873813146 -C;X1;Y167;N;K20.7345115137 -C;X2;Y167;N;K0.9510565163 -C;X3;Y167;N;K-0.3090169944 -C;X1;Y168;N;K20.8601752198 -C;X2;Y168;N;K0.9048270525 -C;X3;Y168;N;K-0.4257792916 -C;X1;Y169;N;K20.9858389260 -C;X2;Y169;N;K0.8443279255 -C;X3;Y169;N;K-0.5358267950 -C;X1;Y170;N;K21.1115026321 -C;X2;Y170;N;K0.7705132428 -C;X3;Y170;N;K-0.6374239897 -C;X1;Y171;N;K21.2371663383 -C;X2;Y171;N;K0.6845471059 -C;X3;Y171;N;K-0.7289686274 -C;X1;Y172;N;K21.3628300444 -C;X2;Y172;N;K0.5877852523 -C;X3;Y172;N;K-0.8090169944 -C;X1;Y173;N;K21.4884937506 -C;X2;Y173;N;K0.4817536741 -C;X3;Y173;N;K-0.8763066800 -C;X1;Y174;N;K21.6141574567 -C;X2;Y174;N;K0.3681245527 -C;X3;Y174;N;K-0.9297764859 -C;X1;Y175;N;K21.7398211628 -C;X2;Y175;N;K0.2486898872 -C;X3;Y175;N;K-0.9685831611 -C;X1;Y176;N;K21.8654848690 -C;X2;Y176;N;K0.1253332336 -C;X3;Y176;N;K-0.9921147013 -C;X1;Y177;N;K21.9911485751 -C;X2;Y177;N;K-0.0000000000 -C;X3;Y177;N;K-1.0000000000 -C;X1;Y178;N;K22.1168122813 -C;X2;Y178;N;K-0.1253332336 -C;X3;Y178;N;K-0.9921147013 -C;X1;Y179;N;K22.2424759874 -C;X2;Y179;N;K-0.2486898872 -C;X3;Y179;N;K-0.9685831611 -C;X1;Y180;N;K22.3681396936 -C;X2;Y180;N;K-0.3681245527 -C;X3;Y180;N;K-0.9297764859 -C;X1;Y181;N;K22.4938033997 -C;X2;Y181;N;K-0.4817536741 -C;X3;Y181;N;K-0.8763066800 -C;X1;Y182;N;K22.6194671058 -C;X2;Y182;N;K-0.5877852523 -C;X3;Y182;N;K-0.8090169944 -C;X1;Y183;N;K22.7451308120 -C;X2;Y183;N;K-0.6845471059 -C;X3;Y183;N;K-0.7289686274 -C;X1;Y184;N;K22.8707945181 -C;X2;Y184;N;K-0.7705132428 -C;X3;Y184;N;K-0.6374239897 -C;X1;Y185;N;K22.9964582243 -C;X2;Y185;N;K-0.8443279255 -C;X3;Y185;N;K-0.5358267950 -C;X1;Y186;N;K23.1221219304 -C;X2;Y186;N;K-0.9048270525 -C;X3;Y186;N;K-0.4257792916 -C;X1;Y187;N;K23.2477856366 -C;X2;Y187;N;K-0.9510565163 -C;X3;Y187;N;K-0.3090169944 -C;X1;Y188;N;K23.3734493427 -C;X2;Y188;N;K-0.9822872507 -C;X3;Y188;N;K-0.1873813146 -C;X1;Y189;N;K23.4991130489 -C;X2;Y189;N;K-0.9980267284 -C;X3;Y189;N;K-0.0627905195 -C;X1;Y190;N;K23.6247767550 -C;X2;Y190;N;K-0.9980267284 -C;X3;Y190;N;K0.0627905195 -C;X1;Y191;N;K23.7504404611 -C;X2;Y191;N;K-0.9822872507 -C;X3;Y191;N;K0.1873813146 -C;X1;Y192;N;K23.8761041673 -C;X2;Y192;N;K-0.9510565163 -C;X3;Y192;N;K0.3090169944 -C;X1;Y193;N;K24.0017678734 -C;X2;Y193;N;K-0.9048270525 -C;X3;Y193;N;K0.4257792916 -C;X1;Y194;N;K24.1274315796 -C;X2;Y194;N;K-0.8443279255 -C;X3;Y194;N;K0.5358267950 -C;X1;Y195;N;K24.2530952857 -C;X2;Y195;N;K-0.7705132428 -C;X3;Y195;N;K0.6374239897 -C;X1;Y196;N;K24.3787589919 -C;X2;Y196;N;K-0.6845471059 -C;X3;Y196;N;K0.7289686274 -C;X1;Y197;N;K24.5044226980 -C;X2;Y197;N;K-0.5877852523 -C;X3;Y197;N;K0.8090169944 -C;X1;Y198;N;K24.6300864041 -C;X2;Y198;N;K-0.4817536741 -C;X3;Y198;N;K0.8763066800 -C;X1;Y199;N;K24.7557501103 -C;X2;Y199;N;K-0.3681245527 -C;X3;Y199;N;K0.9297764859 -C;X1;Y200;N;K24.8814138164 -C;X2;Y200;N;K-0.2486898872 -C;X3;Y200;N;K0.9685831611 -C;X1;Y201;N;K25.0070775226 -C;X2;Y201;N;K-0.1253332336 -C;X3;Y201;N;K0.9921147013 -E - +ID;P +C;Y1;X1;K"x1" +F;Y1;X1;SDB +C;Y1;X2;K"y11" +F;Y1;X2;SDB +C;Y1;X3;K"y12" +F;Y1;X3;SDB +C;X1;Y2;N;K0.0000000000 +C;X2;Y2;N;K0.0000000000 +C;X3;Y2;N;K1.0000000000 +C;X1;Y3;N;K0.1256637061 +C;X2;Y3;N;K0.1253332336 +C;X3;Y3;N;K0.9921147013 +C;X1;Y4;N;K0.2513274123 +C;X2;Y4;N;K0.2486898872 +C;X3;Y4;N;K0.9685831611 +C;X1;Y5;N;K0.3769911184 +C;X2;Y5;N;K0.3681245527 +C;X3;Y5;N;K0.9297764859 +C;X1;Y6;N;K0.5026548246 +C;X2;Y6;N;K0.4817536741 +C;X3;Y6;N;K0.8763066800 +C;X1;Y7;N;K0.6283185307 +C;X2;Y7;N;K0.5877852523 +C;X3;Y7;N;K0.8090169944 +C;X1;Y8;N;K0.7539822369 +C;X2;Y8;N;K0.6845471059 +C;X3;Y8;N;K0.7289686274 +C;X1;Y9;N;K0.8796459430 +C;X2;Y9;N;K0.7705132428 +C;X3;Y9;N;K0.6374239897 +C;X1;Y10;N;K1.0053096491 +C;X2;Y10;N;K0.8443279255 +C;X3;Y10;N;K0.5358267950 +C;X1;Y11;N;K1.1309733553 +C;X2;Y11;N;K0.9048270525 +C;X3;Y11;N;K0.4257792916 +C;X1;Y12;N;K1.2566370614 +C;X2;Y12;N;K0.9510565163 +C;X3;Y12;N;K0.3090169944 +C;X1;Y13;N;K1.3823007676 +C;X2;Y13;N;K0.9822872507 +C;X3;Y13;N;K0.1873813146 +C;X1;Y14;N;K1.5079644737 +C;X2;Y14;N;K0.9980267284 +C;X3;Y14;N;K0.0627905195 +C;X1;Y15;N;K1.6336281799 +C;X2;Y15;N;K0.9980267284 +C;X3;Y15;N;K-0.0627905195 +C;X1;Y16;N;K1.7592918860 +C;X2;Y16;N;K0.9822872507 +C;X3;Y16;N;K-0.1873813146 +C;X1;Y17;N;K1.8849555922 +C;X2;Y17;N;K0.9510565163 +C;X3;Y17;N;K-0.3090169944 +C;X1;Y18;N;K2.0106192983 +C;X2;Y18;N;K0.9048270525 +C;X3;Y18;N;K-0.4257792916 +C;X1;Y19;N;K2.1362830044 +C;X2;Y19;N;K0.8443279255 +C;X3;Y19;N;K-0.5358267950 +C;X1;Y20;N;K2.2619467106 +C;X2;Y20;N;K0.7705132428 +C;X3;Y20;N;K-0.6374239897 +C;X1;Y21;N;K2.3876104167 +C;X2;Y21;N;K0.6845471059 +C;X3;Y21;N;K-0.7289686274 +C;X1;Y22;N;K2.5132741229 +C;X2;Y22;N;K0.5877852523 +C;X3;Y22;N;K-0.8090169944 +C;X1;Y23;N;K2.6389378290 +C;X2;Y23;N;K0.4817536741 +C;X3;Y23;N;K-0.8763066800 +C;X1;Y24;N;K2.7646015352 +C;X2;Y24;N;K0.3681245527 +C;X3;Y24;N;K-0.9297764859 +C;X1;Y25;N;K2.8902652413 +C;X2;Y25;N;K0.2486898872 +C;X3;Y25;N;K-0.9685831611 +C;X1;Y26;N;K3.0159289474 +C;X2;Y26;N;K0.1253332336 +C;X3;Y26;N;K-0.9921147013 +C;X1;Y27;N;K3.1415926536 +C;X2;Y27;N;K-0.0000000000 +C;X3;Y27;N;K-1.0000000000 +C;X1;Y28;N;K3.2672563597 +C;X2;Y28;N;K-0.1253332336 +C;X3;Y28;N;K-0.9921147013 +C;X1;Y29;N;K3.3929200659 +C;X2;Y29;N;K-0.2486898872 +C;X3;Y29;N;K-0.9685831611 +C;X1;Y30;N;K3.5185837720 +C;X2;Y30;N;K-0.3681245527 +C;X3;Y30;N;K-0.9297764859 +C;X1;Y31;N;K3.6442474782 +C;X2;Y31;N;K-0.4817536741 +C;X3;Y31;N;K-0.8763066800 +C;X1;Y32;N;K3.7699111843 +C;X2;Y32;N;K-0.5877852523 +C;X3;Y32;N;K-0.8090169944 +C;X1;Y33;N;K3.8955748905 +C;X2;Y33;N;K-0.6845471059 +C;X3;Y33;N;K-0.7289686274 +C;X1;Y34;N;K4.0212385966 +C;X2;Y34;N;K-0.7705132428 +C;X3;Y34;N;K-0.6374239897 +C;X1;Y35;N;K4.1469023027 +C;X2;Y35;N;K-0.8443279255 +C;X3;Y35;N;K-0.5358267950 +C;X1;Y36;N;K4.2725660089 +C;X2;Y36;N;K-0.9048270525 +C;X3;Y36;N;K-0.4257792916 +C;X1;Y37;N;K4.3982297150 +C;X2;Y37;N;K-0.9510565163 +C;X3;Y37;N;K-0.3090169944 +C;X1;Y38;N;K4.5238934212 +C;X2;Y38;N;K-0.9822872507 +C;X3;Y38;N;K-0.1873813146 +C;X1;Y39;N;K4.6495571273 +C;X2;Y39;N;K-0.9980267284 +C;X3;Y39;N;K-0.0627905195 +C;X1;Y40;N;K4.7752208335 +C;X2;Y40;N;K-0.9980267284 +C;X3;Y40;N;K0.0627905195 +C;X1;Y41;N;K4.9008845396 +C;X2;Y41;N;K-0.9822872507 +C;X3;Y41;N;K0.1873813146 +C;X1;Y42;N;K5.0265482457 +C;X2;Y42;N;K-0.9510565163 +C;X3;Y42;N;K0.3090169944 +C;X1;Y43;N;K5.1522119519 +C;X2;Y43;N;K-0.9048270525 +C;X3;Y43;N;K0.4257792916 +C;X1;Y44;N;K5.2778756580 +C;X2;Y44;N;K-0.8443279255 +C;X3;Y44;N;K0.5358267950 +C;X1;Y45;N;K5.4035393642 +C;X2;Y45;N;K-0.7705132428 +C;X3;Y45;N;K0.6374239897 +C;X1;Y46;N;K5.5292030703 +C;X2;Y46;N;K-0.6845471059 +C;X3;Y46;N;K0.7289686274 +C;X1;Y47;N;K5.6548667765 +C;X2;Y47;N;K-0.5877852523 +C;X3;Y47;N;K0.8090169944 +C;X1;Y48;N;K5.7805304826 +C;X2;Y48;N;K-0.4817536741 +C;X3;Y48;N;K0.8763066800 +C;X1;Y49;N;K5.9061941887 +C;X2;Y49;N;K-0.3681245527 +C;X3;Y49;N;K0.9297764859 +C;X1;Y50;N;K6.0318578949 +C;X2;Y50;N;K-0.2486898872 +C;X3;Y50;N;K0.9685831611 +C;X1;Y51;N;K6.1575216010 +C;X2;Y51;N;K-0.1253332336 +C;X3;Y51;N;K0.9921147013 +C;X1;Y52;N;K6.2831853072 +C;X2;Y52;N;K0.0000000000 +C;X3;Y52;N;K1.0000000000 +C;X1;Y53;N;K6.4088490133 +C;X2;Y53;N;K0.1253332336 +C;X3;Y53;N;K0.9921147013 +C;X1;Y54;N;K6.5345127195 +C;X2;Y54;N;K0.2486898872 +C;X3;Y54;N;K0.9685831611 +C;X1;Y55;N;K6.6601764256 +C;X2;Y55;N;K0.3681245527 +C;X3;Y55;N;K0.9297764859 +C;X1;Y56;N;K6.7858401318 +C;X2;Y56;N;K0.4817536741 +C;X3;Y56;N;K0.8763066800 +C;X1;Y57;N;K6.9115038379 +C;X2;Y57;N;K0.5877852523 +C;X3;Y57;N;K0.8090169944 +C;X1;Y58;N;K7.0371675440 +C;X2;Y58;N;K0.6845471059 +C;X3;Y58;N;K0.7289686274 +C;X1;Y59;N;K7.1628312502 +C;X2;Y59;N;K0.7705132428 +C;X3;Y59;N;K0.6374239897 +C;X1;Y60;N;K7.2884949563 +C;X2;Y60;N;K0.8443279255 +C;X3;Y60;N;K0.5358267950 +C;X1;Y61;N;K7.4141586625 +C;X2;Y61;N;K0.9048270525 +C;X3;Y61;N;K0.4257792916 +C;X1;Y62;N;K7.5398223686 +C;X2;Y62;N;K0.9510565163 +C;X3;Y62;N;K0.3090169944 +C;X1;Y63;N;K7.6654860748 +C;X2;Y63;N;K0.9822872507 +C;X3;Y63;N;K0.1873813146 +C;X1;Y64;N;K7.7911497809 +C;X2;Y64;N;K0.9980267284 +C;X3;Y64;N;K0.0627905195 +C;X1;Y65;N;K7.9168134870 +C;X2;Y65;N;K0.9980267284 +C;X3;Y65;N;K-0.0627905195 +C;X1;Y66;N;K8.0424771932 +C;X2;Y66;N;K0.9822872507 +C;X3;Y66;N;K-0.1873813146 +C;X1;Y67;N;K8.1681408993 +C;X2;Y67;N;K0.9510565163 +C;X3;Y67;N;K-0.3090169944 +C;X1;Y68;N;K8.2938046055 +C;X2;Y68;N;K0.9048270525 +C;X3;Y68;N;K-0.4257792916 +C;X1;Y69;N;K8.4194683116 +C;X2;Y69;N;K0.8443279255 +C;X3;Y69;N;K-0.5358267950 +C;X1;Y70;N;K8.5451320178 +C;X2;Y70;N;K0.7705132428 +C;X3;Y70;N;K-0.6374239897 +C;X1;Y71;N;K8.6707957239 +C;X2;Y71;N;K0.6845471059 +C;X3;Y71;N;K-0.7289686274 +C;X1;Y72;N;K8.7964594301 +C;X2;Y72;N;K0.5877852523 +C;X3;Y72;N;K-0.8090169944 +C;X1;Y73;N;K8.9221231362 +C;X2;Y73;N;K0.4817536741 +C;X3;Y73;N;K-0.8763066800 +C;X1;Y74;N;K9.0477868423 +C;X2;Y74;N;K0.3681245527 +C;X3;Y74;N;K-0.9297764859 +C;X1;Y75;N;K9.1734505485 +C;X2;Y75;N;K0.2486898872 +C;X3;Y75;N;K-0.9685831611 +C;X1;Y76;N;K9.2991142546 +C;X2;Y76;N;K0.1253332336 +C;X3;Y76;N;K-0.9921147013 +C;X1;Y77;N;K9.4247779608 +C;X2;Y77;N;K-0.0000000000 +C;X3;Y77;N;K-1.0000000000 +C;X1;Y78;N;K9.5504416669 +C;X2;Y78;N;K-0.1253332336 +C;X3;Y78;N;K-0.9921147013 +C;X1;Y79;N;K9.6761053731 +C;X2;Y79;N;K-0.2486898872 +C;X3;Y79;N;K-0.9685831611 +C;X1;Y80;N;K9.8017690792 +C;X2;Y80;N;K-0.3681245527 +C;X3;Y80;N;K-0.9297764859 +C;X1;Y81;N;K9.9274327853 +C;X2;Y81;N;K-0.4817536741 +C;X3;Y81;N;K-0.8763066800 +C;X1;Y82;N;K10.0530964915 +C;X2;Y82;N;K-0.5877852523 +C;X3;Y82;N;K-0.8090169944 +C;X1;Y83;N;K10.1787601976 +C;X2;Y83;N;K-0.6845471059 +C;X3;Y83;N;K-0.7289686274 +C;X1;Y84;N;K10.3044239038 +C;X2;Y84;N;K-0.7705132428 +C;X3;Y84;N;K-0.6374239897 +C;X1;Y85;N;K10.4300876099 +C;X2;Y85;N;K-0.8443279255 +C;X3;Y85;N;K-0.5358267950 +C;X1;Y86;N;K10.5557513161 +C;X2;Y86;N;K-0.9048270525 +C;X3;Y86;N;K-0.4257792916 +C;X1;Y87;N;K10.6814150222 +C;X2;Y87;N;K-0.9510565163 +C;X3;Y87;N;K-0.3090169944 +C;X1;Y88;N;K10.8070787283 +C;X2;Y88;N;K-0.9822872507 +C;X3;Y88;N;K-0.1873813146 +C;X1;Y89;N;K10.9327424345 +C;X2;Y89;N;K-0.9980267284 +C;X3;Y89;N;K-0.0627905195 +C;X1;Y90;N;K11.0584061406 +C;X2;Y90;N;K-0.9980267284 +C;X3;Y90;N;K0.0627905195 +C;X1;Y91;N;K11.1840698468 +C;X2;Y91;N;K-0.9822872507 +C;X3;Y91;N;K0.1873813146 +C;X1;Y92;N;K11.3097335529 +C;X2;Y92;N;K-0.9510565163 +C;X3;Y92;N;K0.3090169944 +C;X1;Y93;N;K11.4353972591 +C;X2;Y93;N;K-0.9048270525 +C;X3;Y93;N;K0.4257792916 +C;X1;Y94;N;K11.5610609652 +C;X2;Y94;N;K-0.8443279255 +C;X3;Y94;N;K0.5358267950 +C;X1;Y95;N;K11.6867246714 +C;X2;Y95;N;K-0.7705132428 +C;X3;Y95;N;K0.6374239897 +C;X1;Y96;N;K11.8123883775 +C;X2;Y96;N;K-0.6845471059 +C;X3;Y96;N;K0.7289686274 +C;X1;Y97;N;K11.9380520836 +C;X2;Y97;N;K-0.5877852523 +C;X3;Y97;N;K0.8090169944 +C;X1;Y98;N;K12.0637157898 +C;X2;Y98;N;K-0.4817536741 +C;X3;Y98;N;K0.8763066800 +C;X1;Y99;N;K12.1893794959 +C;X2;Y99;N;K-0.3681245527 +C;X3;Y99;N;K0.9297764859 +C;X1;Y100;N;K12.3150432021 +C;X2;Y100;N;K-0.2486898872 +C;X3;Y100;N;K0.9685831611 +C;X1;Y101;N;K12.4407069082 +C;X2;Y101;N;K-0.1253332336 +C;X3;Y101;N;K0.9921147013 +C;X1;Y102;N;K12.5663706144 +C;X2;Y102;N;K0.0000000000 +C;X3;Y102;N;K1.0000000000 +C;X1;Y103;N;K12.6920343205 +C;X2;Y103;N;K0.1253332336 +C;X3;Y103;N;K0.9921147013 +C;X1;Y104;N;K12.8176980266 +C;X2;Y104;N;K0.2486898872 +C;X3;Y104;N;K0.9685831611 +C;X1;Y105;N;K12.9433617328 +C;X2;Y105;N;K0.3681245527 +C;X3;Y105;N;K0.9297764859 +C;X1;Y106;N;K13.0690254389 +C;X2;Y106;N;K0.4817536741 +C;X3;Y106;N;K0.8763066800 +C;X1;Y107;N;K13.1946891451 +C;X2;Y107;N;K0.5877852523 +C;X3;Y107;N;K0.8090169944 +C;X1;Y108;N;K13.3203528512 +C;X2;Y108;N;K0.6845471059 +C;X3;Y108;N;K0.7289686274 +C;X1;Y109;N;K13.4460165574 +C;X2;Y109;N;K0.7705132428 +C;X3;Y109;N;K0.6374239897 +C;X1;Y110;N;K13.5716802635 +C;X2;Y110;N;K0.8443279255 +C;X3;Y110;N;K0.5358267950 +C;X1;Y111;N;K13.6973439697 +C;X2;Y111;N;K0.9048270525 +C;X3;Y111;N;K0.4257792916 +C;X1;Y112;N;K13.8230076758 +C;X2;Y112;N;K0.9510565163 +C;X3;Y112;N;K0.3090169944 +C;X1;Y113;N;K13.9486713819 +C;X2;Y113;N;K0.9822872507 +C;X3;Y113;N;K0.1873813146 +C;X1;Y114;N;K14.0743350881 +C;X2;Y114;N;K0.9980267284 +C;X3;Y114;N;K0.0627905195 +C;X1;Y115;N;K14.1999987942 +C;X2;Y115;N;K0.9980267284 +C;X3;Y115;N;K-0.0627905195 +C;X1;Y116;N;K14.3256625004 +C;X2;Y116;N;K0.9822872507 +C;X3;Y116;N;K-0.1873813146 +C;X1;Y117;N;K14.4513262065 +C;X2;Y117;N;K0.9510565163 +C;X3;Y117;N;K-0.3090169944 +C;X1;Y118;N;K14.5769899127 +C;X2;Y118;N;K0.9048270525 +C;X3;Y118;N;K-0.4257792916 +C;X1;Y119;N;K14.7026536188 +C;X2;Y119;N;K0.8443279255 +C;X3;Y119;N;K-0.5358267950 +C;X1;Y120;N;K14.8283173249 +C;X2;Y120;N;K0.7705132428 +C;X3;Y120;N;K-0.6374239897 +C;X1;Y121;N;K14.9539810311 +C;X2;Y121;N;K0.6845471059 +C;X3;Y121;N;K-0.7289686274 +C;X1;Y122;N;K15.0796447372 +C;X2;Y122;N;K0.5877852523 +C;X3;Y122;N;K-0.8090169944 +C;X1;Y123;N;K15.2053084434 +C;X2;Y123;N;K0.4817536741 +C;X3;Y123;N;K-0.8763066800 +C;X1;Y124;N;K15.3309721495 +C;X2;Y124;N;K0.3681245527 +C;X3;Y124;N;K-0.9297764859 +C;X1;Y125;N;K15.4566358557 +C;X2;Y125;N;K0.2486898872 +C;X3;Y125;N;K-0.9685831611 +C;X1;Y126;N;K15.5822995618 +C;X2;Y126;N;K0.1253332336 +C;X3;Y126;N;K-0.9921147013 +C;X1;Y127;N;K15.7079632679 +C;X2;Y127;N;K-0.0000000000 +C;X3;Y127;N;K-1.0000000000 +C;X1;Y128;N;K15.8336269741 +C;X2;Y128;N;K-0.1253332336 +C;X3;Y128;N;K-0.9921147013 +C;X1;Y129;N;K15.9592906802 +C;X2;Y129;N;K-0.2486898872 +C;X3;Y129;N;K-0.9685831611 +C;X1;Y130;N;K16.0849543864 +C;X2;Y130;N;K-0.3681245527 +C;X3;Y130;N;K-0.9297764859 +C;X1;Y131;N;K16.2106180925 +C;X2;Y131;N;K-0.4817536741 +C;X3;Y131;N;K-0.8763066800 +C;X1;Y132;N;K16.3362817987 +C;X2;Y132;N;K-0.5877852523 +C;X3;Y132;N;K-0.8090169944 +C;X1;Y133;N;K16.4619455048 +C;X2;Y133;N;K-0.6845471059 +C;X3;Y133;N;K-0.7289686274 +C;X1;Y134;N;K16.5876092110 +C;X2;Y134;N;K-0.7705132428 +C;X3;Y134;N;K-0.6374239897 +C;X1;Y135;N;K16.7132729171 +C;X2;Y135;N;K-0.8443279255 +C;X3;Y135;N;K-0.5358267950 +C;X1;Y136;N;K16.8389366232 +C;X2;Y136;N;K-0.9048270525 +C;X3;Y136;N;K-0.4257792916 +C;X1;Y137;N;K16.9646003294 +C;X2;Y137;N;K-0.9510565163 +C;X3;Y137;N;K-0.3090169944 +C;X1;Y138;N;K17.0902640355 +C;X2;Y138;N;K-0.9822872507 +C;X3;Y138;N;K-0.1873813146 +C;X1;Y139;N;K17.2159277417 +C;X2;Y139;N;K-0.9980267284 +C;X3;Y139;N;K-0.0627905195 +C;X1;Y140;N;K17.3415914478 +C;X2;Y140;N;K-0.9980267284 +C;X3;Y140;N;K0.0627905195 +C;X1;Y141;N;K17.4672551540 +C;X2;Y141;N;K-0.9822872507 +C;X3;Y141;N;K0.1873813146 +C;X1;Y142;N;K17.5929188601 +C;X2;Y142;N;K-0.9510565163 +C;X3;Y142;N;K0.3090169944 +C;X1;Y143;N;K17.7185825662 +C;X2;Y143;N;K-0.9048270525 +C;X3;Y143;N;K0.4257792916 +C;X1;Y144;N;K17.8442462724 +C;X2;Y144;N;K-0.8443279255 +C;X3;Y144;N;K0.5358267950 +C;X1;Y145;N;K17.9699099785 +C;X2;Y145;N;K-0.7705132428 +C;X3;Y145;N;K0.6374239897 +C;X1;Y146;N;K18.0955736847 +C;X2;Y146;N;K-0.6845471059 +C;X3;Y146;N;K0.7289686274 +C;X1;Y147;N;K18.2212373908 +C;X2;Y147;N;K-0.5877852523 +C;X3;Y147;N;K0.8090169944 +C;X1;Y148;N;K18.3469010970 +C;X2;Y148;N;K-0.4817536741 +C;X3;Y148;N;K0.8763066800 +C;X1;Y149;N;K18.4725648031 +C;X2;Y149;N;K-0.3681245527 +C;X3;Y149;N;K0.9297764859 +C;X1;Y150;N;K18.5982285093 +C;X2;Y150;N;K-0.2486898872 +C;X3;Y150;N;K0.9685831611 +C;X1;Y151;N;K18.7238922154 +C;X2;Y151;N;K-0.1253332336 +C;X3;Y151;N;K0.9921147013 +C;X1;Y152;N;K18.8495559215 +C;X2;Y152;N;K0.0000000000 +C;X3;Y152;N;K1.0000000000 +C;X1;Y153;N;K18.9752196277 +C;X2;Y153;N;K0.1253332336 +C;X3;Y153;N;K0.9921147013 +C;X1;Y154;N;K19.1008833338 +C;X2;Y154;N;K0.2486898872 +C;X3;Y154;N;K0.9685831611 +C;X1;Y155;N;K19.2265470400 +C;X2;Y155;N;K0.3681245527 +C;X3;Y155;N;K0.9297764859 +C;X1;Y156;N;K19.3522107461 +C;X2;Y156;N;K0.4817536741 +C;X3;Y156;N;K0.8763066800 +C;X1;Y157;N;K19.4778744523 +C;X2;Y157;N;K0.5877852523 +C;X3;Y157;N;K0.8090169944 +C;X1;Y158;N;K19.6035381584 +C;X2;Y158;N;K0.6845471059 +C;X3;Y158;N;K0.7289686274 +C;X1;Y159;N;K19.7292018645 +C;X2;Y159;N;K0.7705132428 +C;X3;Y159;N;K0.6374239897 +C;X1;Y160;N;K19.8548655707 +C;X2;Y160;N;K0.8443279255 +C;X3;Y160;N;K0.5358267950 +C;X1;Y161;N;K19.9805292768 +C;X2;Y161;N;K0.9048270525 +C;X3;Y161;N;K0.4257792916 +C;X1;Y162;N;K20.1061929830 +C;X2;Y162;N;K0.9510565163 +C;X3;Y162;N;K0.3090169944 +C;X1;Y163;N;K20.2318566891 +C;X2;Y163;N;K0.9822872507 +C;X3;Y163;N;K0.1873813146 +C;X1;Y164;N;K20.3575203953 +C;X2;Y164;N;K0.9980267284 +C;X3;Y164;N;K0.0627905195 +C;X1;Y165;N;K20.4831841014 +C;X2;Y165;N;K0.9980267284 +C;X3;Y165;N;K-0.0627905195 +C;X1;Y166;N;K20.6088478075 +C;X2;Y166;N;K0.9822872507 +C;X3;Y166;N;K-0.1873813146 +C;X1;Y167;N;K20.7345115137 +C;X2;Y167;N;K0.9510565163 +C;X3;Y167;N;K-0.3090169944 +C;X1;Y168;N;K20.8601752198 +C;X2;Y168;N;K0.9048270525 +C;X3;Y168;N;K-0.4257792916 +C;X1;Y169;N;K20.9858389260 +C;X2;Y169;N;K0.8443279255 +C;X3;Y169;N;K-0.5358267950 +C;X1;Y170;N;K21.1115026321 +C;X2;Y170;N;K0.7705132428 +C;X3;Y170;N;K-0.6374239897 +C;X1;Y171;N;K21.2371663383 +C;X2;Y171;N;K0.6845471059 +C;X3;Y171;N;K-0.7289686274 +C;X1;Y172;N;K21.3628300444 +C;X2;Y172;N;K0.5877852523 +C;X3;Y172;N;K-0.8090169944 +C;X1;Y173;N;K21.4884937506 +C;X2;Y173;N;K0.4817536741 +C;X3;Y173;N;K-0.8763066800 +C;X1;Y174;N;K21.6141574567 +C;X2;Y174;N;K0.3681245527 +C;X3;Y174;N;K-0.9297764859 +C;X1;Y175;N;K21.7398211628 +C;X2;Y175;N;K0.2486898872 +C;X3;Y175;N;K-0.9685831611 +C;X1;Y176;N;K21.8654848690 +C;X2;Y176;N;K0.1253332336 +C;X3;Y176;N;K-0.9921147013 +C;X1;Y177;N;K21.9911485751 +C;X2;Y177;N;K-0.0000000000 +C;X3;Y177;N;K-1.0000000000 +C;X1;Y178;N;K22.1168122813 +C;X2;Y178;N;K-0.1253332336 +C;X3;Y178;N;K-0.9921147013 +C;X1;Y179;N;K22.2424759874 +C;X2;Y179;N;K-0.2486898872 +C;X3;Y179;N;K-0.9685831611 +C;X1;Y180;N;K22.3681396936 +C;X2;Y180;N;K-0.3681245527 +C;X3;Y180;N;K-0.9297764859 +C;X1;Y181;N;K22.4938033997 +C;X2;Y181;N;K-0.4817536741 +C;X3;Y181;N;K-0.8763066800 +C;X1;Y182;N;K22.6194671058 +C;X2;Y182;N;K-0.5877852523 +C;X3;Y182;N;K-0.8090169944 +C;X1;Y183;N;K22.7451308120 +C;X2;Y183;N;K-0.6845471059 +C;X3;Y183;N;K-0.7289686274 +C;X1;Y184;N;K22.8707945181 +C;X2;Y184;N;K-0.7705132428 +C;X3;Y184;N;K-0.6374239897 +C;X1;Y185;N;K22.9964582243 +C;X2;Y185;N;K-0.8443279255 +C;X3;Y185;N;K-0.5358267950 +C;X1;Y186;N;K23.1221219304 +C;X2;Y186;N;K-0.9048270525 +C;X3;Y186;N;K-0.4257792916 +C;X1;Y187;N;K23.2477856366 +C;X2;Y187;N;K-0.9510565163 +C;X3;Y187;N;K-0.3090169944 +C;X1;Y188;N;K23.3734493427 +C;X2;Y188;N;K-0.9822872507 +C;X3;Y188;N;K-0.1873813146 +C;X1;Y189;N;K23.4991130489 +C;X2;Y189;N;K-0.9980267284 +C;X3;Y189;N;K-0.0627905195 +C;X1;Y190;N;K23.6247767550 +C;X2;Y190;N;K-0.9980267284 +C;X3;Y190;N;K0.0627905195 +C;X1;Y191;N;K23.7504404611 +C;X2;Y191;N;K-0.9822872507 +C;X3;Y191;N;K0.1873813146 +C;X1;Y192;N;K23.8761041673 +C;X2;Y192;N;K-0.9510565163 +C;X3;Y192;N;K0.3090169944 +C;X1;Y193;N;K24.0017678734 +C;X2;Y193;N;K-0.9048270525 +C;X3;Y193;N;K0.4257792916 +C;X1;Y194;N;K24.1274315796 +C;X2;Y194;N;K-0.8443279255 +C;X3;Y194;N;K0.5358267950 +C;X1;Y195;N;K24.2530952857 +C;X2;Y195;N;K-0.7705132428 +C;X3;Y195;N;K0.6374239897 +C;X1;Y196;N;K24.3787589919 +C;X2;Y196;N;K-0.6845471059 +C;X3;Y196;N;K0.7289686274 +C;X1;Y197;N;K24.5044226980 +C;X2;Y197;N;K-0.5877852523 +C;X3;Y197;N;K0.8090169944 +C;X1;Y198;N;K24.6300864041 +C;X2;Y198;N;K-0.4817536741 +C;X3;Y198;N;K0.8763066800 +C;X1;Y199;N;K24.7557501103 +C;X2;Y199;N;K-0.3681245527 +C;X3;Y199;N;K0.9297764859 +C;X1;Y200;N;K24.8814138164 +C;X2;Y200;N;K-0.2486898872 +C;X3;Y200;N;K0.9685831611 +C;X1;Y201;N;K25.0070775226 +C;X2;Y201;N;K-0.1253332336 +C;X3;Y201;N;K0.9921147013 +E + diff --git a/test/jkqtplot_test/test.svg b/examples/jkqtplot_test/test.svg similarity index 97% rename from test/jkqtplot_test/test.svg rename to examples/jkqtplot_test/test.svg index c8df16636b..cf00ac3a3c 100644 --- a/test/jkqtplot_test/test.svg +++ b/examples/jkqtplot_test/test.svg @@ -1,17779 +1,17779 @@ - - -Qt Svg Document -Generated with Qt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - -25 - - - - - - - - - - - - - - - - -50 - - - - - - - - - - - - - - - - -75 - - - - - - - - - - - - - - - - -100 - - - - - - - - - - - - - - - - -125 - - - - - - - - - - - - - - - - -150 - - - - - - - - - - - - - - - - -175 - - - - - - - - - - - - - - - - -200 - - - - - - - - - - - - - - - - -225 - - - - - - - - - - - - - - - - -250 - - - - - - - - - - - - - - - - -275 - - - - - - - - - - - - - - - - -300 - - - - - - - - - - - - - - - - -325 - - - -x - - - - - - - -axis - - - -with - - - -greek - - - -letters - - - - - - - - - - - - -α - - - -· - - - -β - - - - - - - - - - - - - - - - - - - - - - - - - --15 - - - - - - - - - - - - - - - - --13 - - - - - - - - - - - - - - - - --10 - - - - - - - - - - - - - - - - --8 - - - - - - - - - - - - - - - - --5 - - - - - - - - - - - - - - - - --3 - - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - -3 - - - - - - - - - - - - - - - - -5 - - - - - - - - - - - - - - - - -8 - - - - - - - - - - - - - - - - -10 - - - - - - - - - - - - - - - - -13 - - - - - - - - - - - - - - - - -15 - - - - - - - - - - - - - - - - -18 - - - - - - - - - - - - - - - - -20 - - - - - - -y - - - --axis - - - -label - - - -f - - - -( - - - -x - - - -) - - - -= - - - -sin - - - - - - -( - - - - - - -x - - - -2 - - - - - - -) - - - - - - - - - - -[unit] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -function - - - - - - - - - - - - - -function - - - - - - - - - - - - - - - + + +Qt Svg Document +Generated with Qt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 + + + + + + + + + + + + + + + + +25 + + + + + + + + + + + + + + + + +50 + + + + + + + + + + + + + + + + +75 + + + + + + + + + + + + + + + + +100 + + + + + + + + + + + + + + + + +125 + + + + + + + + + + + + + + + + +150 + + + + + + + + + + + + + + + + +175 + + + + + + + + + + + + + + + + +200 + + + + + + + + + + + + + + + + +225 + + + + + + + + + + + + + + + + +250 + + + + + + + + + + + + + + + + +275 + + + + + + + + + + + + + + + + +300 + + + + + + + + + + + + + + + + +325 + + + +x + + + + + + + +axis + + + +with + + + +greek + + + +letters + + + + + + + + + + + + +α + + + +· + + + +β + + + + + + + + + + + + + + + + + + + + + + + + + +-15 + + + + + + + + + + + + + + + + +-13 + + + + + + + + + + + + + + + + +-10 + + + + + + + + + + + + + + + + +-8 + + + + + + + + + + + + + + + + +-5 + + + + + + + + + + + + + + + + +-3 + + + + + + + + + + + + + + + + +0 + + + + + + + + + + + + + + + + +3 + + + + + + + + + + + + + + + + +5 + + + + + + + + + + + + + + + + +8 + + + + + + + + + + + + + + + + +10 + + + + + + + + + + + + + + + + +13 + + + + + + + + + + + + + + + + +15 + + + + + + + + + + + + + + + + +18 + + + + + + + + + + + + + + + + +20 + + + + + + +y + + + +-axis + + + +label + + + +f + + + +( + + + +x + + + +) + + + += + + + +sin + + + + + + +( + + + + + + +x + + + +2 + + + + + + +) + + + + + + + + + + +[unit] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +function + + + + + + + + + + + + + +function + + + + + + + + + + + + + + + diff --git a/test/jkqtplot_test/test.tab.txt b/examples/jkqtplot_test/test.tab.txt similarity index 97% rename from test/jkqtplot_test/test.tab.txt rename to examples/jkqtplot_test/test.tab.txt index 86d94c72ac..937faedbd9 100644 --- a/test/jkqtplot_test/test.tab.txt +++ b/examples/jkqtplot_test/test.tab.txt @@ -1,202 +1,202 @@ -# x1 y11 y12 -0.0000000000 0.0000000000 1.0000000000 -0.1256637061 0.1253332336 0.9921147013 -0.2513274123 0.2486898872 0.9685831611 -0.3769911184 0.3681245527 0.9297764859 -0.5026548246 0.4817536741 0.8763066800 -0.6283185307 0.5877852523 0.8090169944 -0.7539822369 0.6845471059 0.7289686274 -0.8796459430 0.7705132428 0.6374239897 -1.0053096491 0.8443279255 0.5358267950 -1.1309733553 0.9048270525 0.4257792916 -1.2566370614 0.9510565163 0.3090169944 -1.3823007676 0.9822872507 0.1873813146 -1.5079644737 0.9980267284 0.0627905195 -1.6336281799 0.9980267284 -0.0627905195 -1.7592918860 0.9822872507 -0.1873813146 -1.8849555922 0.9510565163 -0.3090169944 -2.0106192983 0.9048270525 -0.4257792916 -2.1362830044 0.8443279255 -0.5358267950 -2.2619467106 0.7705132428 -0.6374239897 -2.3876104167 0.6845471059 -0.7289686274 -2.5132741229 0.5877852523 -0.8090169944 -2.6389378290 0.4817536741 -0.8763066800 -2.7646015352 0.3681245527 -0.9297764859 -2.8902652413 0.2486898872 -0.9685831611 -3.0159289474 0.1253332336 -0.9921147013 -3.1415926536 -0.0000000000 -1.0000000000 -3.2672563597 -0.1253332336 -0.9921147013 -3.3929200659 -0.2486898872 -0.9685831611 -3.5185837720 -0.3681245527 -0.9297764859 -3.6442474782 -0.4817536741 -0.8763066800 -3.7699111843 -0.5877852523 -0.8090169944 -3.8955748905 -0.6845471059 -0.7289686274 -4.0212385966 -0.7705132428 -0.6374239897 -4.1469023027 -0.8443279255 -0.5358267950 -4.2725660089 -0.9048270525 -0.4257792916 -4.3982297150 -0.9510565163 -0.3090169944 -4.5238934212 -0.9822872507 -0.1873813146 -4.6495571273 -0.9980267284 -0.0627905195 -4.7752208335 -0.9980267284 0.0627905195 -4.9008845396 -0.9822872507 0.1873813146 -5.0265482457 -0.9510565163 0.3090169944 -5.1522119519 -0.9048270525 0.4257792916 -5.2778756580 -0.8443279255 0.5358267950 -5.4035393642 -0.7705132428 0.6374239897 -5.5292030703 -0.6845471059 0.7289686274 -5.6548667765 -0.5877852523 0.8090169944 -5.7805304826 -0.4817536741 0.8763066800 -5.9061941887 -0.3681245527 0.9297764859 -6.0318578949 -0.2486898872 0.9685831611 -6.1575216010 -0.1253332336 0.9921147013 -6.2831853072 0.0000000000 1.0000000000 -6.4088490133 0.1253332336 0.9921147013 -6.5345127195 0.2486898872 0.9685831611 -6.6601764256 0.3681245527 0.9297764859 -6.7858401318 0.4817536741 0.8763066800 -6.9115038379 0.5877852523 0.8090169944 -7.0371675440 0.6845471059 0.7289686274 -7.1628312502 0.7705132428 0.6374239897 -7.2884949563 0.8443279255 0.5358267950 -7.4141586625 0.9048270525 0.4257792916 -7.5398223686 0.9510565163 0.3090169944 -7.6654860748 0.9822872507 0.1873813146 -7.7911497809 0.9980267284 0.0627905195 -7.9168134870 0.9980267284 -0.0627905195 -8.0424771932 0.9822872507 -0.1873813146 -8.1681408993 0.9510565163 -0.3090169944 -8.2938046055 0.9048270525 -0.4257792916 -8.4194683116 0.8443279255 -0.5358267950 -8.5451320178 0.7705132428 -0.6374239897 -8.6707957239 0.6845471059 -0.7289686274 -8.7964594301 0.5877852523 -0.8090169944 -8.9221231362 0.4817536741 -0.8763066800 -9.0477868423 0.3681245527 -0.9297764859 -9.1734505485 0.2486898872 -0.9685831611 -9.2991142546 0.1253332336 -0.9921147013 -9.4247779608 -0.0000000000 -1.0000000000 -9.5504416669 -0.1253332336 -0.9921147013 -9.6761053731 -0.2486898872 -0.9685831611 -9.8017690792 -0.3681245527 -0.9297764859 -9.9274327853 -0.4817536741 -0.8763066800 -10.0530964915 -0.5877852523 -0.8090169944 -10.1787601976 -0.6845471059 -0.7289686274 -10.3044239038 -0.7705132428 -0.6374239897 -10.4300876099 -0.8443279255 -0.5358267950 -10.5557513161 -0.9048270525 -0.4257792916 -10.6814150222 -0.9510565163 -0.3090169944 -10.8070787283 -0.9822872507 -0.1873813146 -10.9327424345 -0.9980267284 -0.0627905195 -11.0584061406 -0.9980267284 0.0627905195 -11.1840698468 -0.9822872507 0.1873813146 -11.3097335529 -0.9510565163 0.3090169944 -11.4353972591 -0.9048270525 0.4257792916 -11.5610609652 -0.8443279255 0.5358267950 -11.6867246714 -0.7705132428 0.6374239897 -11.8123883775 -0.6845471059 0.7289686274 -11.9380520836 -0.5877852523 0.8090169944 -12.0637157898 -0.4817536741 0.8763066800 -12.1893794959 -0.3681245527 0.9297764859 -12.3150432021 -0.2486898872 0.9685831611 -12.4407069082 -0.1253332336 0.9921147013 -12.5663706144 0.0000000000 1.0000000000 -12.6920343205 0.1253332336 0.9921147013 -12.8176980266 0.2486898872 0.9685831611 -12.9433617328 0.3681245527 0.9297764859 -13.0690254389 0.4817536741 0.8763066800 -13.1946891451 0.5877852523 0.8090169944 -13.3203528512 0.6845471059 0.7289686274 -13.4460165574 0.7705132428 0.6374239897 -13.5716802635 0.8443279255 0.5358267950 -13.6973439697 0.9048270525 0.4257792916 -13.8230076758 0.9510565163 0.3090169944 -13.9486713819 0.9822872507 0.1873813146 -14.0743350881 0.9980267284 0.0627905195 -14.1999987942 0.9980267284 -0.0627905195 -14.3256625004 0.9822872507 -0.1873813146 -14.4513262065 0.9510565163 -0.3090169944 -14.5769899127 0.9048270525 -0.4257792916 -14.7026536188 0.8443279255 -0.5358267950 -14.8283173249 0.7705132428 -0.6374239897 -14.9539810311 0.6845471059 -0.7289686274 -15.0796447372 0.5877852523 -0.8090169944 -15.2053084434 0.4817536741 -0.8763066800 -15.3309721495 0.3681245527 -0.9297764859 -15.4566358557 0.2486898872 -0.9685831611 -15.5822995618 0.1253332336 -0.9921147013 -15.7079632679 -0.0000000000 -1.0000000000 -15.8336269741 -0.1253332336 -0.9921147013 -15.9592906802 -0.2486898872 -0.9685831611 -16.0849543864 -0.3681245527 -0.9297764859 -16.2106180925 -0.4817536741 -0.8763066800 -16.3362817987 -0.5877852523 -0.8090169944 -16.4619455048 -0.6845471059 -0.7289686274 -16.5876092110 -0.7705132428 -0.6374239897 -16.7132729171 -0.8443279255 -0.5358267950 -16.8389366232 -0.9048270525 -0.4257792916 -16.9646003294 -0.9510565163 -0.3090169944 -17.0902640355 -0.9822872507 -0.1873813146 -17.2159277417 -0.9980267284 -0.0627905195 -17.3415914478 -0.9980267284 0.0627905195 -17.4672551540 -0.9822872507 0.1873813146 -17.5929188601 -0.9510565163 0.3090169944 -17.7185825662 -0.9048270525 0.4257792916 -17.8442462724 -0.8443279255 0.5358267950 -17.9699099785 -0.7705132428 0.6374239897 -18.0955736847 -0.6845471059 0.7289686274 -18.2212373908 -0.5877852523 0.8090169944 -18.3469010970 -0.4817536741 0.8763066800 -18.4725648031 -0.3681245527 0.9297764859 -18.5982285093 -0.2486898872 0.9685831611 -18.7238922154 -0.1253332336 0.9921147013 -18.8495559215 0.0000000000 1.0000000000 -18.9752196277 0.1253332336 0.9921147013 -19.1008833338 0.2486898872 0.9685831611 -19.2265470400 0.3681245527 0.9297764859 -19.3522107461 0.4817536741 0.8763066800 -19.4778744523 0.5877852523 0.8090169944 -19.6035381584 0.6845471059 0.7289686274 -19.7292018645 0.7705132428 0.6374239897 -19.8548655707 0.8443279255 0.5358267950 -19.9805292768 0.9048270525 0.4257792916 -20.1061929830 0.9510565163 0.3090169944 -20.2318566891 0.9822872507 0.1873813146 -20.3575203953 0.9980267284 0.0627905195 -20.4831841014 0.9980267284 -0.0627905195 -20.6088478075 0.9822872507 -0.1873813146 -20.7345115137 0.9510565163 -0.3090169944 -20.8601752198 0.9048270525 -0.4257792916 -20.9858389260 0.8443279255 -0.5358267950 -21.1115026321 0.7705132428 -0.6374239897 -21.2371663383 0.6845471059 -0.7289686274 -21.3628300444 0.5877852523 -0.8090169944 -21.4884937506 0.4817536741 -0.8763066800 -21.6141574567 0.3681245527 -0.9297764859 -21.7398211628 0.2486898872 -0.9685831611 -21.8654848690 0.1253332336 -0.9921147013 -21.9911485751 -0.0000000000 -1.0000000000 -22.1168122813 -0.1253332336 -0.9921147013 -22.2424759874 -0.2486898872 -0.9685831611 -22.3681396936 -0.3681245527 -0.9297764859 -22.4938033997 -0.4817536741 -0.8763066800 -22.6194671058 -0.5877852523 -0.8090169944 -22.7451308120 -0.6845471059 -0.7289686274 -22.8707945181 -0.7705132428 -0.6374239897 -22.9964582243 -0.8443279255 -0.5358267950 -23.1221219304 -0.9048270525 -0.4257792916 -23.2477856366 -0.9510565163 -0.3090169944 -23.3734493427 -0.9822872507 -0.1873813146 -23.4991130489 -0.9980267284 -0.0627905195 -23.6247767550 -0.9980267284 0.0627905195 -23.7504404611 -0.9822872507 0.1873813146 -23.8761041673 -0.9510565163 0.3090169944 -24.0017678734 -0.9048270525 0.4257792916 -24.1274315796 -0.8443279255 0.5358267950 -24.2530952857 -0.7705132428 0.6374239897 -24.3787589919 -0.6845471059 0.7289686274 -24.5044226980 -0.5877852523 0.8090169944 -24.6300864041 -0.4817536741 0.8763066800 -24.7557501103 -0.3681245527 0.9297764859 -24.8814138164 -0.2486898872 0.9685831611 -25.0070775226 -0.1253332336 0.9921147013 - +# x1 y11 y12 +0.0000000000 0.0000000000 1.0000000000 +0.1256637061 0.1253332336 0.9921147013 +0.2513274123 0.2486898872 0.9685831611 +0.3769911184 0.3681245527 0.9297764859 +0.5026548246 0.4817536741 0.8763066800 +0.6283185307 0.5877852523 0.8090169944 +0.7539822369 0.6845471059 0.7289686274 +0.8796459430 0.7705132428 0.6374239897 +1.0053096491 0.8443279255 0.5358267950 +1.1309733553 0.9048270525 0.4257792916 +1.2566370614 0.9510565163 0.3090169944 +1.3823007676 0.9822872507 0.1873813146 +1.5079644737 0.9980267284 0.0627905195 +1.6336281799 0.9980267284 -0.0627905195 +1.7592918860 0.9822872507 -0.1873813146 +1.8849555922 0.9510565163 -0.3090169944 +2.0106192983 0.9048270525 -0.4257792916 +2.1362830044 0.8443279255 -0.5358267950 +2.2619467106 0.7705132428 -0.6374239897 +2.3876104167 0.6845471059 -0.7289686274 +2.5132741229 0.5877852523 -0.8090169944 +2.6389378290 0.4817536741 -0.8763066800 +2.7646015352 0.3681245527 -0.9297764859 +2.8902652413 0.2486898872 -0.9685831611 +3.0159289474 0.1253332336 -0.9921147013 +3.1415926536 -0.0000000000 -1.0000000000 +3.2672563597 -0.1253332336 -0.9921147013 +3.3929200659 -0.2486898872 -0.9685831611 +3.5185837720 -0.3681245527 -0.9297764859 +3.6442474782 -0.4817536741 -0.8763066800 +3.7699111843 -0.5877852523 -0.8090169944 +3.8955748905 -0.6845471059 -0.7289686274 +4.0212385966 -0.7705132428 -0.6374239897 +4.1469023027 -0.8443279255 -0.5358267950 +4.2725660089 -0.9048270525 -0.4257792916 +4.3982297150 -0.9510565163 -0.3090169944 +4.5238934212 -0.9822872507 -0.1873813146 +4.6495571273 -0.9980267284 -0.0627905195 +4.7752208335 -0.9980267284 0.0627905195 +4.9008845396 -0.9822872507 0.1873813146 +5.0265482457 -0.9510565163 0.3090169944 +5.1522119519 -0.9048270525 0.4257792916 +5.2778756580 -0.8443279255 0.5358267950 +5.4035393642 -0.7705132428 0.6374239897 +5.5292030703 -0.6845471059 0.7289686274 +5.6548667765 -0.5877852523 0.8090169944 +5.7805304826 -0.4817536741 0.8763066800 +5.9061941887 -0.3681245527 0.9297764859 +6.0318578949 -0.2486898872 0.9685831611 +6.1575216010 -0.1253332336 0.9921147013 +6.2831853072 0.0000000000 1.0000000000 +6.4088490133 0.1253332336 0.9921147013 +6.5345127195 0.2486898872 0.9685831611 +6.6601764256 0.3681245527 0.9297764859 +6.7858401318 0.4817536741 0.8763066800 +6.9115038379 0.5877852523 0.8090169944 +7.0371675440 0.6845471059 0.7289686274 +7.1628312502 0.7705132428 0.6374239897 +7.2884949563 0.8443279255 0.5358267950 +7.4141586625 0.9048270525 0.4257792916 +7.5398223686 0.9510565163 0.3090169944 +7.6654860748 0.9822872507 0.1873813146 +7.7911497809 0.9980267284 0.0627905195 +7.9168134870 0.9980267284 -0.0627905195 +8.0424771932 0.9822872507 -0.1873813146 +8.1681408993 0.9510565163 -0.3090169944 +8.2938046055 0.9048270525 -0.4257792916 +8.4194683116 0.8443279255 -0.5358267950 +8.5451320178 0.7705132428 -0.6374239897 +8.6707957239 0.6845471059 -0.7289686274 +8.7964594301 0.5877852523 -0.8090169944 +8.9221231362 0.4817536741 -0.8763066800 +9.0477868423 0.3681245527 -0.9297764859 +9.1734505485 0.2486898872 -0.9685831611 +9.2991142546 0.1253332336 -0.9921147013 +9.4247779608 -0.0000000000 -1.0000000000 +9.5504416669 -0.1253332336 -0.9921147013 +9.6761053731 -0.2486898872 -0.9685831611 +9.8017690792 -0.3681245527 -0.9297764859 +9.9274327853 -0.4817536741 -0.8763066800 +10.0530964915 -0.5877852523 -0.8090169944 +10.1787601976 -0.6845471059 -0.7289686274 +10.3044239038 -0.7705132428 -0.6374239897 +10.4300876099 -0.8443279255 -0.5358267950 +10.5557513161 -0.9048270525 -0.4257792916 +10.6814150222 -0.9510565163 -0.3090169944 +10.8070787283 -0.9822872507 -0.1873813146 +10.9327424345 -0.9980267284 -0.0627905195 +11.0584061406 -0.9980267284 0.0627905195 +11.1840698468 -0.9822872507 0.1873813146 +11.3097335529 -0.9510565163 0.3090169944 +11.4353972591 -0.9048270525 0.4257792916 +11.5610609652 -0.8443279255 0.5358267950 +11.6867246714 -0.7705132428 0.6374239897 +11.8123883775 -0.6845471059 0.7289686274 +11.9380520836 -0.5877852523 0.8090169944 +12.0637157898 -0.4817536741 0.8763066800 +12.1893794959 -0.3681245527 0.9297764859 +12.3150432021 -0.2486898872 0.9685831611 +12.4407069082 -0.1253332336 0.9921147013 +12.5663706144 0.0000000000 1.0000000000 +12.6920343205 0.1253332336 0.9921147013 +12.8176980266 0.2486898872 0.9685831611 +12.9433617328 0.3681245527 0.9297764859 +13.0690254389 0.4817536741 0.8763066800 +13.1946891451 0.5877852523 0.8090169944 +13.3203528512 0.6845471059 0.7289686274 +13.4460165574 0.7705132428 0.6374239897 +13.5716802635 0.8443279255 0.5358267950 +13.6973439697 0.9048270525 0.4257792916 +13.8230076758 0.9510565163 0.3090169944 +13.9486713819 0.9822872507 0.1873813146 +14.0743350881 0.9980267284 0.0627905195 +14.1999987942 0.9980267284 -0.0627905195 +14.3256625004 0.9822872507 -0.1873813146 +14.4513262065 0.9510565163 -0.3090169944 +14.5769899127 0.9048270525 -0.4257792916 +14.7026536188 0.8443279255 -0.5358267950 +14.8283173249 0.7705132428 -0.6374239897 +14.9539810311 0.6845471059 -0.7289686274 +15.0796447372 0.5877852523 -0.8090169944 +15.2053084434 0.4817536741 -0.8763066800 +15.3309721495 0.3681245527 -0.9297764859 +15.4566358557 0.2486898872 -0.9685831611 +15.5822995618 0.1253332336 -0.9921147013 +15.7079632679 -0.0000000000 -1.0000000000 +15.8336269741 -0.1253332336 -0.9921147013 +15.9592906802 -0.2486898872 -0.9685831611 +16.0849543864 -0.3681245527 -0.9297764859 +16.2106180925 -0.4817536741 -0.8763066800 +16.3362817987 -0.5877852523 -0.8090169944 +16.4619455048 -0.6845471059 -0.7289686274 +16.5876092110 -0.7705132428 -0.6374239897 +16.7132729171 -0.8443279255 -0.5358267950 +16.8389366232 -0.9048270525 -0.4257792916 +16.9646003294 -0.9510565163 -0.3090169944 +17.0902640355 -0.9822872507 -0.1873813146 +17.2159277417 -0.9980267284 -0.0627905195 +17.3415914478 -0.9980267284 0.0627905195 +17.4672551540 -0.9822872507 0.1873813146 +17.5929188601 -0.9510565163 0.3090169944 +17.7185825662 -0.9048270525 0.4257792916 +17.8442462724 -0.8443279255 0.5358267950 +17.9699099785 -0.7705132428 0.6374239897 +18.0955736847 -0.6845471059 0.7289686274 +18.2212373908 -0.5877852523 0.8090169944 +18.3469010970 -0.4817536741 0.8763066800 +18.4725648031 -0.3681245527 0.9297764859 +18.5982285093 -0.2486898872 0.9685831611 +18.7238922154 -0.1253332336 0.9921147013 +18.8495559215 0.0000000000 1.0000000000 +18.9752196277 0.1253332336 0.9921147013 +19.1008833338 0.2486898872 0.9685831611 +19.2265470400 0.3681245527 0.9297764859 +19.3522107461 0.4817536741 0.8763066800 +19.4778744523 0.5877852523 0.8090169944 +19.6035381584 0.6845471059 0.7289686274 +19.7292018645 0.7705132428 0.6374239897 +19.8548655707 0.8443279255 0.5358267950 +19.9805292768 0.9048270525 0.4257792916 +20.1061929830 0.9510565163 0.3090169944 +20.2318566891 0.9822872507 0.1873813146 +20.3575203953 0.9980267284 0.0627905195 +20.4831841014 0.9980267284 -0.0627905195 +20.6088478075 0.9822872507 -0.1873813146 +20.7345115137 0.9510565163 -0.3090169944 +20.8601752198 0.9048270525 -0.4257792916 +20.9858389260 0.8443279255 -0.5358267950 +21.1115026321 0.7705132428 -0.6374239897 +21.2371663383 0.6845471059 -0.7289686274 +21.3628300444 0.5877852523 -0.8090169944 +21.4884937506 0.4817536741 -0.8763066800 +21.6141574567 0.3681245527 -0.9297764859 +21.7398211628 0.2486898872 -0.9685831611 +21.8654848690 0.1253332336 -0.9921147013 +21.9911485751 -0.0000000000 -1.0000000000 +22.1168122813 -0.1253332336 -0.9921147013 +22.2424759874 -0.2486898872 -0.9685831611 +22.3681396936 -0.3681245527 -0.9297764859 +22.4938033997 -0.4817536741 -0.8763066800 +22.6194671058 -0.5877852523 -0.8090169944 +22.7451308120 -0.6845471059 -0.7289686274 +22.8707945181 -0.7705132428 -0.6374239897 +22.9964582243 -0.8443279255 -0.5358267950 +23.1221219304 -0.9048270525 -0.4257792916 +23.2477856366 -0.9510565163 -0.3090169944 +23.3734493427 -0.9822872507 -0.1873813146 +23.4991130489 -0.9980267284 -0.0627905195 +23.6247767550 -0.9980267284 0.0627905195 +23.7504404611 -0.9822872507 0.1873813146 +23.8761041673 -0.9510565163 0.3090169944 +24.0017678734 -0.9048270525 0.4257792916 +24.1274315796 -0.8443279255 0.5358267950 +24.2530952857 -0.7705132428 0.6374239897 +24.3787589919 -0.6845471059 0.7289686274 +24.5044226980 -0.5877852523 0.8090169944 +24.6300864041 -0.4817536741 0.8763066800 +24.7557501103 -0.3681245527 0.9297764859 +24.8814138164 -0.2486898872 0.9685831611 +25.0070775226 -0.1253332336 0.9921147013 + diff --git a/test/jkqtplot_test/test.tif b/examples/jkqtplot_test/test.tif similarity index 100% rename from test/jkqtplot_test/test.tif rename to examples/jkqtplot_test/test.tif diff --git a/test/jkqtplot_test/test.txt b/examples/jkqtplot_test/test.txt similarity index 97% rename from test/jkqtplot_test/test.txt rename to examples/jkqtplot_test/test.txt index f440ac1313..3966283e1f 100644 --- a/test/jkqtplot_test/test.txt +++ b/examples/jkqtplot_test/test.txt @@ -1,202 +1,202 @@ -# x1, y11, y12 -0.0000000000, 0.0000000000, 1.0000000000 -0.1256637061, 0.1253332336, 0.9921147013 -0.2513274123, 0.2486898872, 0.9685831611 -0.3769911184, 0.3681245527, 0.9297764859 -0.5026548246, 0.4817536741, 0.8763066800 -0.6283185307, 0.5877852523, 0.8090169944 -0.7539822369, 0.6845471059, 0.7289686274 -0.8796459430, 0.7705132428, 0.6374239897 -1.0053096491, 0.8443279255, 0.5358267950 -1.1309733553, 0.9048270525, 0.4257792916 -1.2566370614, 0.9510565163, 0.3090169944 -1.3823007676, 0.9822872507, 0.1873813146 -1.5079644737, 0.9980267284, 0.0627905195 -1.6336281799, 0.9980267284, -0.0627905195 -1.7592918860, 0.9822872507, -0.1873813146 -1.8849555922, 0.9510565163, -0.3090169944 -2.0106192983, 0.9048270525, -0.4257792916 -2.1362830044, 0.8443279255, -0.5358267950 -2.2619467106, 0.7705132428, -0.6374239897 -2.3876104167, 0.6845471059, -0.7289686274 -2.5132741229, 0.5877852523, -0.8090169944 -2.6389378290, 0.4817536741, -0.8763066800 -2.7646015352, 0.3681245527, -0.9297764859 -2.8902652413, 0.2486898872, -0.9685831611 -3.0159289474, 0.1253332336, -0.9921147013 -3.1415926536, -0.0000000000, -1.0000000000 -3.2672563597, -0.1253332336, -0.9921147013 -3.3929200659, -0.2486898872, -0.9685831611 -3.5185837720, -0.3681245527, -0.9297764859 -3.6442474782, -0.4817536741, -0.8763066800 -3.7699111843, -0.5877852523, -0.8090169944 -3.8955748905, -0.6845471059, -0.7289686274 -4.0212385966, -0.7705132428, -0.6374239897 -4.1469023027, -0.8443279255, -0.5358267950 -4.2725660089, -0.9048270525, -0.4257792916 -4.3982297150, -0.9510565163, -0.3090169944 -4.5238934212, -0.9822872507, -0.1873813146 -4.6495571273, -0.9980267284, -0.0627905195 -4.7752208335, -0.9980267284, 0.0627905195 -4.9008845396, -0.9822872507, 0.1873813146 -5.0265482457, -0.9510565163, 0.3090169944 -5.1522119519, -0.9048270525, 0.4257792916 -5.2778756580, -0.8443279255, 0.5358267950 -5.4035393642, -0.7705132428, 0.6374239897 -5.5292030703, -0.6845471059, 0.7289686274 -5.6548667765, -0.5877852523, 0.8090169944 -5.7805304826, -0.4817536741, 0.8763066800 -5.9061941887, -0.3681245527, 0.9297764859 -6.0318578949, -0.2486898872, 0.9685831611 -6.1575216010, -0.1253332336, 0.9921147013 -6.2831853072, 0.0000000000, 1.0000000000 -6.4088490133, 0.1253332336, 0.9921147013 -6.5345127195, 0.2486898872, 0.9685831611 -6.6601764256, 0.3681245527, 0.9297764859 -6.7858401318, 0.4817536741, 0.8763066800 -6.9115038379, 0.5877852523, 0.8090169944 -7.0371675440, 0.6845471059, 0.7289686274 -7.1628312502, 0.7705132428, 0.6374239897 -7.2884949563, 0.8443279255, 0.5358267950 -7.4141586625, 0.9048270525, 0.4257792916 -7.5398223686, 0.9510565163, 0.3090169944 -7.6654860748, 0.9822872507, 0.1873813146 -7.7911497809, 0.9980267284, 0.0627905195 -7.9168134870, 0.9980267284, -0.0627905195 -8.0424771932, 0.9822872507, -0.1873813146 -8.1681408993, 0.9510565163, -0.3090169944 -8.2938046055, 0.9048270525, -0.4257792916 -8.4194683116, 0.8443279255, -0.5358267950 -8.5451320178, 0.7705132428, -0.6374239897 -8.6707957239, 0.6845471059, -0.7289686274 -8.7964594301, 0.5877852523, -0.8090169944 -8.9221231362, 0.4817536741, -0.8763066800 -9.0477868423, 0.3681245527, -0.9297764859 -9.1734505485, 0.2486898872, -0.9685831611 -9.2991142546, 0.1253332336, -0.9921147013 -9.4247779608, -0.0000000000, -1.0000000000 -9.5504416669, -0.1253332336, -0.9921147013 -9.6761053731, -0.2486898872, -0.9685831611 -9.8017690792, -0.3681245527, -0.9297764859 -9.9274327853, -0.4817536741, -0.8763066800 -10.0530964915, -0.5877852523, -0.8090169944 -10.1787601976, -0.6845471059, -0.7289686274 -10.3044239038, -0.7705132428, -0.6374239897 -10.4300876099, -0.8443279255, -0.5358267950 -10.5557513161, -0.9048270525, -0.4257792916 -10.6814150222, -0.9510565163, -0.3090169944 -10.8070787283, -0.9822872507, -0.1873813146 -10.9327424345, -0.9980267284, -0.0627905195 -11.0584061406, -0.9980267284, 0.0627905195 -11.1840698468, -0.9822872507, 0.1873813146 -11.3097335529, -0.9510565163, 0.3090169944 -11.4353972591, -0.9048270525, 0.4257792916 -11.5610609652, -0.8443279255, 0.5358267950 -11.6867246714, -0.7705132428, 0.6374239897 -11.8123883775, -0.6845471059, 0.7289686274 -11.9380520836, -0.5877852523, 0.8090169944 -12.0637157898, -0.4817536741, 0.8763066800 -12.1893794959, -0.3681245527, 0.9297764859 -12.3150432021, -0.2486898872, 0.9685831611 -12.4407069082, -0.1253332336, 0.9921147013 -12.5663706144, 0.0000000000, 1.0000000000 -12.6920343205, 0.1253332336, 0.9921147013 -12.8176980266, 0.2486898872, 0.9685831611 -12.9433617328, 0.3681245527, 0.9297764859 -13.0690254389, 0.4817536741, 0.8763066800 -13.1946891451, 0.5877852523, 0.8090169944 -13.3203528512, 0.6845471059, 0.7289686274 -13.4460165574, 0.7705132428, 0.6374239897 -13.5716802635, 0.8443279255, 0.5358267950 -13.6973439697, 0.9048270525, 0.4257792916 -13.8230076758, 0.9510565163, 0.3090169944 -13.9486713819, 0.9822872507, 0.1873813146 -14.0743350881, 0.9980267284, 0.0627905195 -14.1999987942, 0.9980267284, -0.0627905195 -14.3256625004, 0.9822872507, -0.1873813146 -14.4513262065, 0.9510565163, -0.3090169944 -14.5769899127, 0.9048270525, -0.4257792916 -14.7026536188, 0.8443279255, -0.5358267950 -14.8283173249, 0.7705132428, -0.6374239897 -14.9539810311, 0.6845471059, -0.7289686274 -15.0796447372, 0.5877852523, -0.8090169944 -15.2053084434, 0.4817536741, -0.8763066800 -15.3309721495, 0.3681245527, -0.9297764859 -15.4566358557, 0.2486898872, -0.9685831611 -15.5822995618, 0.1253332336, -0.9921147013 -15.7079632679, -0.0000000000, -1.0000000000 -15.8336269741, -0.1253332336, -0.9921147013 -15.9592906802, -0.2486898872, -0.9685831611 -16.0849543864, -0.3681245527, -0.9297764859 -16.2106180925, -0.4817536741, -0.8763066800 -16.3362817987, -0.5877852523, -0.8090169944 -16.4619455048, -0.6845471059, -0.7289686274 -16.5876092110, -0.7705132428, -0.6374239897 -16.7132729171, -0.8443279255, -0.5358267950 -16.8389366232, -0.9048270525, -0.4257792916 -16.9646003294, -0.9510565163, -0.3090169944 -17.0902640355, -0.9822872507, -0.1873813146 -17.2159277417, -0.9980267284, -0.0627905195 -17.3415914478, -0.9980267284, 0.0627905195 -17.4672551540, -0.9822872507, 0.1873813146 -17.5929188601, -0.9510565163, 0.3090169944 -17.7185825662, -0.9048270525, 0.4257792916 -17.8442462724, -0.8443279255, 0.5358267950 -17.9699099785, -0.7705132428, 0.6374239897 -18.0955736847, -0.6845471059, 0.7289686274 -18.2212373908, -0.5877852523, 0.8090169944 -18.3469010970, -0.4817536741, 0.8763066800 -18.4725648031, -0.3681245527, 0.9297764859 -18.5982285093, -0.2486898872, 0.9685831611 -18.7238922154, -0.1253332336, 0.9921147013 -18.8495559215, 0.0000000000, 1.0000000000 -18.9752196277, 0.1253332336, 0.9921147013 -19.1008833338, 0.2486898872, 0.9685831611 -19.2265470400, 0.3681245527, 0.9297764859 -19.3522107461, 0.4817536741, 0.8763066800 -19.4778744523, 0.5877852523, 0.8090169944 -19.6035381584, 0.6845471059, 0.7289686274 -19.7292018645, 0.7705132428, 0.6374239897 -19.8548655707, 0.8443279255, 0.5358267950 -19.9805292768, 0.9048270525, 0.4257792916 -20.1061929830, 0.9510565163, 0.3090169944 -20.2318566891, 0.9822872507, 0.1873813146 -20.3575203953, 0.9980267284, 0.0627905195 -20.4831841014, 0.9980267284, -0.0627905195 -20.6088478075, 0.9822872507, -0.1873813146 -20.7345115137, 0.9510565163, -0.3090169944 -20.8601752198, 0.9048270525, -0.4257792916 -20.9858389260, 0.8443279255, -0.5358267950 -21.1115026321, 0.7705132428, -0.6374239897 -21.2371663383, 0.6845471059, -0.7289686274 -21.3628300444, 0.5877852523, -0.8090169944 -21.4884937506, 0.4817536741, -0.8763066800 -21.6141574567, 0.3681245527, -0.9297764859 -21.7398211628, 0.2486898872, -0.9685831611 -21.8654848690, 0.1253332336, -0.9921147013 -21.9911485751, -0.0000000000, -1.0000000000 -22.1168122813, -0.1253332336, -0.9921147013 -22.2424759874, -0.2486898872, -0.9685831611 -22.3681396936, -0.3681245527, -0.9297764859 -22.4938033997, -0.4817536741, -0.8763066800 -22.6194671058, -0.5877852523, -0.8090169944 -22.7451308120, -0.6845471059, -0.7289686274 -22.8707945181, -0.7705132428, -0.6374239897 -22.9964582243, -0.8443279255, -0.5358267950 -23.1221219304, -0.9048270525, -0.4257792916 -23.2477856366, -0.9510565163, -0.3090169944 -23.3734493427, -0.9822872507, -0.1873813146 -23.4991130489, -0.9980267284, -0.0627905195 -23.6247767550, -0.9980267284, 0.0627905195 -23.7504404611, -0.9822872507, 0.1873813146 -23.8761041673, -0.9510565163, 0.3090169944 -24.0017678734, -0.9048270525, 0.4257792916 -24.1274315796, -0.8443279255, 0.5358267950 -24.2530952857, -0.7705132428, 0.6374239897 -24.3787589919, -0.6845471059, 0.7289686274 -24.5044226980, -0.5877852523, 0.8090169944 -24.6300864041, -0.4817536741, 0.8763066800 -24.7557501103, -0.3681245527, 0.9297764859 -24.8814138164, -0.2486898872, 0.9685831611 -25.0070775226, -0.1253332336, 0.9921147013 - +# x1, y11, y12 +0.0000000000, 0.0000000000, 1.0000000000 +0.1256637061, 0.1253332336, 0.9921147013 +0.2513274123, 0.2486898872, 0.9685831611 +0.3769911184, 0.3681245527, 0.9297764859 +0.5026548246, 0.4817536741, 0.8763066800 +0.6283185307, 0.5877852523, 0.8090169944 +0.7539822369, 0.6845471059, 0.7289686274 +0.8796459430, 0.7705132428, 0.6374239897 +1.0053096491, 0.8443279255, 0.5358267950 +1.1309733553, 0.9048270525, 0.4257792916 +1.2566370614, 0.9510565163, 0.3090169944 +1.3823007676, 0.9822872507, 0.1873813146 +1.5079644737, 0.9980267284, 0.0627905195 +1.6336281799, 0.9980267284, -0.0627905195 +1.7592918860, 0.9822872507, -0.1873813146 +1.8849555922, 0.9510565163, -0.3090169944 +2.0106192983, 0.9048270525, -0.4257792916 +2.1362830044, 0.8443279255, -0.5358267950 +2.2619467106, 0.7705132428, -0.6374239897 +2.3876104167, 0.6845471059, -0.7289686274 +2.5132741229, 0.5877852523, -0.8090169944 +2.6389378290, 0.4817536741, -0.8763066800 +2.7646015352, 0.3681245527, -0.9297764859 +2.8902652413, 0.2486898872, -0.9685831611 +3.0159289474, 0.1253332336, -0.9921147013 +3.1415926536, -0.0000000000, -1.0000000000 +3.2672563597, -0.1253332336, -0.9921147013 +3.3929200659, -0.2486898872, -0.9685831611 +3.5185837720, -0.3681245527, -0.9297764859 +3.6442474782, -0.4817536741, -0.8763066800 +3.7699111843, -0.5877852523, -0.8090169944 +3.8955748905, -0.6845471059, -0.7289686274 +4.0212385966, -0.7705132428, -0.6374239897 +4.1469023027, -0.8443279255, -0.5358267950 +4.2725660089, -0.9048270525, -0.4257792916 +4.3982297150, -0.9510565163, -0.3090169944 +4.5238934212, -0.9822872507, -0.1873813146 +4.6495571273, -0.9980267284, -0.0627905195 +4.7752208335, -0.9980267284, 0.0627905195 +4.9008845396, -0.9822872507, 0.1873813146 +5.0265482457, -0.9510565163, 0.3090169944 +5.1522119519, -0.9048270525, 0.4257792916 +5.2778756580, -0.8443279255, 0.5358267950 +5.4035393642, -0.7705132428, 0.6374239897 +5.5292030703, -0.6845471059, 0.7289686274 +5.6548667765, -0.5877852523, 0.8090169944 +5.7805304826, -0.4817536741, 0.8763066800 +5.9061941887, -0.3681245527, 0.9297764859 +6.0318578949, -0.2486898872, 0.9685831611 +6.1575216010, -0.1253332336, 0.9921147013 +6.2831853072, 0.0000000000, 1.0000000000 +6.4088490133, 0.1253332336, 0.9921147013 +6.5345127195, 0.2486898872, 0.9685831611 +6.6601764256, 0.3681245527, 0.9297764859 +6.7858401318, 0.4817536741, 0.8763066800 +6.9115038379, 0.5877852523, 0.8090169944 +7.0371675440, 0.6845471059, 0.7289686274 +7.1628312502, 0.7705132428, 0.6374239897 +7.2884949563, 0.8443279255, 0.5358267950 +7.4141586625, 0.9048270525, 0.4257792916 +7.5398223686, 0.9510565163, 0.3090169944 +7.6654860748, 0.9822872507, 0.1873813146 +7.7911497809, 0.9980267284, 0.0627905195 +7.9168134870, 0.9980267284, -0.0627905195 +8.0424771932, 0.9822872507, -0.1873813146 +8.1681408993, 0.9510565163, -0.3090169944 +8.2938046055, 0.9048270525, -0.4257792916 +8.4194683116, 0.8443279255, -0.5358267950 +8.5451320178, 0.7705132428, -0.6374239897 +8.6707957239, 0.6845471059, -0.7289686274 +8.7964594301, 0.5877852523, -0.8090169944 +8.9221231362, 0.4817536741, -0.8763066800 +9.0477868423, 0.3681245527, -0.9297764859 +9.1734505485, 0.2486898872, -0.9685831611 +9.2991142546, 0.1253332336, -0.9921147013 +9.4247779608, -0.0000000000, -1.0000000000 +9.5504416669, -0.1253332336, -0.9921147013 +9.6761053731, -0.2486898872, -0.9685831611 +9.8017690792, -0.3681245527, -0.9297764859 +9.9274327853, -0.4817536741, -0.8763066800 +10.0530964915, -0.5877852523, -0.8090169944 +10.1787601976, -0.6845471059, -0.7289686274 +10.3044239038, -0.7705132428, -0.6374239897 +10.4300876099, -0.8443279255, -0.5358267950 +10.5557513161, -0.9048270525, -0.4257792916 +10.6814150222, -0.9510565163, -0.3090169944 +10.8070787283, -0.9822872507, -0.1873813146 +10.9327424345, -0.9980267284, -0.0627905195 +11.0584061406, -0.9980267284, 0.0627905195 +11.1840698468, -0.9822872507, 0.1873813146 +11.3097335529, -0.9510565163, 0.3090169944 +11.4353972591, -0.9048270525, 0.4257792916 +11.5610609652, -0.8443279255, 0.5358267950 +11.6867246714, -0.7705132428, 0.6374239897 +11.8123883775, -0.6845471059, 0.7289686274 +11.9380520836, -0.5877852523, 0.8090169944 +12.0637157898, -0.4817536741, 0.8763066800 +12.1893794959, -0.3681245527, 0.9297764859 +12.3150432021, -0.2486898872, 0.9685831611 +12.4407069082, -0.1253332336, 0.9921147013 +12.5663706144, 0.0000000000, 1.0000000000 +12.6920343205, 0.1253332336, 0.9921147013 +12.8176980266, 0.2486898872, 0.9685831611 +12.9433617328, 0.3681245527, 0.9297764859 +13.0690254389, 0.4817536741, 0.8763066800 +13.1946891451, 0.5877852523, 0.8090169944 +13.3203528512, 0.6845471059, 0.7289686274 +13.4460165574, 0.7705132428, 0.6374239897 +13.5716802635, 0.8443279255, 0.5358267950 +13.6973439697, 0.9048270525, 0.4257792916 +13.8230076758, 0.9510565163, 0.3090169944 +13.9486713819, 0.9822872507, 0.1873813146 +14.0743350881, 0.9980267284, 0.0627905195 +14.1999987942, 0.9980267284, -0.0627905195 +14.3256625004, 0.9822872507, -0.1873813146 +14.4513262065, 0.9510565163, -0.3090169944 +14.5769899127, 0.9048270525, -0.4257792916 +14.7026536188, 0.8443279255, -0.5358267950 +14.8283173249, 0.7705132428, -0.6374239897 +14.9539810311, 0.6845471059, -0.7289686274 +15.0796447372, 0.5877852523, -0.8090169944 +15.2053084434, 0.4817536741, -0.8763066800 +15.3309721495, 0.3681245527, -0.9297764859 +15.4566358557, 0.2486898872, -0.9685831611 +15.5822995618, 0.1253332336, -0.9921147013 +15.7079632679, -0.0000000000, -1.0000000000 +15.8336269741, -0.1253332336, -0.9921147013 +15.9592906802, -0.2486898872, -0.9685831611 +16.0849543864, -0.3681245527, -0.9297764859 +16.2106180925, -0.4817536741, -0.8763066800 +16.3362817987, -0.5877852523, -0.8090169944 +16.4619455048, -0.6845471059, -0.7289686274 +16.5876092110, -0.7705132428, -0.6374239897 +16.7132729171, -0.8443279255, -0.5358267950 +16.8389366232, -0.9048270525, -0.4257792916 +16.9646003294, -0.9510565163, -0.3090169944 +17.0902640355, -0.9822872507, -0.1873813146 +17.2159277417, -0.9980267284, -0.0627905195 +17.3415914478, -0.9980267284, 0.0627905195 +17.4672551540, -0.9822872507, 0.1873813146 +17.5929188601, -0.9510565163, 0.3090169944 +17.7185825662, -0.9048270525, 0.4257792916 +17.8442462724, -0.8443279255, 0.5358267950 +17.9699099785, -0.7705132428, 0.6374239897 +18.0955736847, -0.6845471059, 0.7289686274 +18.2212373908, -0.5877852523, 0.8090169944 +18.3469010970, -0.4817536741, 0.8763066800 +18.4725648031, -0.3681245527, 0.9297764859 +18.5982285093, -0.2486898872, 0.9685831611 +18.7238922154, -0.1253332336, 0.9921147013 +18.8495559215, 0.0000000000, 1.0000000000 +18.9752196277, 0.1253332336, 0.9921147013 +19.1008833338, 0.2486898872, 0.9685831611 +19.2265470400, 0.3681245527, 0.9297764859 +19.3522107461, 0.4817536741, 0.8763066800 +19.4778744523, 0.5877852523, 0.8090169944 +19.6035381584, 0.6845471059, 0.7289686274 +19.7292018645, 0.7705132428, 0.6374239897 +19.8548655707, 0.8443279255, 0.5358267950 +19.9805292768, 0.9048270525, 0.4257792916 +20.1061929830, 0.9510565163, 0.3090169944 +20.2318566891, 0.9822872507, 0.1873813146 +20.3575203953, 0.9980267284, 0.0627905195 +20.4831841014, 0.9980267284, -0.0627905195 +20.6088478075, 0.9822872507, -0.1873813146 +20.7345115137, 0.9510565163, -0.3090169944 +20.8601752198, 0.9048270525, -0.4257792916 +20.9858389260, 0.8443279255, -0.5358267950 +21.1115026321, 0.7705132428, -0.6374239897 +21.2371663383, 0.6845471059, -0.7289686274 +21.3628300444, 0.5877852523, -0.8090169944 +21.4884937506, 0.4817536741, -0.8763066800 +21.6141574567, 0.3681245527, -0.9297764859 +21.7398211628, 0.2486898872, -0.9685831611 +21.8654848690, 0.1253332336, -0.9921147013 +21.9911485751, -0.0000000000, -1.0000000000 +22.1168122813, -0.1253332336, -0.9921147013 +22.2424759874, -0.2486898872, -0.9685831611 +22.3681396936, -0.3681245527, -0.9297764859 +22.4938033997, -0.4817536741, -0.8763066800 +22.6194671058, -0.5877852523, -0.8090169944 +22.7451308120, -0.6845471059, -0.7289686274 +22.8707945181, -0.7705132428, -0.6374239897 +22.9964582243, -0.8443279255, -0.5358267950 +23.1221219304, -0.9048270525, -0.4257792916 +23.2477856366, -0.9510565163, -0.3090169944 +23.3734493427, -0.9822872507, -0.1873813146 +23.4991130489, -0.9980267284, -0.0627905195 +23.6247767550, -0.9980267284, 0.0627905195 +23.7504404611, -0.9822872507, 0.1873813146 +23.8761041673, -0.9510565163, 0.3090169944 +24.0017678734, -0.9048270525, 0.4257792916 +24.1274315796, -0.8443279255, 0.5358267950 +24.2530952857, -0.7705132428, 0.6374239897 +24.3787589919, -0.6845471059, 0.7289686274 +24.5044226980, -0.5877852523, 0.8090169944 +24.6300864041, -0.4817536741, 0.8763066800 +24.7557501103, -0.3681245527, 0.9297764859 +24.8814138164, -0.2486898872, 0.9685831611 +25.0070775226, -0.1253332336, 0.9921147013 + diff --git a/test/jkqtplot_test/test.xbm b/examples/jkqtplot_test/test.xbm similarity index 100% rename from test/jkqtplot_test/test.xbm rename to examples/jkqtplot_test/test.xbm diff --git a/test/jkqtplot_test/test.xpm b/examples/jkqtplot_test/test.xpm similarity index 100% rename from test/jkqtplot_test/test.xpm rename to examples/jkqtplot_test/test.xpm diff --git a/test/jkqtplot_test/test_excel.dif b/examples/jkqtplot_test/test_excel.dif similarity index 87% rename from test/jkqtplot_test/test_excel.dif rename to examples/jkqtplot_test/test_excel.dif index 3b0f74743e..14330927b5 100644 --- a/test/jkqtplot_test/test_excel.dif +++ b/examples/jkqtplot_test/test_excel.dif @@ -1,1622 +1,1622 @@ -TABLE -0,1 -"EXCEL" -VECTORS -0,201 -"" -TUPLES -0,3 -"" -DATA -0,0 -"" --1,0 -BOT -1,0 -"x1" -1,0 -"y11" -1,0 -"y12" --1,0 -BOT -0,0 -V -0,0 -V -0,1 -V --1,0 -BOT -0,0.125663706 -V -0,0.125333234 -V -0,0.992114701 -V --1,0 -BOT -0,0.251327412 -V -0,0.248689887 -V -0,0.968583161 -V --1,0 -BOT -0,0.376991118 -V -0,0.368124553 -V -0,0.929776486 -V --1,0 -BOT -0,0.502654825 -V -0,0.481753674 -V -0,0.87630668 -V --1,0 -BOT -0,0.628318531 -V -0,0.587785252 -V -0,0.809016994 -V --1,0 -BOT -0,0.753982237 -V -0,0.684547106 -V -0,0.728968627 -V --1,0 -BOT -0,0.879645943 -V -0,0.770513243 -V -0,0.63742399 -V --1,0 -BOT -0,1.005309649 -V -0,0.844327926 -V -0,0.535826795 -V --1,0 -BOT -0,1.130973355 -V -0,0.904827053 -V -0,0.425779292 -V --1,0 -BOT -0,1.256637061 -V -0,0.951056516 -V -0,0.309016994 -V --1,0 -BOT -0,1.382300768 -V -0,0.982287251 -V -0,0.187381315 -V --1,0 -BOT -0,1.507964474 -V -0,0.998026728 -V -0,0.06279052 -V --1,0 -BOT -0,1.63362818 -V -0,0.998026728 -V -0,-0.06279052 -V --1,0 -BOT -0,1.759291886 -V -0,0.982287251 -V -0,-0.187381315 -V --1,0 -BOT -0,1.884955592 -V -0,0.951056516 -V -0,-0.309016994 -V --1,0 -BOT -0,2.010619298 -V -0,0.904827053 -V -0,-0.425779292 -V --1,0 -BOT -0,2.136283004 -V -0,0.844327926 -V -0,-0.535826795 -V --1,0 -BOT -0,2.261946711 -V -0,0.770513243 -V -0,-0.63742399 -V --1,0 -BOT -0,2.387610417 -V -0,0.684547106 -V -0,-0.728968627 -V --1,0 -BOT -0,2.513274123 -V -0,0.587785252 -V -0,-0.809016994 -V --1,0 -BOT -0,2.638937829 -V -0,0.481753674 -V -0,-0.87630668 -V --1,0 -BOT -0,2.764601535 -V -0,0.368124553 -V -0,-0.929776486 -V --1,0 -BOT -0,2.890265241 -V -0,0.248689887 -V -0,-0.968583161 -V --1,0 -BOT -0,3.015928947 -V -0,0.125333234 -V -0,-0.992114701 -V --1,0 -BOT -0,3.141592654 -V -0,0 -V -0,-1 -V --1,0 -BOT -0,3.26725636 -V -0,-0.125333234 -V -0,-0.992114701 -V --1,0 -BOT -0,3.392920066 -V -0,-0.248689887 -V -0,-0.968583161 -V --1,0 -BOT -0,3.518583772 -V -0,-0.368124553 -V -0,-0.929776486 -V --1,0 -BOT -0,3.644247478 -V -0,-0.481753674 -V -0,-0.87630668 -V --1,0 -BOT -0,3.769911184 -V -0,-0.587785252 -V -0,-0.809016994 -V --1,0 -BOT -0,3.895574891 -V -0,-0.684547106 -V -0,-0.728968627 -V --1,0 -BOT -0,4.021238597 -V -0,-0.770513243 -V -0,-0.63742399 -V --1,0 -BOT -0,4.146902303 -V -0,-0.844327926 -V -0,-0.535826795 -V --1,0 -BOT -0,4.272566009 -V -0,-0.904827053 -V -0,-0.425779292 -V --1,0 -BOT -0,4.398229715 -V -0,-0.951056516 -V -0,-0.309016994 -V --1,0 -BOT -0,4.523893421 -V -0,-0.982287251 -V -0,-0.187381315 -V --1,0 -BOT -0,4.649557127 -V -0,-0.998026728 -V -0,-0.06279052 -V --1,0 -BOT -0,4.775220834 -V -0,-0.998026728 -V -0,0.06279052 -V --1,0 -BOT -0,4.90088454 -V -0,-0.982287251 -V -0,0.187381315 -V --1,0 -BOT -0,5.026548246 -V -0,-0.951056516 -V -0,0.309016994 -V --1,0 -BOT -0,5.152211952 -V -0,-0.904827053 -V -0,0.425779292 -V --1,0 -BOT -0,5.277875658 -V -0,-0.844327926 -V -0,0.535826795 -V --1,0 -BOT -0,5.403539364 -V -0,-0.770513243 -V -0,0.63742399 -V --1,0 -BOT -0,5.52920307 -V -0,-0.684547106 -V -0,0.728968627 -V --1,0 -BOT -0,5.654866777 -V -0,-0.587785252 -V -0,0.809016994 -V --1,0 -BOT -0,5.780530483 -V -0,-0.481753674 -V -0,0.87630668 -V --1,0 -BOT -0,5.906194189 -V -0,-0.368124553 -V -0,0.929776486 -V --1,0 -BOT -0,6.031857895 -V -0,-0.248689887 -V -0,0.968583161 -V --1,0 -BOT -0,6.157521601 -V -0,-0.125333234 -V -0,0.992114701 -V --1,0 -BOT -0,6.283185307 -V -0,0 -V -0,1 -V --1,0 -BOT -0,6.408849013 -V -0,0.125333234 -V -0,0.992114701 -V --1,0 -BOT -0,6.53451272 -V -0,0.248689887 -V -0,0.968583161 -V --1,0 -BOT -0,6.660176426 -V -0,0.368124553 -V -0,0.929776486 -V --1,0 -BOT -0,6.785840132 -V -0,0.481753674 -V -0,0.87630668 -V --1,0 -BOT -0,6.911503838 -V -0,0.587785252 -V -0,0.809016994 -V --1,0 -BOT -0,7.037167544 -V -0,0.684547106 -V -0,0.728968627 -V --1,0 -BOT -0,7.16283125 -V -0,0.770513243 -V -0,0.63742399 -V --1,0 -BOT -0,7.288494956 -V -0,0.844327926 -V -0,0.535826795 -V --1,0 -BOT -0,7.414158663 -V -0,0.904827053 -V -0,0.425779292 -V --1,0 -BOT -0,7.539822369 -V -0,0.951056516 -V -0,0.309016994 -V --1,0 -BOT -0,7.665486075 -V -0,0.982287251 -V -0,0.187381315 -V --1,0 -BOT -0,7.791149781 -V -0,0.998026728 -V -0,0.06279052 -V --1,0 -BOT -0,7.916813487 -V -0,0.998026728 -V -0,-0.06279052 -V --1,0 -BOT -0,8.042477193 -V -0,0.982287251 -V -0,-0.187381315 -V --1,0 -BOT -0,8.168140899 -V -0,0.951056516 -V -0,-0.309016994 -V --1,0 -BOT -0,8.293804606 -V -0,0.904827053 -V -0,-0.425779292 -V --1,0 -BOT -0,8.419468312 -V -0,0.844327926 -V -0,-0.535826795 -V --1,0 -BOT -0,8.545132018 -V -0,0.770513243 -V -0,-0.63742399 -V --1,0 -BOT -0,8.670795724 -V -0,0.684547106 -V -0,-0.728968627 -V --1,0 -BOT -0,8.79645943 -V -0,0.587785252 -V -0,-0.809016994 -V --1,0 -BOT -0,8.922123136 -V -0,0.481753674 -V -0,-0.87630668 -V --1,0 -BOT -0,9.047786842 -V -0,0.368124553 -V -0,-0.929776486 -V --1,0 -BOT -0,9.173450549 -V -0,0.248689887 -V -0,-0.968583161 -V --1,0 -BOT -0,9.299114255 -V -0,0.125333234 -V -0,-0.992114701 -V --1,0 -BOT -0,9.424777961 -V -0,0 -V -0,-1 -V --1,0 -BOT -0,9.550441667 -V -0,-0.125333234 -V -0,-0.992114701 -V --1,0 -BOT -0,9.676105373 -V -0,-0.248689887 -V -0,-0.968583161 -V --1,0 -BOT -0,9.801769079 -V -0,-0.368124553 -V -0,-0.929776486 -V --1,0 -BOT -0,9.927432785 -V -0,-0.481753674 -V -0,-0.87630668 -V --1,0 -BOT -0,10.05309649 -V -0,-0.587785252 -V -0,-0.809016994 -V --1,0 -BOT -0,10.1787602 -V -0,-0.684547106 -V -0,-0.728968627 -V --1,0 -BOT -0,10.3044239 -V -0,-0.770513243 -V -0,-0.63742399 -V --1,0 -BOT -0,10.43008761 -V -0,-0.844327926 -V -0,-0.535826795 -V --1,0 -BOT -0,10.55575132 -V -0,-0.904827053 -V -0,-0.425779292 -V --1,0 -BOT -0,10.68141502 -V -0,-0.951056516 -V -0,-0.309016994 -V --1,0 -BOT -0,10.80707873 -V -0,-0.982287251 -V -0,-0.187381315 -V --1,0 -BOT -0,10.93274243 -V -0,-0.998026728 -V -0,-0.06279052 -V --1,0 -BOT -0,11.05840614 -V -0,-0.998026728 -V -0,0.06279052 -V --1,0 -BOT -0,11.18406985 -V -0,-0.982287251 -V -0,0.187381315 -V --1,0 -BOT -0,11.30973355 -V -0,-0.951056516 -V -0,0.309016994 -V --1,0 -BOT -0,11.43539726 -V -0,-0.904827053 -V -0,0.425779292 -V --1,0 -BOT -0,11.56106097 -V -0,-0.844327926 -V -0,0.535826795 -V --1,0 -BOT -0,11.68672467 -V -0,-0.770513243 -V -0,0.63742399 -V --1,0 -BOT -0,11.81238838 -V -0,-0.684547106 -V -0,0.728968627 -V --1,0 -BOT -0,11.93805208 -V -0,-0.587785252 -V -0,0.809016994 -V --1,0 -BOT -0,12.06371579 -V -0,-0.481753674 -V -0,0.87630668 -V --1,0 -BOT -0,12.1893795 -V -0,-0.368124553 -V -0,0.929776486 -V --1,0 -BOT -0,12.3150432 -V -0,-0.248689887 -V -0,0.968583161 -V --1,0 -BOT -0,12.44070691 -V -0,-0.125333234 -V -0,0.992114701 -V --1,0 -BOT -0,12.56637061 -V -0,0 -V -0,1 -V --1,0 -BOT -0,12.69203432 -V -0,0.125333234 -V -0,0.992114701 -V --1,0 -BOT -0,12.81769803 -V -0,0.248689887 -V -0,0.968583161 -V --1,0 -BOT -0,12.94336173 -V -0,0.368124553 -V -0,0.929776486 -V --1,0 -BOT -0,13.06902544 -V -0,0.481753674 -V -0,0.87630668 -V --1,0 -BOT -0,13.19468915 -V -0,0.587785252 -V -0,0.809016994 -V --1,0 -BOT -0,13.32035285 -V -0,0.684547106 -V -0,0.728968627 -V --1,0 -BOT -0,13.44601656 -V -0,0.770513243 -V -0,0.63742399 -V --1,0 -BOT -0,13.57168026 -V -0,0.844327926 -V -0,0.535826795 -V --1,0 -BOT -0,13.69734397 -V -0,0.904827053 -V -0,0.425779292 -V --1,0 -BOT -0,13.82300768 -V -0,0.951056516 -V -0,0.309016994 -V --1,0 -BOT -0,13.94867138 -V -0,0.982287251 -V -0,0.187381315 -V --1,0 -BOT -0,14.07433509 -V -0,0.998026728 -V -0,0.06279052 -V --1,0 -BOT -0,14.19999879 -V -0,0.998026728 -V -0,-0.06279052 -V --1,0 -BOT -0,14.3256625 -V -0,0.982287251 -V -0,-0.187381315 -V --1,0 -BOT -0,14.45132621 -V -0,0.951056516 -V -0,-0.309016994 -V --1,0 -BOT -0,14.57698991 -V -0,0.904827053 -V -0,-0.425779292 -V --1,0 -BOT -0,14.70265362 -V -0,0.844327926 -V -0,-0.535826795 -V --1,0 -BOT -0,14.82831732 -V -0,0.770513243 -V -0,-0.63742399 -V --1,0 -BOT -0,14.95398103 -V -0,0.684547106 -V -0,-0.728968627 -V --1,0 -BOT -0,15.07964474 -V -0,0.587785252 -V -0,-0.809016994 -V --1,0 -BOT -0,15.20530844 -V -0,0.481753674 -V -0,-0.87630668 -V --1,0 -BOT -0,15.33097215 -V -0,0.368124553 -V -0,-0.929776486 -V --1,0 -BOT -0,15.45663586 -V -0,0.248689887 -V -0,-0.968583161 -V --1,0 -BOT -0,15.58229956 -V -0,0.125333234 -V -0,-0.992114701 -V --1,0 -BOT -0,15.70796327 -V -0,0 -V -0,-1 -V --1,0 -BOT -0,15.83362697 -V -0,-0.125333234 -V -0,-0.992114701 -V --1,0 -BOT -0,15.95929068 -V -0,-0.248689887 -V -0,-0.968583161 -V --1,0 -BOT -0,16.08495439 -V -0,-0.368124553 -V -0,-0.929776486 -V --1,0 -BOT -0,16.21061809 -V -0,-0.481753674 -V -0,-0.87630668 -V --1,0 -BOT -0,16.3362818 -V -0,-0.587785252 -V -0,-0.809016994 -V --1,0 -BOT -0,16.4619455 -V -0,-0.684547106 -V -0,-0.728968627 -V --1,0 -BOT -0,16.58760921 -V -0,-0.770513243 -V -0,-0.63742399 -V --1,0 -BOT -0,16.71327292 -V -0,-0.844327926 -V -0,-0.535826795 -V --1,0 -BOT -0,16.83893662 -V -0,-0.904827053 -V -0,-0.425779292 -V --1,0 -BOT -0,16.96460033 -V -0,-0.951056516 -V -0,-0.309016994 -V --1,0 -BOT -0,17.09026404 -V -0,-0.982287251 -V -0,-0.187381315 -V --1,0 -BOT -0,17.21592774 -V -0,-0.998026728 -V -0,-0.06279052 -V --1,0 -BOT -0,17.34159145 -V -0,-0.998026728 -V -0,0.06279052 -V --1,0 -BOT -0,17.46725515 -V -0,-0.982287251 -V -0,0.187381315 -V --1,0 -BOT -0,17.59291886 -V -0,-0.951056516 -V -0,0.309016994 -V --1,0 -BOT -0,17.71858257 -V -0,-0.904827053 -V -0,0.425779292 -V --1,0 -BOT -0,17.84424627 -V -0,-0.844327926 -V -0,0.535826795 -V --1,0 -BOT -0,17.96990998 -V -0,-0.770513243 -V -0,0.63742399 -V --1,0 -BOT -0,18.09557368 -V -0,-0.684547106 -V -0,0.728968627 -V --1,0 -BOT -0,18.22123739 -V -0,-0.587785252 -V -0,0.809016994 -V --1,0 -BOT -0,18.3469011 -V -0,-0.481753674 -V -0,0.87630668 -V --1,0 -BOT -0,18.4725648 -V -0,-0.368124553 -V -0,0.929776486 -V --1,0 -BOT -0,18.59822851 -V -0,-0.248689887 -V -0,0.968583161 -V --1,0 -BOT -0,18.72389222 -V -0,-0.125333234 -V -0,0.992114701 -V --1,0 -BOT -0,18.84955592 -V -0,0 -V -0,1 -V --1,0 -BOT -0,18.97521963 -V -0,0.125333234 -V -0,0.992114701 -V --1,0 -BOT -0,19.10088333 -V -0,0.248689887 -V -0,0.968583161 -V --1,0 -BOT -0,19.22654704 -V -0,0.368124553 -V -0,0.929776486 -V --1,0 -BOT -0,19.35221075 -V -0,0.481753674 -V -0,0.87630668 -V --1,0 -BOT -0,19.47787445 -V -0,0.587785252 -V -0,0.809016994 -V --1,0 -BOT -0,19.60353816 -V -0,0.684547106 -V -0,0.728968627 -V --1,0 -BOT -0,19.72920186 -V -0,0.770513243 -V -0,0.63742399 -V --1,0 -BOT -0,19.85486557 -V -0,0.844327926 -V -0,0.535826795 -V --1,0 -BOT -0,19.98052928 -V -0,0.904827053 -V -0,0.425779292 -V --1,0 -BOT -0,20.10619298 -V -0,0.951056516 -V -0,0.309016994 -V --1,0 -BOT -0,20.23185669 -V -0,0.982287251 -V -0,0.187381315 -V --1,0 -BOT -0,20.3575204 -V -0,0.998026728 -V -0,0.06279052 -V --1,0 -BOT -0,20.4831841 -V -0,0.998026728 -V -0,-0.06279052 -V --1,0 -BOT -0,20.60884781 -V -0,0.982287251 -V -0,-0.187381315 -V --1,0 -BOT -0,20.73451151 -V -0,0.951056516 -V -0,-0.309016994 -V --1,0 -BOT -0,20.86017522 -V -0,0.904827053 -V -0,-0.425779292 -V --1,0 -BOT -0,20.98583893 -V -0,0.844327926 -V -0,-0.535826795 -V --1,0 -BOT -0,21.11150263 -V -0,0.770513243 -V -0,-0.63742399 -V --1,0 -BOT -0,21.23716634 -V -0,0.684547106 -V -0,-0.728968627 -V --1,0 -BOT -0,21.36283004 -V -0,0.587785252 -V -0,-0.809016994 -V --1,0 -BOT -0,21.48849375 -V -0,0.481753674 -V -0,-0.87630668 -V --1,0 -BOT -0,21.61415746 -V -0,0.368124553 -V -0,-0.929776486 -V --1,0 -BOT -0,21.73982116 -V -0,0.248689887 -V -0,-0.968583161 -V --1,0 -BOT -0,21.86548487 -V -0,0.125333234 -V -0,-0.992114701 -V --1,0 -BOT -0,21.99114858 -V -0,0 -V -0,-1 -V --1,0 -BOT -0,22.11681228 -V -0,-0.125333234 -V -0,-0.992114701 -V --1,0 -BOT -0,22.24247599 -V -0,-0.248689887 -V -0,-0.968583161 -V --1,0 -BOT -0,22.36813969 -V -0,-0.368124553 -V -0,-0.929776486 -V --1,0 -BOT -0,22.4938034 -V -0,-0.481753674 -V -0,-0.87630668 -V --1,0 -BOT -0,22.61946711 -V -0,-0.587785252 -V -0,-0.809016994 -V --1,0 -BOT -0,22.74513081 -V -0,-0.684547106 -V -0,-0.728968627 -V --1,0 -BOT -0,22.87079452 -V -0,-0.770513243 -V -0,-0.63742399 -V --1,0 -BOT -0,22.99645822 -V -0,-0.844327926 -V -0,-0.535826795 -V --1,0 -BOT -0,23.12212193 -V -0,-0.904827053 -V -0,-0.425779292 -V --1,0 -BOT -0,23.24778564 -V -0,-0.951056516 -V -0,-0.309016994 -V --1,0 -BOT -0,23.37344934 -V -0,-0.982287251 -V -0,-0.187381315 -V --1,0 -BOT -0,23.49911305 -V -0,-0.998026728 -V -0,-0.06279052 -V --1,0 -BOT -0,23.62477676 -V -0,-0.998026728 -V -0,0.06279052 -V --1,0 -BOT -0,23.75044046 -V -0,-0.982287251 -V -0,0.187381315 -V --1,0 -BOT -0,23.87610417 -V -0,-0.951056516 -V -0,0.309016994 -V --1,0 -BOT -0,24.00176787 -V -0,-0.904827053 -V -0,0.425779292 -V --1,0 -BOT -0,24.12743158 -V -0,-0.844327926 -V -0,0.535826795 -V --1,0 -BOT -0,24.25309529 -V -0,-0.770513243 -V -0,0.63742399 -V --1,0 -BOT -0,24.37875899 -V -0,-0.684547106 -V -0,0.728968627 -V --1,0 -BOT -0,24.5044227 -V -0,-0.587785252 -V -0,0.809016994 -V --1,0 -BOT -0,24.6300864 -V -0,-0.481753674 -V -0,0.87630668 -V --1,0 -BOT -0,24.75575011 -V -0,-0.368124553 -V -0,0.929776486 -V --1,0 -BOT -0,24.88141382 -V -0,-0.248689887 -V -0,0.968583161 -V --1,0 -BOT -0,25.00707752 -V -0,-0.125333234 -V -0,0.992114701 -V --1,0 -EOD +TABLE +0,1 +"EXCEL" +VECTORS +0,201 +"" +TUPLES +0,3 +"" +DATA +0,0 +"" +-1,0 +BOT +1,0 +"x1" +1,0 +"y11" +1,0 +"y12" +-1,0 +BOT +0,0 +V +0,0 +V +0,1 +V +-1,0 +BOT +0,0.125663706 +V +0,0.125333234 +V +0,0.992114701 +V +-1,0 +BOT +0,0.251327412 +V +0,0.248689887 +V +0,0.968583161 +V +-1,0 +BOT +0,0.376991118 +V +0,0.368124553 +V +0,0.929776486 +V +-1,0 +BOT +0,0.502654825 +V +0,0.481753674 +V +0,0.87630668 +V +-1,0 +BOT +0,0.628318531 +V +0,0.587785252 +V +0,0.809016994 +V +-1,0 +BOT +0,0.753982237 +V +0,0.684547106 +V +0,0.728968627 +V +-1,0 +BOT +0,0.879645943 +V +0,0.770513243 +V +0,0.63742399 +V +-1,0 +BOT +0,1.005309649 +V +0,0.844327926 +V +0,0.535826795 +V +-1,0 +BOT +0,1.130973355 +V +0,0.904827053 +V +0,0.425779292 +V +-1,0 +BOT +0,1.256637061 +V +0,0.951056516 +V +0,0.309016994 +V +-1,0 +BOT +0,1.382300768 +V +0,0.982287251 +V +0,0.187381315 +V +-1,0 +BOT +0,1.507964474 +V +0,0.998026728 +V +0,0.06279052 +V +-1,0 +BOT +0,1.63362818 +V +0,0.998026728 +V +0,-0.06279052 +V +-1,0 +BOT +0,1.759291886 +V +0,0.982287251 +V +0,-0.187381315 +V +-1,0 +BOT +0,1.884955592 +V +0,0.951056516 +V +0,-0.309016994 +V +-1,0 +BOT +0,2.010619298 +V +0,0.904827053 +V +0,-0.425779292 +V +-1,0 +BOT +0,2.136283004 +V +0,0.844327926 +V +0,-0.535826795 +V +-1,0 +BOT +0,2.261946711 +V +0,0.770513243 +V +0,-0.63742399 +V +-1,0 +BOT +0,2.387610417 +V +0,0.684547106 +V +0,-0.728968627 +V +-1,0 +BOT +0,2.513274123 +V +0,0.587785252 +V +0,-0.809016994 +V +-1,0 +BOT +0,2.638937829 +V +0,0.481753674 +V +0,-0.87630668 +V +-1,0 +BOT +0,2.764601535 +V +0,0.368124553 +V +0,-0.929776486 +V +-1,0 +BOT +0,2.890265241 +V +0,0.248689887 +V +0,-0.968583161 +V +-1,0 +BOT +0,3.015928947 +V +0,0.125333234 +V +0,-0.992114701 +V +-1,0 +BOT +0,3.141592654 +V +0,0 +V +0,-1 +V +-1,0 +BOT +0,3.26725636 +V +0,-0.125333234 +V +0,-0.992114701 +V +-1,0 +BOT +0,3.392920066 +V +0,-0.248689887 +V +0,-0.968583161 +V +-1,0 +BOT +0,3.518583772 +V +0,-0.368124553 +V +0,-0.929776486 +V +-1,0 +BOT +0,3.644247478 +V +0,-0.481753674 +V +0,-0.87630668 +V +-1,0 +BOT +0,3.769911184 +V +0,-0.587785252 +V +0,-0.809016994 +V +-1,0 +BOT +0,3.895574891 +V +0,-0.684547106 +V +0,-0.728968627 +V +-1,0 +BOT +0,4.021238597 +V +0,-0.770513243 +V +0,-0.63742399 +V +-1,0 +BOT +0,4.146902303 +V +0,-0.844327926 +V +0,-0.535826795 +V +-1,0 +BOT +0,4.272566009 +V +0,-0.904827053 +V +0,-0.425779292 +V +-1,0 +BOT +0,4.398229715 +V +0,-0.951056516 +V +0,-0.309016994 +V +-1,0 +BOT +0,4.523893421 +V +0,-0.982287251 +V +0,-0.187381315 +V +-1,0 +BOT +0,4.649557127 +V +0,-0.998026728 +V +0,-0.06279052 +V +-1,0 +BOT +0,4.775220834 +V +0,-0.998026728 +V +0,0.06279052 +V +-1,0 +BOT +0,4.90088454 +V +0,-0.982287251 +V +0,0.187381315 +V +-1,0 +BOT +0,5.026548246 +V +0,-0.951056516 +V +0,0.309016994 +V +-1,0 +BOT +0,5.152211952 +V +0,-0.904827053 +V +0,0.425779292 +V +-1,0 +BOT +0,5.277875658 +V +0,-0.844327926 +V +0,0.535826795 +V +-1,0 +BOT +0,5.403539364 +V +0,-0.770513243 +V +0,0.63742399 +V +-1,0 +BOT +0,5.52920307 +V +0,-0.684547106 +V +0,0.728968627 +V +-1,0 +BOT +0,5.654866777 +V +0,-0.587785252 +V +0,0.809016994 +V +-1,0 +BOT +0,5.780530483 +V +0,-0.481753674 +V +0,0.87630668 +V +-1,0 +BOT +0,5.906194189 +V +0,-0.368124553 +V +0,0.929776486 +V +-1,0 +BOT +0,6.031857895 +V +0,-0.248689887 +V +0,0.968583161 +V +-1,0 +BOT +0,6.157521601 +V +0,-0.125333234 +V +0,0.992114701 +V +-1,0 +BOT +0,6.283185307 +V +0,0 +V +0,1 +V +-1,0 +BOT +0,6.408849013 +V +0,0.125333234 +V +0,0.992114701 +V +-1,0 +BOT +0,6.53451272 +V +0,0.248689887 +V +0,0.968583161 +V +-1,0 +BOT +0,6.660176426 +V +0,0.368124553 +V +0,0.929776486 +V +-1,0 +BOT +0,6.785840132 +V +0,0.481753674 +V +0,0.87630668 +V +-1,0 +BOT +0,6.911503838 +V +0,0.587785252 +V +0,0.809016994 +V +-1,0 +BOT +0,7.037167544 +V +0,0.684547106 +V +0,0.728968627 +V +-1,0 +BOT +0,7.16283125 +V +0,0.770513243 +V +0,0.63742399 +V +-1,0 +BOT +0,7.288494956 +V +0,0.844327926 +V +0,0.535826795 +V +-1,0 +BOT +0,7.414158663 +V +0,0.904827053 +V +0,0.425779292 +V +-1,0 +BOT +0,7.539822369 +V +0,0.951056516 +V +0,0.309016994 +V +-1,0 +BOT +0,7.665486075 +V +0,0.982287251 +V +0,0.187381315 +V +-1,0 +BOT +0,7.791149781 +V +0,0.998026728 +V +0,0.06279052 +V +-1,0 +BOT +0,7.916813487 +V +0,0.998026728 +V +0,-0.06279052 +V +-1,0 +BOT +0,8.042477193 +V +0,0.982287251 +V +0,-0.187381315 +V +-1,0 +BOT +0,8.168140899 +V +0,0.951056516 +V +0,-0.309016994 +V +-1,0 +BOT +0,8.293804606 +V +0,0.904827053 +V +0,-0.425779292 +V +-1,0 +BOT +0,8.419468312 +V +0,0.844327926 +V +0,-0.535826795 +V +-1,0 +BOT +0,8.545132018 +V +0,0.770513243 +V +0,-0.63742399 +V +-1,0 +BOT +0,8.670795724 +V +0,0.684547106 +V +0,-0.728968627 +V +-1,0 +BOT +0,8.79645943 +V +0,0.587785252 +V +0,-0.809016994 +V +-1,0 +BOT +0,8.922123136 +V +0,0.481753674 +V +0,-0.87630668 +V +-1,0 +BOT +0,9.047786842 +V +0,0.368124553 +V +0,-0.929776486 +V +-1,0 +BOT +0,9.173450549 +V +0,0.248689887 +V +0,-0.968583161 +V +-1,0 +BOT +0,9.299114255 +V +0,0.125333234 +V +0,-0.992114701 +V +-1,0 +BOT +0,9.424777961 +V +0,0 +V +0,-1 +V +-1,0 +BOT +0,9.550441667 +V +0,-0.125333234 +V +0,-0.992114701 +V +-1,0 +BOT +0,9.676105373 +V +0,-0.248689887 +V +0,-0.968583161 +V +-1,0 +BOT +0,9.801769079 +V +0,-0.368124553 +V +0,-0.929776486 +V +-1,0 +BOT +0,9.927432785 +V +0,-0.481753674 +V +0,-0.87630668 +V +-1,0 +BOT +0,10.05309649 +V +0,-0.587785252 +V +0,-0.809016994 +V +-1,0 +BOT +0,10.1787602 +V +0,-0.684547106 +V +0,-0.728968627 +V +-1,0 +BOT +0,10.3044239 +V +0,-0.770513243 +V +0,-0.63742399 +V +-1,0 +BOT +0,10.43008761 +V +0,-0.844327926 +V +0,-0.535826795 +V +-1,0 +BOT +0,10.55575132 +V +0,-0.904827053 +V +0,-0.425779292 +V +-1,0 +BOT +0,10.68141502 +V +0,-0.951056516 +V +0,-0.309016994 +V +-1,0 +BOT +0,10.80707873 +V +0,-0.982287251 +V +0,-0.187381315 +V +-1,0 +BOT +0,10.93274243 +V +0,-0.998026728 +V +0,-0.06279052 +V +-1,0 +BOT +0,11.05840614 +V +0,-0.998026728 +V +0,0.06279052 +V +-1,0 +BOT +0,11.18406985 +V +0,-0.982287251 +V +0,0.187381315 +V +-1,0 +BOT +0,11.30973355 +V +0,-0.951056516 +V +0,0.309016994 +V +-1,0 +BOT +0,11.43539726 +V +0,-0.904827053 +V +0,0.425779292 +V +-1,0 +BOT +0,11.56106097 +V +0,-0.844327926 +V +0,0.535826795 +V +-1,0 +BOT +0,11.68672467 +V +0,-0.770513243 +V +0,0.63742399 +V +-1,0 +BOT +0,11.81238838 +V +0,-0.684547106 +V +0,0.728968627 +V +-1,0 +BOT +0,11.93805208 +V +0,-0.587785252 +V +0,0.809016994 +V +-1,0 +BOT +0,12.06371579 +V +0,-0.481753674 +V +0,0.87630668 +V +-1,0 +BOT +0,12.1893795 +V +0,-0.368124553 +V +0,0.929776486 +V +-1,0 +BOT +0,12.3150432 +V +0,-0.248689887 +V +0,0.968583161 +V +-1,0 +BOT +0,12.44070691 +V +0,-0.125333234 +V +0,0.992114701 +V +-1,0 +BOT +0,12.56637061 +V +0,0 +V +0,1 +V +-1,0 +BOT +0,12.69203432 +V +0,0.125333234 +V +0,0.992114701 +V +-1,0 +BOT +0,12.81769803 +V +0,0.248689887 +V +0,0.968583161 +V +-1,0 +BOT +0,12.94336173 +V +0,0.368124553 +V +0,0.929776486 +V +-1,0 +BOT +0,13.06902544 +V +0,0.481753674 +V +0,0.87630668 +V +-1,0 +BOT +0,13.19468915 +V +0,0.587785252 +V +0,0.809016994 +V +-1,0 +BOT +0,13.32035285 +V +0,0.684547106 +V +0,0.728968627 +V +-1,0 +BOT +0,13.44601656 +V +0,0.770513243 +V +0,0.63742399 +V +-1,0 +BOT +0,13.57168026 +V +0,0.844327926 +V +0,0.535826795 +V +-1,0 +BOT +0,13.69734397 +V +0,0.904827053 +V +0,0.425779292 +V +-1,0 +BOT +0,13.82300768 +V +0,0.951056516 +V +0,0.309016994 +V +-1,0 +BOT +0,13.94867138 +V +0,0.982287251 +V +0,0.187381315 +V +-1,0 +BOT +0,14.07433509 +V +0,0.998026728 +V +0,0.06279052 +V +-1,0 +BOT +0,14.19999879 +V +0,0.998026728 +V +0,-0.06279052 +V +-1,0 +BOT +0,14.3256625 +V +0,0.982287251 +V +0,-0.187381315 +V +-1,0 +BOT +0,14.45132621 +V +0,0.951056516 +V +0,-0.309016994 +V +-1,0 +BOT +0,14.57698991 +V +0,0.904827053 +V +0,-0.425779292 +V +-1,0 +BOT +0,14.70265362 +V +0,0.844327926 +V +0,-0.535826795 +V +-1,0 +BOT +0,14.82831732 +V +0,0.770513243 +V +0,-0.63742399 +V +-1,0 +BOT +0,14.95398103 +V +0,0.684547106 +V +0,-0.728968627 +V +-1,0 +BOT +0,15.07964474 +V +0,0.587785252 +V +0,-0.809016994 +V +-1,0 +BOT +0,15.20530844 +V +0,0.481753674 +V +0,-0.87630668 +V +-1,0 +BOT +0,15.33097215 +V +0,0.368124553 +V +0,-0.929776486 +V +-1,0 +BOT +0,15.45663586 +V +0,0.248689887 +V +0,-0.968583161 +V +-1,0 +BOT +0,15.58229956 +V +0,0.125333234 +V +0,-0.992114701 +V +-1,0 +BOT +0,15.70796327 +V +0,0 +V +0,-1 +V +-1,0 +BOT +0,15.83362697 +V +0,-0.125333234 +V +0,-0.992114701 +V +-1,0 +BOT +0,15.95929068 +V +0,-0.248689887 +V +0,-0.968583161 +V +-1,0 +BOT +0,16.08495439 +V +0,-0.368124553 +V +0,-0.929776486 +V +-1,0 +BOT +0,16.21061809 +V +0,-0.481753674 +V +0,-0.87630668 +V +-1,0 +BOT +0,16.3362818 +V +0,-0.587785252 +V +0,-0.809016994 +V +-1,0 +BOT +0,16.4619455 +V +0,-0.684547106 +V +0,-0.728968627 +V +-1,0 +BOT +0,16.58760921 +V +0,-0.770513243 +V +0,-0.63742399 +V +-1,0 +BOT +0,16.71327292 +V +0,-0.844327926 +V +0,-0.535826795 +V +-1,0 +BOT +0,16.83893662 +V +0,-0.904827053 +V +0,-0.425779292 +V +-1,0 +BOT +0,16.96460033 +V +0,-0.951056516 +V +0,-0.309016994 +V +-1,0 +BOT +0,17.09026404 +V +0,-0.982287251 +V +0,-0.187381315 +V +-1,0 +BOT +0,17.21592774 +V +0,-0.998026728 +V +0,-0.06279052 +V +-1,0 +BOT +0,17.34159145 +V +0,-0.998026728 +V +0,0.06279052 +V +-1,0 +BOT +0,17.46725515 +V +0,-0.982287251 +V +0,0.187381315 +V +-1,0 +BOT +0,17.59291886 +V +0,-0.951056516 +V +0,0.309016994 +V +-1,0 +BOT +0,17.71858257 +V +0,-0.904827053 +V +0,0.425779292 +V +-1,0 +BOT +0,17.84424627 +V +0,-0.844327926 +V +0,0.535826795 +V +-1,0 +BOT +0,17.96990998 +V +0,-0.770513243 +V +0,0.63742399 +V +-1,0 +BOT +0,18.09557368 +V +0,-0.684547106 +V +0,0.728968627 +V +-1,0 +BOT +0,18.22123739 +V +0,-0.587785252 +V +0,0.809016994 +V +-1,0 +BOT +0,18.3469011 +V +0,-0.481753674 +V +0,0.87630668 +V +-1,0 +BOT +0,18.4725648 +V +0,-0.368124553 +V +0,0.929776486 +V +-1,0 +BOT +0,18.59822851 +V +0,-0.248689887 +V +0,0.968583161 +V +-1,0 +BOT +0,18.72389222 +V +0,-0.125333234 +V +0,0.992114701 +V +-1,0 +BOT +0,18.84955592 +V +0,0 +V +0,1 +V +-1,0 +BOT +0,18.97521963 +V +0,0.125333234 +V +0,0.992114701 +V +-1,0 +BOT +0,19.10088333 +V +0,0.248689887 +V +0,0.968583161 +V +-1,0 +BOT +0,19.22654704 +V +0,0.368124553 +V +0,0.929776486 +V +-1,0 +BOT +0,19.35221075 +V +0,0.481753674 +V +0,0.87630668 +V +-1,0 +BOT +0,19.47787445 +V +0,0.587785252 +V +0,0.809016994 +V +-1,0 +BOT +0,19.60353816 +V +0,0.684547106 +V +0,0.728968627 +V +-1,0 +BOT +0,19.72920186 +V +0,0.770513243 +V +0,0.63742399 +V +-1,0 +BOT +0,19.85486557 +V +0,0.844327926 +V +0,0.535826795 +V +-1,0 +BOT +0,19.98052928 +V +0,0.904827053 +V +0,0.425779292 +V +-1,0 +BOT +0,20.10619298 +V +0,0.951056516 +V +0,0.309016994 +V +-1,0 +BOT +0,20.23185669 +V +0,0.982287251 +V +0,0.187381315 +V +-1,0 +BOT +0,20.3575204 +V +0,0.998026728 +V +0,0.06279052 +V +-1,0 +BOT +0,20.4831841 +V +0,0.998026728 +V +0,-0.06279052 +V +-1,0 +BOT +0,20.60884781 +V +0,0.982287251 +V +0,-0.187381315 +V +-1,0 +BOT +0,20.73451151 +V +0,0.951056516 +V +0,-0.309016994 +V +-1,0 +BOT +0,20.86017522 +V +0,0.904827053 +V +0,-0.425779292 +V +-1,0 +BOT +0,20.98583893 +V +0,0.844327926 +V +0,-0.535826795 +V +-1,0 +BOT +0,21.11150263 +V +0,0.770513243 +V +0,-0.63742399 +V +-1,0 +BOT +0,21.23716634 +V +0,0.684547106 +V +0,-0.728968627 +V +-1,0 +BOT +0,21.36283004 +V +0,0.587785252 +V +0,-0.809016994 +V +-1,0 +BOT +0,21.48849375 +V +0,0.481753674 +V +0,-0.87630668 +V +-1,0 +BOT +0,21.61415746 +V +0,0.368124553 +V +0,-0.929776486 +V +-1,0 +BOT +0,21.73982116 +V +0,0.248689887 +V +0,-0.968583161 +V +-1,0 +BOT +0,21.86548487 +V +0,0.125333234 +V +0,-0.992114701 +V +-1,0 +BOT +0,21.99114858 +V +0,0 +V +0,-1 +V +-1,0 +BOT +0,22.11681228 +V +0,-0.125333234 +V +0,-0.992114701 +V +-1,0 +BOT +0,22.24247599 +V +0,-0.248689887 +V +0,-0.968583161 +V +-1,0 +BOT +0,22.36813969 +V +0,-0.368124553 +V +0,-0.929776486 +V +-1,0 +BOT +0,22.4938034 +V +0,-0.481753674 +V +0,-0.87630668 +V +-1,0 +BOT +0,22.61946711 +V +0,-0.587785252 +V +0,-0.809016994 +V +-1,0 +BOT +0,22.74513081 +V +0,-0.684547106 +V +0,-0.728968627 +V +-1,0 +BOT +0,22.87079452 +V +0,-0.770513243 +V +0,-0.63742399 +V +-1,0 +BOT +0,22.99645822 +V +0,-0.844327926 +V +0,-0.535826795 +V +-1,0 +BOT +0,23.12212193 +V +0,-0.904827053 +V +0,-0.425779292 +V +-1,0 +BOT +0,23.24778564 +V +0,-0.951056516 +V +0,-0.309016994 +V +-1,0 +BOT +0,23.37344934 +V +0,-0.982287251 +V +0,-0.187381315 +V +-1,0 +BOT +0,23.49911305 +V +0,-0.998026728 +V +0,-0.06279052 +V +-1,0 +BOT +0,23.62477676 +V +0,-0.998026728 +V +0,0.06279052 +V +-1,0 +BOT +0,23.75044046 +V +0,-0.982287251 +V +0,0.187381315 +V +-1,0 +BOT +0,23.87610417 +V +0,-0.951056516 +V +0,0.309016994 +V +-1,0 +BOT +0,24.00176787 +V +0,-0.904827053 +V +0,0.425779292 +V +-1,0 +BOT +0,24.12743158 +V +0,-0.844327926 +V +0,0.535826795 +V +-1,0 +BOT +0,24.25309529 +V +0,-0.770513243 +V +0,0.63742399 +V +-1,0 +BOT +0,24.37875899 +V +0,-0.684547106 +V +0,0.728968627 +V +-1,0 +BOT +0,24.5044227 +V +0,-0.587785252 +V +0,0.809016994 +V +-1,0 +BOT +0,24.6300864 +V +0,-0.481753674 +V +0,0.87630668 +V +-1,0 +BOT +0,24.75575011 +V +0,-0.368124553 +V +0,0.929776486 +V +-1,0 +BOT +0,24.88141382 +V +0,-0.248689887 +V +0,0.968583161 +V +-1,0 +BOT +0,25.00707752 +V +0,-0.125333234 +V +0,0.992114701 +V +-1,0 +EOD diff --git a/test/jkqtplot_test/test_excel.slk b/examples/jkqtplot_test/test_excel.slk similarity index 95% rename from test/jkqtplot_test/test_excel.slk rename to examples/jkqtplot_test/test_excel.slk index 6c51f04fbf..46092df107 100644 --- a/test/jkqtplot_test/test_excel.slk +++ b/examples/jkqtplot_test/test_excel.slk @@ -1,655 +1,655 @@ -ID;PWXL;N;E -P;PGeneral -P;P0 -P;P0.00 -P;P#,##0 -P;P#,##0.00 -P;P#,##0\ _(0;;\-#,##0\ _(0 -P;P#,##0\ _(0;;[Red]\-#,##0\ _(0 -P;P#,##0.00\ _(0;;\-#,##0.00\ _(0 -P;P#,##0.00\ _(0;;[Red]\-#,##0.00\ _(0 -P;P#,##0\ "$";;\-#,##0\ "$" -P;P#,##0\ "$";;[Red]\-#,##0\ "$" -P;P#,##0.00\ "$";;\-#,##0.00\ "$" -P;P#,##0.00\ "$";;[Red]\-#,##0.00\ "$" -P;P0% -P;P0.00% -P;P0.00E+00 -P;P##0.0E+0 -P;P#\ ?/? -P;P#\ ??/?? -P;Pdd/mm/yyyy -P;Pdd/\ mmm\ yy -P;Pdd/\ mmm -P;Pmmm\ yy -P;Ph:mm\ AM/PM -P;Ph:mm:ss\ AM/PM -P;Phh:mm -P;Phh:mm:ss -P;Pdd/mm/yyyy\ hh:mm -P;Pmm:ss -P;Pmm:ss.0 -P;P@ -P;P[h]:mm:ss -P;P_-* #,##0\ "$"_-;;\-* #,##0\ "$"_-;;_-* "-"\ "$"_-;;_-@_- -P;P_-* #,##0\ _(0_-;;\-* #,##0\ _(0_-;;_-* "-"\ _(0_-;;_-@_- -P;P_-* #,##0.00\ "$"_-;;\-* #,##0.00\ "$"_-;;_-* "-"??\ "$"_-;;_-@_- -P;P_-* #,##0.00\ _(0_-;;\-* #,##0.00\ _(0_-;;_-* "-"??\ _(0_-;;_-@_- -P;FArial;M200 -P;FArial;M200 -P;FArial;M200 -P;FArial;M200 -P;EArial;M200 -P;EArial;M200;SB -F;P0;DG0G10;M255 -B;Y201;X3;D0 0 200 2 -O;L;D;V0;K47;G100 0.001 -F;W1 256 11 -F;SBM1;R1 -F;SDBM6;Y1;X1 -C;N;K"x1" -F;SDBM6;X2 -C;N;K"y11" -F;SDBM6;X3 -C;N;K"y12" -C;Y2;X1;N;K0 -C;X2;N;K0 -C;X3;N;K1 -C;Y3;X1;N;K0.1256637061 -C;X2;N;K0.1253332336 -C;X3;N;K0.9921147013 -C;Y4;X1;N;K0.2513274123 -C;X2;N;K0.2486898872 -C;X3;N;K0.9685831611 -C;Y5;X1;N;K0.3769911184 -C;X2;N;K0.3681245527 -C;X3;N;K0.9297764859 -C;Y6;X1;N;K0.5026548246 -C;X2;N;K0.4817536741 -C;X3;N;K0.87630668 -C;Y7;X1;N;K0.6283185307 -C;X2;N;K0.5877852523 -C;X3;N;K0.8090169944 -C;Y8;X1;N;K0.7539822369 -C;X2;N;K0.6845471059 -C;X3;N;K0.7289686274 -C;Y9;X1;N;K0.879645943 -C;X2;N;K0.7705132428 -C;X3;N;K0.6374239897 -C;Y10;X1;N;K1.0053096491 -C;X2;N;K0.8443279255 -C;X3;N;K0.535826795 -C;Y11;X1;N;K1.1309733553 -C;X2;N;K0.9048270525 -C;X3;N;K0.4257792916 -C;Y12;X1;N;K1.2566370614 -C;X2;N;K0.9510565163 -C;X3;N;K0.3090169944 -C;Y13;X1;N;K1.3823007676 -C;X2;N;K0.9822872507 -C;X3;N;K0.1873813146 -C;Y14;X1;N;K1.5079644737 -C;X2;N;K0.9980267284 -C;X3;N;K0.0627905195 -C;Y15;X1;N;K1.6336281799 -C;X2;N;K0.9980267284 -C;X3;N;K-0.0627905195 -C;Y16;X1;N;K1.759291886 -C;X2;N;K0.9822872507 -C;X3;N;K-0.1873813146 -C;Y17;X1;N;K1.8849555922 -C;X2;N;K0.9510565163 -C;X3;N;K-0.3090169944 -C;Y18;X1;N;K2.0106192983 -C;X2;N;K0.9048270525 -C;X3;N;K-0.4257792916 -C;Y19;X1;N;K2.1362830044 -C;X2;N;K0.8443279255 -C;X3;N;K-0.535826795 -C;Y20;X1;N;K2.2619467106 -C;X2;N;K0.7705132428 -C;X3;N;K-0.6374239897 -C;Y21;X1;N;K2.3876104167 -C;X2;N;K0.6845471059 -C;X3;N;K-0.7289686274 -C;Y22;X1;N;K2.5132741229 -C;X2;N;K0.5877852523 -C;X3;N;K-0.8090169944 -C;Y23;X1;N;K2.638937829 -C;X2;N;K0.4817536741 -C;X3;N;K-0.87630668 -C;Y24;X1;N;K2.7646015352 -C;X2;N;K0.3681245527 -C;X3;N;K-0.9297764859 -C;Y25;X1;N;K2.8902652413 -C;X2;N;K0.2486898872 -C;X3;N;K-0.9685831611 -C;Y26;X1;N;K3.0159289474 -C;X2;N;K0.1253332336 -C;X3;N;K-0.9921147013 -C;Y27;X1;N;K3.1415926536 -C;X2;N;K0 -C;X3;N;K-1 -C;Y28;X1;N;K3.2672563597 -C;X2;N;K-0.1253332336 -C;X3;N;K-0.9921147013 -C;Y29;X1;N;K3.3929200659 -C;X2;N;K-0.2486898872 -C;X3;N;K-0.9685831611 -C;Y30;X1;N;K3.518583772 -C;X2;N;K-0.3681245527 -C;X3;N;K-0.9297764859 -C;Y31;X1;N;K3.6442474782 -C;X2;N;K-0.4817536741 -C;X3;N;K-0.87630668 -C;Y32;X1;N;K3.7699111843 -C;X2;N;K-0.5877852523 -C;X3;N;K-0.8090169944 -C;Y33;X1;N;K3.8955748905 -C;X2;N;K-0.6845471059 -C;X3;N;K-0.7289686274 -C;Y34;X1;N;K4.0212385966 -C;X2;N;K-0.7705132428 -C;X3;N;K-0.6374239897 -C;Y35;X1;N;K4.1469023027 -C;X2;N;K-0.8443279255 -C;X3;N;K-0.535826795 -C;Y36;X1;N;K4.2725660089 -C;X2;N;K-0.9048270525 -C;X3;N;K-0.4257792916 -C;Y37;X1;N;K4.398229715 -C;X2;N;K-0.9510565163 -C;X3;N;K-0.3090169944 -C;Y38;X1;N;K4.5238934212 -C;X2;N;K-0.9822872507 -C;X3;N;K-0.1873813146 -C;Y39;X1;N;K4.6495571273 -C;X2;N;K-0.9980267284 -C;X3;N;K-0.0627905195 -C;Y40;X1;N;K4.7752208335 -C;X2;N;K-0.9980267284 -C;X3;N;K0.0627905195 -C;Y41;X1;N;K4.9008845396 -C;X2;N;K-0.9822872507 -C;X3;N;K0.1873813146 -C;Y42;X1;N;K5.0265482457 -C;X2;N;K-0.9510565163 -C;X3;N;K0.3090169944 -C;Y43;X1;N;K5.1522119519 -C;X2;N;K-0.9048270525 -C;X3;N;K0.4257792916 -C;Y44;X1;N;K5.277875658 -C;X2;N;K-0.8443279255 -C;X3;N;K0.535826795 -C;Y45;X1;N;K5.4035393642 -C;X2;N;K-0.7705132428 -C;X3;N;K0.6374239897 -C;Y46;X1;N;K5.5292030703 -C;X2;N;K-0.6845471059 -C;X3;N;K0.7289686274 -C;Y47;X1;N;K5.6548667765 -C;X2;N;K-0.5877852523 -C;X3;N;K0.8090169944 -C;Y48;X1;N;K5.7805304826 -C;X2;N;K-0.4817536741 -C;X3;N;K0.87630668 -C;Y49;X1;N;K5.9061941887 -C;X2;N;K-0.3681245527 -C;X3;N;K0.9297764859 -C;Y50;X1;N;K6.0318578949 -C;X2;N;K-0.2486898872 -C;X3;N;K0.9685831611 -C;Y51;X1;N;K6.157521601 -C;X2;N;K-0.1253332336 -C;X3;N;K0.9921147013 -C;Y52;X1;N;K6.2831853072 -C;X2;N;K0 -C;X3;N;K1 -C;Y53;X1;N;K6.4088490133 -C;X2;N;K0.1253332336 -C;X3;N;K0.9921147013 -C;Y54;X1;N;K6.5345127195 -C;X2;N;K0.2486898872 -C;X3;N;K0.9685831611 -C;Y55;X1;N;K6.6601764256 -C;X2;N;K0.3681245527 -C;X3;N;K0.9297764859 -C;Y56;X1;N;K6.7858401318 -C;X2;N;K0.4817536741 -C;X3;N;K0.87630668 -C;Y57;X1;N;K6.9115038379 -C;X2;N;K0.5877852523 -C;X3;N;K0.8090169944 -C;Y58;X1;N;K7.037167544 -C;X2;N;K0.6845471059 -C;X3;N;K0.7289686274 -C;Y59;X1;N;K7.1628312502 -C;X2;N;K0.7705132428 -C;X3;N;K0.6374239897 -C;Y60;X1;N;K7.2884949563 -C;X2;N;K0.8443279255 -C;X3;N;K0.535826795 -C;Y61;X1;N;K7.4141586625 -C;X2;N;K0.9048270525 -C;X3;N;K0.4257792916 -C;Y62;X1;N;K7.5398223686 -C;X2;N;K0.9510565163 -C;X3;N;K0.3090169944 -C;Y63;X1;N;K7.6654860748 -C;X2;N;K0.9822872507 -C;X3;N;K0.1873813146 -C;Y64;X1;N;K7.7911497809 -C;X2;N;K0.9980267284 -C;X3;N;K0.0627905195 -C;Y65;X1;N;K7.916813487 -C;X2;N;K0.9980267284 -C;X3;N;K-0.0627905195 -C;Y66;X1;N;K8.0424771932 -C;X2;N;K0.9822872507 -C;X3;N;K-0.1873813146 -C;Y67;X1;N;K8.1681408993 -C;X2;N;K0.9510565163 -C;X3;N;K-0.3090169944 -C;Y68;X1;N;K8.2938046055 -C;X2;N;K0.9048270525 -C;X3;N;K-0.4257792916 -C;Y69;X1;N;K8.4194683116 -C;X2;N;K0.8443279255 -C;X3;N;K-0.535826795 -C;Y70;X1;N;K8.5451320178 -C;X2;N;K0.7705132428 -C;X3;N;K-0.6374239897 -C;Y71;X1;N;K8.6707957239 -C;X2;N;K0.6845471059 -C;X3;N;K-0.7289686274 -C;Y72;X1;N;K8.7964594301 -C;X2;N;K0.5877852523 -C;X3;N;K-0.8090169944 -C;Y73;X1;N;K8.9221231362 -C;X2;N;K0.4817536741 -C;X3;N;K-0.87630668 -C;Y74;X1;N;K9.0477868423 -C;X2;N;K0.3681245527 -C;X3;N;K-0.9297764859 -C;Y75;X1;N;K9.1734505485 -C;X2;N;K0.2486898872 -C;X3;N;K-0.9685831611 -C;Y76;X1;N;K9.2991142546 -C;X2;N;K0.1253332336 -C;X3;N;K-0.9921147013 -C;Y77;X1;N;K9.4247779608 -C;X2;N;K0 -C;X3;N;K-1 -C;Y78;X1;N;K9.5504416669 -C;X2;N;K-0.1253332336 -C;X3;N;K-0.9921147013 -C;Y79;X1;N;K9.6761053731 -C;X2;N;K-0.2486898872 -C;X3;N;K-0.9685831611 -C;Y80;X1;N;K9.8017690792 -C;X2;N;K-0.3681245527 -C;X3;N;K-0.9297764859 -C;Y81;X1;N;K9.9274327853 -C;X2;N;K-0.4817536741 -C;X3;N;K-0.87630668 -C;Y82;X1;N;K10.0530964915 -C;X2;N;K-0.5877852523 -C;X3;N;K-0.8090169944 -C;Y83;X1;N;K10.1787601976 -C;X2;N;K-0.6845471059 -C;X3;N;K-0.7289686274 -C;Y84;X1;N;K10.3044239038 -C;X2;N;K-0.7705132428 -C;X3;N;K-0.6374239897 -C;Y85;X1;N;K10.4300876099 -C;X2;N;K-0.8443279255 -C;X3;N;K-0.535826795 -C;Y86;X1;N;K10.5557513161 -C;X2;N;K-0.9048270525 -C;X3;N;K-0.4257792916 -C;Y87;X1;N;K10.6814150222 -C;X2;N;K-0.9510565163 -C;X3;N;K-0.3090169944 -C;Y88;X1;N;K10.8070787283 -C;X2;N;K-0.9822872507 -C;X3;N;K-0.1873813146 -C;Y89;X1;N;K10.9327424345 -C;X2;N;K-0.9980267284 -C;X3;N;K-0.0627905195 -C;Y90;X1;N;K11.0584061406 -C;X2;N;K-0.9980267284 -C;X3;N;K0.0627905195 -C;Y91;X1;N;K11.1840698468 -C;X2;N;K-0.9822872507 -C;X3;N;K0.1873813146 -C;Y92;X1;N;K11.3097335529 -C;X2;N;K-0.9510565163 -C;X3;N;K0.3090169944 -C;Y93;X1;N;K11.4353972591 -C;X2;N;K-0.9048270525 -C;X3;N;K0.4257792916 -C;Y94;X1;N;K11.5610609652 -C;X2;N;K-0.8443279255 -C;X3;N;K0.535826795 -C;Y95;X1;N;K11.6867246714 -C;X2;N;K-0.7705132428 -C;X3;N;K0.6374239897 -C;Y96;X1;N;K11.8123883775 -C;X2;N;K-0.6845471059 -C;X3;N;K0.7289686274 -C;Y97;X1;N;K11.9380520836 -C;X2;N;K-0.5877852523 -C;X3;N;K0.8090169944 -C;Y98;X1;N;K12.0637157898 -C;X2;N;K-0.4817536741 -C;X3;N;K0.87630668 -C;Y99;X1;N;K12.1893794959 -C;X2;N;K-0.3681245527 -C;X3;N;K0.9297764859 -C;Y100;X1;N;K12.3150432021 -C;X2;N;K-0.2486898872 -C;X3;N;K0.9685831611 -C;Y101;X1;N;K12.4407069082 -C;X2;N;K-0.1253332336 -C;X3;N;K0.9921147013 -C;Y102;X1;N;K12.5663706144 -C;X2;N;K0 -C;X3;N;K1 -C;Y103;X1;N;K12.6920343205 -C;X2;N;K0.1253332336 -C;X3;N;K0.9921147013 -C;Y104;X1;N;K12.8176980266 -C;X2;N;K0.2486898872 -C;X3;N;K0.9685831611 -C;Y105;X1;N;K12.9433617328 -C;X2;N;K0.3681245527 -C;X3;N;K0.9297764859 -C;Y106;X1;N;K13.0690254389 -C;X2;N;K0.4817536741 -C;X3;N;K0.87630668 -C;Y107;X1;N;K13.1946891451 -C;X2;N;K0.5877852523 -C;X3;N;K0.8090169944 -C;Y108;X1;N;K13.3203528512 -C;X2;N;K0.6845471059 -C;X3;N;K0.7289686274 -C;Y109;X1;N;K13.4460165574 -C;X2;N;K0.7705132428 -C;X3;N;K0.6374239897 -C;Y110;X1;N;K13.5716802635 -C;X2;N;K0.8443279255 -C;X3;N;K0.535826795 -C;Y111;X1;N;K13.6973439697 -C;X2;N;K0.9048270525 -C;X3;N;K0.4257792916 -C;Y112;X1;N;K13.8230076758 -C;X2;N;K0.9510565163 -C;X3;N;K0.3090169944 -C;Y113;X1;N;K13.9486713819 -C;X2;N;K0.9822872507 -C;X3;N;K0.1873813146 -C;Y114;X1;N;K14.0743350881 -C;X2;N;K0.9980267284 -C;X3;N;K0.0627905195 -C;Y115;X1;N;K14.1999987942 -C;X2;N;K0.9980267284 -C;X3;N;K-0.0627905195 -C;Y116;X1;N;K14.3256625004 -C;X2;N;K0.9822872507 -C;X3;N;K-0.1873813146 -C;Y117;X1;N;K14.4513262065 -C;X2;N;K0.9510565163 -C;X3;N;K-0.3090169944 -C;Y118;X1;N;K14.5769899127 -C;X2;N;K0.9048270525 -C;X3;N;K-0.4257792916 -C;Y119;X1;N;K14.7026536188 -C;X2;N;K0.8443279255 -C;X3;N;K-0.535826795 -C;Y120;X1;N;K14.8283173249 -C;X2;N;K0.7705132428 -C;X3;N;K-0.6374239897 -C;Y121;X1;N;K14.9539810311 -C;X2;N;K0.6845471059 -C;X3;N;K-0.7289686274 -C;Y122;X1;N;K15.0796447372 -C;X2;N;K0.5877852523 -C;X3;N;K-0.8090169944 -C;Y123;X1;N;K15.2053084434 -C;X2;N;K0.4817536741 -C;X3;N;K-0.87630668 -C;Y124;X1;N;K15.3309721495 -C;X2;N;K0.3681245527 -C;X3;N;K-0.9297764859 -C;Y125;X1;N;K15.4566358557 -C;X2;N;K0.2486898872 -C;X3;N;K-0.9685831611 -C;Y126;X1;N;K15.5822995618 -C;X2;N;K0.1253332336 -C;X3;N;K-0.9921147013 -C;Y127;X1;N;K15.7079632679 -C;X2;N;K0 -C;X3;N;K-1 -C;Y128;X1;N;K15.8336269741 -C;X2;N;K-0.1253332336 -C;X3;N;K-0.9921147013 -C;Y129;X1;N;K15.9592906802 -C;X2;N;K-0.2486898872 -C;X3;N;K-0.9685831611 -C;Y130;X1;N;K16.0849543864 -C;X2;N;K-0.3681245527 -C;X3;N;K-0.9297764859 -C;Y131;X1;N;K16.2106180925 -C;X2;N;K-0.4817536741 -C;X3;N;K-0.87630668 -C;Y132;X1;N;K16.3362817987 -C;X2;N;K-0.5877852523 -C;X3;N;K-0.8090169944 -C;Y133;X1;N;K16.4619455048 -C;X2;N;K-0.6845471059 -C;X3;N;K-0.7289686274 -C;Y134;X1;N;K16.587609211 -C;X2;N;K-0.7705132428 -C;X3;N;K-0.6374239897 -C;Y135;X1;N;K16.7132729171 -C;X2;N;K-0.8443279255 -C;X3;N;K-0.535826795 -C;Y136;X1;N;K16.8389366232 -C;X2;N;K-0.9048270525 -C;X3;N;K-0.4257792916 -C;Y137;X1;N;K16.9646003294 -C;X2;N;K-0.9510565163 -C;X3;N;K-0.3090169944 -C;Y138;X1;N;K17.0902640355 -C;X2;N;K-0.9822872507 -C;X3;N;K-0.1873813146 -C;Y139;X1;N;K17.2159277417 -C;X2;N;K-0.9980267284 -C;X3;N;K-0.0627905195 -C;Y140;X1;N;K17.3415914478 -C;X2;N;K-0.9980267284 -C;X3;N;K0.0627905195 -C;Y141;X1;N;K17.467255154 -C;X2;N;K-0.9822872507 -C;X3;N;K0.1873813146 -C;Y142;X1;N;K17.5929188601 -C;X2;N;K-0.9510565163 -C;X3;N;K0.3090169944 -C;Y143;X1;N;K17.7185825662 -C;X2;N;K-0.9048270525 -C;X3;N;K0.4257792916 -C;Y144;X1;N;K17.8442462724 -C;X2;N;K-0.8443279255 -C;X3;N;K0.535826795 -C;Y145;X1;N;K17.9699099785 -C;X2;N;K-0.7705132428 -C;X3;N;K0.6374239897 -C;Y146;X1;N;K18.0955736847 -C;X2;N;K-0.6845471059 -C;X3;N;K0.7289686274 -C;Y147;X1;N;K18.2212373908 -C;X2;N;K-0.5877852523 -C;X3;N;K0.8090169944 -C;Y148;X1;N;K18.346901097 -C;X2;N;K-0.4817536741 -C;X3;N;K0.87630668 -C;Y149;X1;N;K18.4725648031 -C;X2;N;K-0.3681245527 -C;X3;N;K0.9297764859 -C;Y150;X1;N;K18.5982285093 -C;X2;N;K-0.2486898872 -C;X3;N;K0.9685831611 -C;Y151;X1;N;K18.7238922154 -C;X2;N;K-0.1253332336 -C;X3;N;K0.9921147013 -C;Y152;X1;N;K18.8495559215 -C;X2;N;K0 -C;X3;N;K1 -C;Y153;X1;N;K18.9752196277 -C;X2;N;K0.1253332336 -C;X3;N;K0.9921147013 -C;Y154;X1;N;K19.1008833338 -C;X2;N;K0.2486898872 -C;X3;N;K0.9685831611 -C;Y155;X1;N;K19.22654704 -C;X2;N;K0.3681245527 -C;X3;N;K0.9297764859 -C;Y156;X1;N;K19.3522107461 -C;X2;N;K0.4817536741 -C;X3;N;K0.87630668 -C;Y157;X1;N;K19.4778744523 -C;X2;N;K0.5877852523 -C;X3;N;K0.8090169944 -C;Y158;X1;N;K19.6035381584 -C;X2;N;K0.6845471059 -C;X3;N;K0.7289686274 -C;Y159;X1;N;K19.7292018645 -C;X2;N;K0.7705132428 -C;X3;N;K0.6374239897 -C;Y160;X1;N;K19.8548655707 -C;X2;N;K0.8443279255 -C;X3;N;K0.535826795 -C;Y161;X1;N;K19.9805292768 -C;X2;N;K0.9048270525 -C;X3;N;K0.4257792916 -C;Y162;X1;N;K20.106192983 -C;X2;N;K0.9510565163 -C;X3;N;K0.3090169944 -C;Y163;X1;N;K20.2318566891 -C;X2;N;K0.9822872507 -C;X3;N;K0.1873813146 -C;Y164;X1;N;K20.3575203953 -C;X2;N;K0.9980267284 -C;X3;N;K0.0627905195 -C;Y165;X1;N;K20.4831841014 -C;X2;N;K0.9980267284 -C;X3;N;K-0.0627905195 -C;Y166;X1;N;K20.6088478075 -C;X2;N;K0.9822872507 -C;X3;N;K-0.1873813146 -C;Y167;X1;N;K20.7345115137 -C;X2;N;K0.9510565163 -C;X3;N;K-0.3090169944 -C;Y168;X1;N;K20.8601752198 -C;X2;N;K0.9048270525 -C;X3;N;K-0.4257792916 -C;Y169;X1;N;K20.985838926 -C;X2;N;K0.8443279255 -C;X3;N;K-0.535826795 -C;Y170;X1;N;K21.1115026321 -C;X2;N;K0.7705132428 -C;X3;N;K-0.6374239897 -C;Y171;X1;N;K21.2371663383 -C;X2;N;K0.6845471059 -C;X3;N;K-0.7289686274 -C;Y172;X1;N;K21.3628300444 -C;X2;N;K0.5877852523 -C;X3;N;K-0.8090169944 -C;Y173;X1;N;K21.4884937506 -C;X2;N;K0.4817536741 -C;X3;N;K-0.87630668 -C;Y174;X1;N;K21.6141574567 -C;X2;N;K0.3681245527 -C;X3;N;K-0.9297764859 -C;Y175;X1;N;K21.7398211628 -C;X2;N;K0.2486898872 -C;X3;N;K-0.9685831611 -C;Y176;X1;N;K21.865484869 -C;X2;N;K0.1253332336 -C;X3;N;K-0.9921147013 -C;Y177;X1;N;K21.9911485751 -C;X2;N;K0 -C;X3;N;K-1 -C;Y178;X1;N;K22.1168122813 -C;X2;N;K-0.1253332336 -C;X3;N;K-0.9921147013 -C;Y179;X1;N;K22.2424759874 -C;X2;N;K-0.2486898872 -C;X3;N;K-0.9685831611 -C;Y180;X1;N;K22.3681396936 -C;X2;N;K-0.3681245527 -C;X3;N;K-0.9297764859 -C;Y181;X1;N;K22.4938033997 -C;X2;N;K-0.4817536741 -C;X3;N;K-0.87630668 -C;Y182;X1;N;K22.6194671058 -C;X2;N;K-0.5877852523 -C;X3;N;K-0.8090169944 -C;Y183;X1;N;K22.745130812 -C;X2;N;K-0.6845471059 -C;X3;N;K-0.7289686274 -C;Y184;X1;N;K22.8707945181 -C;X2;N;K-0.7705132428 -C;X3;N;K-0.6374239897 -C;Y185;X1;N;K22.9964582243 -C;X2;N;K-0.8443279255 -C;X3;N;K-0.535826795 -C;Y186;X1;N;K23.1221219304 -C;X2;N;K-0.9048270525 -C;X3;N;K-0.4257792916 -C;Y187;X1;N;K23.2477856366 -C;X2;N;K-0.9510565163 -C;X3;N;K-0.3090169944 -C;Y188;X1;N;K23.3734493427 -C;X2;N;K-0.9822872507 -C;X3;N;K-0.1873813146 -C;Y189;X1;N;K23.4991130489 -C;X2;N;K-0.9980267284 -C;X3;N;K-0.0627905195 -C;Y190;X1;N;K23.624776755 -C;X2;N;K-0.9980267284 -C;X3;N;K0.0627905195 -C;Y191;X1;N;K23.7504404611 -C;X2;N;K-0.9822872507 -C;X3;N;K0.1873813146 -C;Y192;X1;N;K23.8761041673 -C;X2;N;K-0.9510565163 -C;X3;N;K0.3090169944 -C;Y193;X1;N;K24.0017678734 -C;X2;N;K-0.9048270525 -C;X3;N;K0.4257792916 -C;Y194;X1;N;K24.1274315796 -C;X2;N;K-0.8443279255 -C;X3;N;K0.535826795 -C;Y195;X1;N;K24.2530952857 -C;X2;N;K-0.7705132428 -C;X3;N;K0.6374239897 -C;Y196;X1;N;K24.3787589919 -C;X2;N;K-0.6845471059 -C;X3;N;K0.7289686274 -C;Y197;X1;N;K24.504422698 -C;X2;N;K-0.5877852523 -C;X3;N;K0.8090169944 -C;Y198;X1;N;K24.6300864041 -C;X2;N;K-0.4817536741 -C;X3;N;K0.87630668 -C;Y199;X1;N;K24.7557501103 -C;X2;N;K-0.3681245527 -C;X3;N;K0.9297764859 -C;Y200;X1;N;K24.8814138164 -C;X2;N;K-0.2486898872 -C;X3;N;K0.9685831611 -C;Y201;X1;N;K25.0070775226 -C;X2;N;K-0.1253332336 -C;X3;N;K0.9921147013 -E +ID;PWXL;N;E +P;PGeneral +P;P0 +P;P0.00 +P;P#,##0 +P;P#,##0.00 +P;P#,##0\ _(0;;\-#,##0\ _(0 +P;P#,##0\ _(0;;[Red]\-#,##0\ _(0 +P;P#,##0.00\ _(0;;\-#,##0.00\ _(0 +P;P#,##0.00\ _(0;;[Red]\-#,##0.00\ _(0 +P;P#,##0\ "$";;\-#,##0\ "$" +P;P#,##0\ "$";;[Red]\-#,##0\ "$" +P;P#,##0.00\ "$";;\-#,##0.00\ "$" +P;P#,##0.00\ "$";;[Red]\-#,##0.00\ "$" +P;P0% +P;P0.00% +P;P0.00E+00 +P;P##0.0E+0 +P;P#\ ?/? +P;P#\ ??/?? +P;Pdd/mm/yyyy +P;Pdd/\ mmm\ yy +P;Pdd/\ mmm +P;Pmmm\ yy +P;Ph:mm\ AM/PM +P;Ph:mm:ss\ AM/PM +P;Phh:mm +P;Phh:mm:ss +P;Pdd/mm/yyyy\ hh:mm +P;Pmm:ss +P;Pmm:ss.0 +P;P@ +P;P[h]:mm:ss +P;P_-* #,##0\ "$"_-;;\-* #,##0\ "$"_-;;_-* "-"\ "$"_-;;_-@_- +P;P_-* #,##0\ _(0_-;;\-* #,##0\ _(0_-;;_-* "-"\ _(0_-;;_-@_- +P;P_-* #,##0.00\ "$"_-;;\-* #,##0.00\ "$"_-;;_-* "-"??\ "$"_-;;_-@_- +P;P_-* #,##0.00\ _(0_-;;\-* #,##0.00\ _(0_-;;_-* "-"??\ _(0_-;;_-@_- +P;FArial;M200 +P;FArial;M200 +P;FArial;M200 +P;FArial;M200 +P;EArial;M200 +P;EArial;M200;SB +F;P0;DG0G10;M255 +B;Y201;X3;D0 0 200 2 +O;L;D;V0;K47;G100 0.001 +F;W1 256 11 +F;SBM1;R1 +F;SDBM6;Y1;X1 +C;N;K"x1" +F;SDBM6;X2 +C;N;K"y11" +F;SDBM6;X3 +C;N;K"y12" +C;Y2;X1;N;K0 +C;X2;N;K0 +C;X3;N;K1 +C;Y3;X1;N;K0.1256637061 +C;X2;N;K0.1253332336 +C;X3;N;K0.9921147013 +C;Y4;X1;N;K0.2513274123 +C;X2;N;K0.2486898872 +C;X3;N;K0.9685831611 +C;Y5;X1;N;K0.3769911184 +C;X2;N;K0.3681245527 +C;X3;N;K0.9297764859 +C;Y6;X1;N;K0.5026548246 +C;X2;N;K0.4817536741 +C;X3;N;K0.87630668 +C;Y7;X1;N;K0.6283185307 +C;X2;N;K0.5877852523 +C;X3;N;K0.8090169944 +C;Y8;X1;N;K0.7539822369 +C;X2;N;K0.6845471059 +C;X3;N;K0.7289686274 +C;Y9;X1;N;K0.879645943 +C;X2;N;K0.7705132428 +C;X3;N;K0.6374239897 +C;Y10;X1;N;K1.0053096491 +C;X2;N;K0.8443279255 +C;X3;N;K0.535826795 +C;Y11;X1;N;K1.1309733553 +C;X2;N;K0.9048270525 +C;X3;N;K0.4257792916 +C;Y12;X1;N;K1.2566370614 +C;X2;N;K0.9510565163 +C;X3;N;K0.3090169944 +C;Y13;X1;N;K1.3823007676 +C;X2;N;K0.9822872507 +C;X3;N;K0.1873813146 +C;Y14;X1;N;K1.5079644737 +C;X2;N;K0.9980267284 +C;X3;N;K0.0627905195 +C;Y15;X1;N;K1.6336281799 +C;X2;N;K0.9980267284 +C;X3;N;K-0.0627905195 +C;Y16;X1;N;K1.759291886 +C;X2;N;K0.9822872507 +C;X3;N;K-0.1873813146 +C;Y17;X1;N;K1.8849555922 +C;X2;N;K0.9510565163 +C;X3;N;K-0.3090169944 +C;Y18;X1;N;K2.0106192983 +C;X2;N;K0.9048270525 +C;X3;N;K-0.4257792916 +C;Y19;X1;N;K2.1362830044 +C;X2;N;K0.8443279255 +C;X3;N;K-0.535826795 +C;Y20;X1;N;K2.2619467106 +C;X2;N;K0.7705132428 +C;X3;N;K-0.6374239897 +C;Y21;X1;N;K2.3876104167 +C;X2;N;K0.6845471059 +C;X3;N;K-0.7289686274 +C;Y22;X1;N;K2.5132741229 +C;X2;N;K0.5877852523 +C;X3;N;K-0.8090169944 +C;Y23;X1;N;K2.638937829 +C;X2;N;K0.4817536741 +C;X3;N;K-0.87630668 +C;Y24;X1;N;K2.7646015352 +C;X2;N;K0.3681245527 +C;X3;N;K-0.9297764859 +C;Y25;X1;N;K2.8902652413 +C;X2;N;K0.2486898872 +C;X3;N;K-0.9685831611 +C;Y26;X1;N;K3.0159289474 +C;X2;N;K0.1253332336 +C;X3;N;K-0.9921147013 +C;Y27;X1;N;K3.1415926536 +C;X2;N;K0 +C;X3;N;K-1 +C;Y28;X1;N;K3.2672563597 +C;X2;N;K-0.1253332336 +C;X3;N;K-0.9921147013 +C;Y29;X1;N;K3.3929200659 +C;X2;N;K-0.2486898872 +C;X3;N;K-0.9685831611 +C;Y30;X1;N;K3.518583772 +C;X2;N;K-0.3681245527 +C;X3;N;K-0.9297764859 +C;Y31;X1;N;K3.6442474782 +C;X2;N;K-0.4817536741 +C;X3;N;K-0.87630668 +C;Y32;X1;N;K3.7699111843 +C;X2;N;K-0.5877852523 +C;X3;N;K-0.8090169944 +C;Y33;X1;N;K3.8955748905 +C;X2;N;K-0.6845471059 +C;X3;N;K-0.7289686274 +C;Y34;X1;N;K4.0212385966 +C;X2;N;K-0.7705132428 +C;X3;N;K-0.6374239897 +C;Y35;X1;N;K4.1469023027 +C;X2;N;K-0.8443279255 +C;X3;N;K-0.535826795 +C;Y36;X1;N;K4.2725660089 +C;X2;N;K-0.9048270525 +C;X3;N;K-0.4257792916 +C;Y37;X1;N;K4.398229715 +C;X2;N;K-0.9510565163 +C;X3;N;K-0.3090169944 +C;Y38;X1;N;K4.5238934212 +C;X2;N;K-0.9822872507 +C;X3;N;K-0.1873813146 +C;Y39;X1;N;K4.6495571273 +C;X2;N;K-0.9980267284 +C;X3;N;K-0.0627905195 +C;Y40;X1;N;K4.7752208335 +C;X2;N;K-0.9980267284 +C;X3;N;K0.0627905195 +C;Y41;X1;N;K4.9008845396 +C;X2;N;K-0.9822872507 +C;X3;N;K0.1873813146 +C;Y42;X1;N;K5.0265482457 +C;X2;N;K-0.9510565163 +C;X3;N;K0.3090169944 +C;Y43;X1;N;K5.1522119519 +C;X2;N;K-0.9048270525 +C;X3;N;K0.4257792916 +C;Y44;X1;N;K5.277875658 +C;X2;N;K-0.8443279255 +C;X3;N;K0.535826795 +C;Y45;X1;N;K5.4035393642 +C;X2;N;K-0.7705132428 +C;X3;N;K0.6374239897 +C;Y46;X1;N;K5.5292030703 +C;X2;N;K-0.6845471059 +C;X3;N;K0.7289686274 +C;Y47;X1;N;K5.6548667765 +C;X2;N;K-0.5877852523 +C;X3;N;K0.8090169944 +C;Y48;X1;N;K5.7805304826 +C;X2;N;K-0.4817536741 +C;X3;N;K0.87630668 +C;Y49;X1;N;K5.9061941887 +C;X2;N;K-0.3681245527 +C;X3;N;K0.9297764859 +C;Y50;X1;N;K6.0318578949 +C;X2;N;K-0.2486898872 +C;X3;N;K0.9685831611 +C;Y51;X1;N;K6.157521601 +C;X2;N;K-0.1253332336 +C;X3;N;K0.9921147013 +C;Y52;X1;N;K6.2831853072 +C;X2;N;K0 +C;X3;N;K1 +C;Y53;X1;N;K6.4088490133 +C;X2;N;K0.1253332336 +C;X3;N;K0.9921147013 +C;Y54;X1;N;K6.5345127195 +C;X2;N;K0.2486898872 +C;X3;N;K0.9685831611 +C;Y55;X1;N;K6.6601764256 +C;X2;N;K0.3681245527 +C;X3;N;K0.9297764859 +C;Y56;X1;N;K6.7858401318 +C;X2;N;K0.4817536741 +C;X3;N;K0.87630668 +C;Y57;X1;N;K6.9115038379 +C;X2;N;K0.5877852523 +C;X3;N;K0.8090169944 +C;Y58;X1;N;K7.037167544 +C;X2;N;K0.6845471059 +C;X3;N;K0.7289686274 +C;Y59;X1;N;K7.1628312502 +C;X2;N;K0.7705132428 +C;X3;N;K0.6374239897 +C;Y60;X1;N;K7.2884949563 +C;X2;N;K0.8443279255 +C;X3;N;K0.535826795 +C;Y61;X1;N;K7.4141586625 +C;X2;N;K0.9048270525 +C;X3;N;K0.4257792916 +C;Y62;X1;N;K7.5398223686 +C;X2;N;K0.9510565163 +C;X3;N;K0.3090169944 +C;Y63;X1;N;K7.6654860748 +C;X2;N;K0.9822872507 +C;X3;N;K0.1873813146 +C;Y64;X1;N;K7.7911497809 +C;X2;N;K0.9980267284 +C;X3;N;K0.0627905195 +C;Y65;X1;N;K7.916813487 +C;X2;N;K0.9980267284 +C;X3;N;K-0.0627905195 +C;Y66;X1;N;K8.0424771932 +C;X2;N;K0.9822872507 +C;X3;N;K-0.1873813146 +C;Y67;X1;N;K8.1681408993 +C;X2;N;K0.9510565163 +C;X3;N;K-0.3090169944 +C;Y68;X1;N;K8.2938046055 +C;X2;N;K0.9048270525 +C;X3;N;K-0.4257792916 +C;Y69;X1;N;K8.4194683116 +C;X2;N;K0.8443279255 +C;X3;N;K-0.535826795 +C;Y70;X1;N;K8.5451320178 +C;X2;N;K0.7705132428 +C;X3;N;K-0.6374239897 +C;Y71;X1;N;K8.6707957239 +C;X2;N;K0.6845471059 +C;X3;N;K-0.7289686274 +C;Y72;X1;N;K8.7964594301 +C;X2;N;K0.5877852523 +C;X3;N;K-0.8090169944 +C;Y73;X1;N;K8.9221231362 +C;X2;N;K0.4817536741 +C;X3;N;K-0.87630668 +C;Y74;X1;N;K9.0477868423 +C;X2;N;K0.3681245527 +C;X3;N;K-0.9297764859 +C;Y75;X1;N;K9.1734505485 +C;X2;N;K0.2486898872 +C;X3;N;K-0.9685831611 +C;Y76;X1;N;K9.2991142546 +C;X2;N;K0.1253332336 +C;X3;N;K-0.9921147013 +C;Y77;X1;N;K9.4247779608 +C;X2;N;K0 +C;X3;N;K-1 +C;Y78;X1;N;K9.5504416669 +C;X2;N;K-0.1253332336 +C;X3;N;K-0.9921147013 +C;Y79;X1;N;K9.6761053731 +C;X2;N;K-0.2486898872 +C;X3;N;K-0.9685831611 +C;Y80;X1;N;K9.8017690792 +C;X2;N;K-0.3681245527 +C;X3;N;K-0.9297764859 +C;Y81;X1;N;K9.9274327853 +C;X2;N;K-0.4817536741 +C;X3;N;K-0.87630668 +C;Y82;X1;N;K10.0530964915 +C;X2;N;K-0.5877852523 +C;X3;N;K-0.8090169944 +C;Y83;X1;N;K10.1787601976 +C;X2;N;K-0.6845471059 +C;X3;N;K-0.7289686274 +C;Y84;X1;N;K10.3044239038 +C;X2;N;K-0.7705132428 +C;X3;N;K-0.6374239897 +C;Y85;X1;N;K10.4300876099 +C;X2;N;K-0.8443279255 +C;X3;N;K-0.535826795 +C;Y86;X1;N;K10.5557513161 +C;X2;N;K-0.9048270525 +C;X3;N;K-0.4257792916 +C;Y87;X1;N;K10.6814150222 +C;X2;N;K-0.9510565163 +C;X3;N;K-0.3090169944 +C;Y88;X1;N;K10.8070787283 +C;X2;N;K-0.9822872507 +C;X3;N;K-0.1873813146 +C;Y89;X1;N;K10.9327424345 +C;X2;N;K-0.9980267284 +C;X3;N;K-0.0627905195 +C;Y90;X1;N;K11.0584061406 +C;X2;N;K-0.9980267284 +C;X3;N;K0.0627905195 +C;Y91;X1;N;K11.1840698468 +C;X2;N;K-0.9822872507 +C;X3;N;K0.1873813146 +C;Y92;X1;N;K11.3097335529 +C;X2;N;K-0.9510565163 +C;X3;N;K0.3090169944 +C;Y93;X1;N;K11.4353972591 +C;X2;N;K-0.9048270525 +C;X3;N;K0.4257792916 +C;Y94;X1;N;K11.5610609652 +C;X2;N;K-0.8443279255 +C;X3;N;K0.535826795 +C;Y95;X1;N;K11.6867246714 +C;X2;N;K-0.7705132428 +C;X3;N;K0.6374239897 +C;Y96;X1;N;K11.8123883775 +C;X2;N;K-0.6845471059 +C;X3;N;K0.7289686274 +C;Y97;X1;N;K11.9380520836 +C;X2;N;K-0.5877852523 +C;X3;N;K0.8090169944 +C;Y98;X1;N;K12.0637157898 +C;X2;N;K-0.4817536741 +C;X3;N;K0.87630668 +C;Y99;X1;N;K12.1893794959 +C;X2;N;K-0.3681245527 +C;X3;N;K0.9297764859 +C;Y100;X1;N;K12.3150432021 +C;X2;N;K-0.2486898872 +C;X3;N;K0.9685831611 +C;Y101;X1;N;K12.4407069082 +C;X2;N;K-0.1253332336 +C;X3;N;K0.9921147013 +C;Y102;X1;N;K12.5663706144 +C;X2;N;K0 +C;X3;N;K1 +C;Y103;X1;N;K12.6920343205 +C;X2;N;K0.1253332336 +C;X3;N;K0.9921147013 +C;Y104;X1;N;K12.8176980266 +C;X2;N;K0.2486898872 +C;X3;N;K0.9685831611 +C;Y105;X1;N;K12.9433617328 +C;X2;N;K0.3681245527 +C;X3;N;K0.9297764859 +C;Y106;X1;N;K13.0690254389 +C;X2;N;K0.4817536741 +C;X3;N;K0.87630668 +C;Y107;X1;N;K13.1946891451 +C;X2;N;K0.5877852523 +C;X3;N;K0.8090169944 +C;Y108;X1;N;K13.3203528512 +C;X2;N;K0.6845471059 +C;X3;N;K0.7289686274 +C;Y109;X1;N;K13.4460165574 +C;X2;N;K0.7705132428 +C;X3;N;K0.6374239897 +C;Y110;X1;N;K13.5716802635 +C;X2;N;K0.8443279255 +C;X3;N;K0.535826795 +C;Y111;X1;N;K13.6973439697 +C;X2;N;K0.9048270525 +C;X3;N;K0.4257792916 +C;Y112;X1;N;K13.8230076758 +C;X2;N;K0.9510565163 +C;X3;N;K0.3090169944 +C;Y113;X1;N;K13.9486713819 +C;X2;N;K0.9822872507 +C;X3;N;K0.1873813146 +C;Y114;X1;N;K14.0743350881 +C;X2;N;K0.9980267284 +C;X3;N;K0.0627905195 +C;Y115;X1;N;K14.1999987942 +C;X2;N;K0.9980267284 +C;X3;N;K-0.0627905195 +C;Y116;X1;N;K14.3256625004 +C;X2;N;K0.9822872507 +C;X3;N;K-0.1873813146 +C;Y117;X1;N;K14.4513262065 +C;X2;N;K0.9510565163 +C;X3;N;K-0.3090169944 +C;Y118;X1;N;K14.5769899127 +C;X2;N;K0.9048270525 +C;X3;N;K-0.4257792916 +C;Y119;X1;N;K14.7026536188 +C;X2;N;K0.8443279255 +C;X3;N;K-0.535826795 +C;Y120;X1;N;K14.8283173249 +C;X2;N;K0.7705132428 +C;X3;N;K-0.6374239897 +C;Y121;X1;N;K14.9539810311 +C;X2;N;K0.6845471059 +C;X3;N;K-0.7289686274 +C;Y122;X1;N;K15.0796447372 +C;X2;N;K0.5877852523 +C;X3;N;K-0.8090169944 +C;Y123;X1;N;K15.2053084434 +C;X2;N;K0.4817536741 +C;X3;N;K-0.87630668 +C;Y124;X1;N;K15.3309721495 +C;X2;N;K0.3681245527 +C;X3;N;K-0.9297764859 +C;Y125;X1;N;K15.4566358557 +C;X2;N;K0.2486898872 +C;X3;N;K-0.9685831611 +C;Y126;X1;N;K15.5822995618 +C;X2;N;K0.1253332336 +C;X3;N;K-0.9921147013 +C;Y127;X1;N;K15.7079632679 +C;X2;N;K0 +C;X3;N;K-1 +C;Y128;X1;N;K15.8336269741 +C;X2;N;K-0.1253332336 +C;X3;N;K-0.9921147013 +C;Y129;X1;N;K15.9592906802 +C;X2;N;K-0.2486898872 +C;X3;N;K-0.9685831611 +C;Y130;X1;N;K16.0849543864 +C;X2;N;K-0.3681245527 +C;X3;N;K-0.9297764859 +C;Y131;X1;N;K16.2106180925 +C;X2;N;K-0.4817536741 +C;X3;N;K-0.87630668 +C;Y132;X1;N;K16.3362817987 +C;X2;N;K-0.5877852523 +C;X3;N;K-0.8090169944 +C;Y133;X1;N;K16.4619455048 +C;X2;N;K-0.6845471059 +C;X3;N;K-0.7289686274 +C;Y134;X1;N;K16.587609211 +C;X2;N;K-0.7705132428 +C;X3;N;K-0.6374239897 +C;Y135;X1;N;K16.7132729171 +C;X2;N;K-0.8443279255 +C;X3;N;K-0.535826795 +C;Y136;X1;N;K16.8389366232 +C;X2;N;K-0.9048270525 +C;X3;N;K-0.4257792916 +C;Y137;X1;N;K16.9646003294 +C;X2;N;K-0.9510565163 +C;X3;N;K-0.3090169944 +C;Y138;X1;N;K17.0902640355 +C;X2;N;K-0.9822872507 +C;X3;N;K-0.1873813146 +C;Y139;X1;N;K17.2159277417 +C;X2;N;K-0.9980267284 +C;X3;N;K-0.0627905195 +C;Y140;X1;N;K17.3415914478 +C;X2;N;K-0.9980267284 +C;X3;N;K0.0627905195 +C;Y141;X1;N;K17.467255154 +C;X2;N;K-0.9822872507 +C;X3;N;K0.1873813146 +C;Y142;X1;N;K17.5929188601 +C;X2;N;K-0.9510565163 +C;X3;N;K0.3090169944 +C;Y143;X1;N;K17.7185825662 +C;X2;N;K-0.9048270525 +C;X3;N;K0.4257792916 +C;Y144;X1;N;K17.8442462724 +C;X2;N;K-0.8443279255 +C;X3;N;K0.535826795 +C;Y145;X1;N;K17.9699099785 +C;X2;N;K-0.7705132428 +C;X3;N;K0.6374239897 +C;Y146;X1;N;K18.0955736847 +C;X2;N;K-0.6845471059 +C;X3;N;K0.7289686274 +C;Y147;X1;N;K18.2212373908 +C;X2;N;K-0.5877852523 +C;X3;N;K0.8090169944 +C;Y148;X1;N;K18.346901097 +C;X2;N;K-0.4817536741 +C;X3;N;K0.87630668 +C;Y149;X1;N;K18.4725648031 +C;X2;N;K-0.3681245527 +C;X3;N;K0.9297764859 +C;Y150;X1;N;K18.5982285093 +C;X2;N;K-0.2486898872 +C;X3;N;K0.9685831611 +C;Y151;X1;N;K18.7238922154 +C;X2;N;K-0.1253332336 +C;X3;N;K0.9921147013 +C;Y152;X1;N;K18.8495559215 +C;X2;N;K0 +C;X3;N;K1 +C;Y153;X1;N;K18.9752196277 +C;X2;N;K0.1253332336 +C;X3;N;K0.9921147013 +C;Y154;X1;N;K19.1008833338 +C;X2;N;K0.2486898872 +C;X3;N;K0.9685831611 +C;Y155;X1;N;K19.22654704 +C;X2;N;K0.3681245527 +C;X3;N;K0.9297764859 +C;Y156;X1;N;K19.3522107461 +C;X2;N;K0.4817536741 +C;X3;N;K0.87630668 +C;Y157;X1;N;K19.4778744523 +C;X2;N;K0.5877852523 +C;X3;N;K0.8090169944 +C;Y158;X1;N;K19.6035381584 +C;X2;N;K0.6845471059 +C;X3;N;K0.7289686274 +C;Y159;X1;N;K19.7292018645 +C;X2;N;K0.7705132428 +C;X3;N;K0.6374239897 +C;Y160;X1;N;K19.8548655707 +C;X2;N;K0.8443279255 +C;X3;N;K0.535826795 +C;Y161;X1;N;K19.9805292768 +C;X2;N;K0.9048270525 +C;X3;N;K0.4257792916 +C;Y162;X1;N;K20.106192983 +C;X2;N;K0.9510565163 +C;X3;N;K0.3090169944 +C;Y163;X1;N;K20.2318566891 +C;X2;N;K0.9822872507 +C;X3;N;K0.1873813146 +C;Y164;X1;N;K20.3575203953 +C;X2;N;K0.9980267284 +C;X3;N;K0.0627905195 +C;Y165;X1;N;K20.4831841014 +C;X2;N;K0.9980267284 +C;X3;N;K-0.0627905195 +C;Y166;X1;N;K20.6088478075 +C;X2;N;K0.9822872507 +C;X3;N;K-0.1873813146 +C;Y167;X1;N;K20.7345115137 +C;X2;N;K0.9510565163 +C;X3;N;K-0.3090169944 +C;Y168;X1;N;K20.8601752198 +C;X2;N;K0.9048270525 +C;X3;N;K-0.4257792916 +C;Y169;X1;N;K20.985838926 +C;X2;N;K0.8443279255 +C;X3;N;K-0.535826795 +C;Y170;X1;N;K21.1115026321 +C;X2;N;K0.7705132428 +C;X3;N;K-0.6374239897 +C;Y171;X1;N;K21.2371663383 +C;X2;N;K0.6845471059 +C;X3;N;K-0.7289686274 +C;Y172;X1;N;K21.3628300444 +C;X2;N;K0.5877852523 +C;X3;N;K-0.8090169944 +C;Y173;X1;N;K21.4884937506 +C;X2;N;K0.4817536741 +C;X3;N;K-0.87630668 +C;Y174;X1;N;K21.6141574567 +C;X2;N;K0.3681245527 +C;X3;N;K-0.9297764859 +C;Y175;X1;N;K21.7398211628 +C;X2;N;K0.2486898872 +C;X3;N;K-0.9685831611 +C;Y176;X1;N;K21.865484869 +C;X2;N;K0.1253332336 +C;X3;N;K-0.9921147013 +C;Y177;X1;N;K21.9911485751 +C;X2;N;K0 +C;X3;N;K-1 +C;Y178;X1;N;K22.1168122813 +C;X2;N;K-0.1253332336 +C;X3;N;K-0.9921147013 +C;Y179;X1;N;K22.2424759874 +C;X2;N;K-0.2486898872 +C;X3;N;K-0.9685831611 +C;Y180;X1;N;K22.3681396936 +C;X2;N;K-0.3681245527 +C;X3;N;K-0.9297764859 +C;Y181;X1;N;K22.4938033997 +C;X2;N;K-0.4817536741 +C;X3;N;K-0.87630668 +C;Y182;X1;N;K22.6194671058 +C;X2;N;K-0.5877852523 +C;X3;N;K-0.8090169944 +C;Y183;X1;N;K22.745130812 +C;X2;N;K-0.6845471059 +C;X3;N;K-0.7289686274 +C;Y184;X1;N;K22.8707945181 +C;X2;N;K-0.7705132428 +C;X3;N;K-0.6374239897 +C;Y185;X1;N;K22.9964582243 +C;X2;N;K-0.8443279255 +C;X3;N;K-0.535826795 +C;Y186;X1;N;K23.1221219304 +C;X2;N;K-0.9048270525 +C;X3;N;K-0.4257792916 +C;Y187;X1;N;K23.2477856366 +C;X2;N;K-0.9510565163 +C;X3;N;K-0.3090169944 +C;Y188;X1;N;K23.3734493427 +C;X2;N;K-0.9822872507 +C;X3;N;K-0.1873813146 +C;Y189;X1;N;K23.4991130489 +C;X2;N;K-0.9980267284 +C;X3;N;K-0.0627905195 +C;Y190;X1;N;K23.624776755 +C;X2;N;K-0.9980267284 +C;X3;N;K0.0627905195 +C;Y191;X1;N;K23.7504404611 +C;X2;N;K-0.9822872507 +C;X3;N;K0.1873813146 +C;Y192;X1;N;K23.8761041673 +C;X2;N;K-0.9510565163 +C;X3;N;K0.3090169944 +C;Y193;X1;N;K24.0017678734 +C;X2;N;K-0.9048270525 +C;X3;N;K0.4257792916 +C;Y194;X1;N;K24.1274315796 +C;X2;N;K-0.8443279255 +C;X3;N;K0.535826795 +C;Y195;X1;N;K24.2530952857 +C;X2;N;K-0.7705132428 +C;X3;N;K0.6374239897 +C;Y196;X1;N;K24.3787589919 +C;X2;N;K-0.6845471059 +C;X3;N;K0.7289686274 +C;Y197;X1;N;K24.504422698 +C;X2;N;K-0.5877852523 +C;X3;N;K0.8090169944 +C;Y198;X1;N;K24.6300864041 +C;X2;N;K-0.4817536741 +C;X3;N;K0.87630668 +C;Y199;X1;N;K24.7557501103 +C;X2;N;K-0.3681245527 +C;X3;N;K0.9297764859 +C;Y200;X1;N;K24.8814138164 +C;X2;N;K-0.2486898872 +C;X3;N;K0.9685831611 +C;Y201;X1;N;K25.0070775226 +C;X2;N;K-0.1253332336 +C;X3;N;K0.9921147013 +E diff --git a/test/jkqtplot_test/testmain.cpp b/examples/jkqtplot_test/testmain.cpp similarity index 96% rename from test/jkqtplot_test/testmain.cpp rename to examples/jkqtplot_test/testmain.cpp index e3c152e7a9..8cd42b2cde 100644 --- a/test/jkqtplot_test/testmain.cpp +++ b/examples/jkqtplot_test/testmain.cpp @@ -1,54 +1,54 @@ -#include "testmain.h" -#include -#include -#include -#include -#include "TestWidgetBarcharts.h" -#include "TestWidgetGraphs.h" -#include "TestWidgetLogGraphs.h" -#include "TestWidgetImages.h" -#include "TestWidgetRGBImages.h" -#include "TestWidgetGeometry.h" -#include "TestWidgetFunctionPlots.h" -#include "TestWidgetEmptyPlot.h" -#include "TestWidgetPeaksPlots.h" -#include "TestWidgetContourPlots.h" -#include "TestWidgetParamScatterPlots.h" - -#ifdef Q_WS_WIN -#include "jkqtpemfengineadapter.h" -#endif - - - - -TestMain::TestMain(QWidget *parent) : - QTabWidget(parent) -{ -#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) - #ifdef Q_WS_WIN - JKQtBasePlotter::registerPaintDeviceAdapter(new JKQTPEmfEngineAdapter()); - #endif -#endif - - - - - // draw to screen - addTab(new TestWidgetGraphs(this), QString("graphs")); - addTab(new TestWidgetLogGraphs(this), QString("log graphs")); - addTab(new TestWidgetImages(this), QString("images")); - addTab(new TestWidgetRGBImages(this), QString("RGB images")); - addTab(new TestWidgetGeometry(this), QString("geometry")); - addTab(new TestWidgetFunctionPlots(this), QString("functionplots")); - addTab(new TestWidgetEmptyPlot(this), QString("empty plot")); - addTab(new TestWidgetPeaksPlots(this), QString("peaks plot")); - addTab(new TestWidgetContourPlots(this), QString("contour plot")); - addTab(new TestWidgetParamScatterPlots(this), QString("parametrized scatter plot")); - addTab(new TestWidgetBarcharts(this), QString("barcharts")); - setCurrentIndex(0); - - - showMaximized(); - -} +#include "testmain.h" +#include +#include +#include +#include +#include "TestWidgetBarcharts.h" +#include "TestWidgetGraphs.h" +#include "TestWidgetLogGraphs.h" +#include "TestWidgetImages.h" +#include "TestWidgetRGBImages.h" +#include "TestWidgetGeometry.h" +#include "TestWidgetFunctionPlots.h" +#include "TestWidgetEmptyPlot.h" +#include "TestWidgetPeaksPlots.h" +#include "TestWidgetContourPlots.h" +#include "TestWidgetParamScatterPlots.h" + +#ifdef Q_WS_WIN +#include "jkqtpemfengineadapter.h" +#endif + + + + +TestMain::TestMain(QWidget *parent) : + QTabWidget(parent) +{ +#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) + #ifdef Q_WS_WIN + JKQtBasePlotter::registerPaintDeviceAdapter(new JKQTPEmfEngineAdapter()); + #endif +#endif + + + + + // draw to screen + addTab(new TestWidgetGraphs(this), QString("graphs")); + addTab(new TestWidgetLogGraphs(this), QString("log graphs")); + addTab(new TestWidgetImages(this), QString("images")); + addTab(new TestWidgetRGBImages(this), QString("RGB images")); + addTab(new TestWidgetGeometry(this), QString("geometry")); + addTab(new TestWidgetFunctionPlots(this), QString("functionplots")); + addTab(new TestWidgetEmptyPlot(this), QString("empty plot")); + addTab(new TestWidgetPeaksPlots(this), QString("peaks plot")); + addTab(new TestWidgetContourPlots(this), QString("contour plot")); + addTab(new TestWidgetParamScatterPlots(this), QString("parametrized scatter plot")); + addTab(new TestWidgetBarcharts(this), QString("barcharts")); + setCurrentIndex(0); + + + showMaximized(); + +} diff --git a/test/jkqtplot_test/testmain.h b/examples/jkqtplot_test/testmain.h similarity index 91% rename from test/jkqtplot_test/testmain.h rename to examples/jkqtplot_test/testmain.h index 8495309e95..8d717766eb 100644 --- a/test/jkqtplot_test/testmain.h +++ b/examples/jkqtplot_test/testmain.h @@ -1,30 +1,30 @@ -#ifndef TESTMAIN_H -#define TESTMAIN_H -#include - - -#define N1 200 -#define N2 50 -#define N3 8 - - - - -class TestMain : public QTabWidget -{ - Q_OBJECT - public: - explicit TestMain(QWidget *parent = 0); - - signals: - - public slots: - - - protected: - - -}; - - -#endif // TESTMAIN_H +#ifndef TESTMAIN_H +#define TESTMAIN_H +#include + + +#define N1 200 +#define N2 50 +#define N3 8 + + + + +class TestMain : public QTabWidget +{ + Q_OBJECT + public: + explicit TestMain(QWidget *parent = 0); + + signals: + + public slots: + + + protected: + + +}; + + +#endif // TESTMAIN_H diff --git a/test/simpletest/README.md b/examples/simpletest/README.md similarity index 87% rename from test/simpletest/README.md rename to examples/simpletest/README.md index fd7317e8ee..f367da0565 100644 --- a/test/simpletest/README.md +++ b/examples/simpletest/README.md @@ -1,106 +1,106 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Very simple line-graph -This project (see `./test/simpletest/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. -The QMake project looks like this (see [`jkqtplotter_simpletest.pro`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest/jkqtplotter_simpletest.pro): -```qmake -# source code for this simple demo -SOURCES = jkqtplotter_simpletest.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest - -# include JKQtPlotter source headers and link against library -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER -``` - -Alternatively to linking agains a `libjkqtplotter`, you can also directy add the JKQtPlotter sources to the project: -```qmake -# source code for this simple demo -SOURCES = jkqtplotter_simpletest.cpp - -# configure Qt -CONFIG += qt -QT += core gui svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest - -# include JKQtPlotter source code -include(../../lib/jkqtplotter.pri) -``` -The soruce code of the main application is (see [`jkqtplotter_simpletest.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest/jkqtplotter_simpletest.cpp): -```c++ -#include -#include "jkqtplotter/jkqtplotter.h" - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore - // (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for a simple plot (a sine curve) - QVector X, Y; - const int Ndata=100; - for (int i=0; iaddCopiedColumn(X, "x"); - size_t columnY=ds->addCopiedColumn(Y, "y"); - - // 4. create a graph in the plot, which plots the dataset X/Y: - JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY); - graph1->set_title(QObject::tr("sine graph")); - - // 5. add the graph to the plot, so it is actually displayed - plot.addGraph(graph1); - - // 6. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - - return app.exec(); -} -``` -The result looks like this: - -![jkqtplotter_simpletest1](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest1.png) - - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Very simple line-graph +This project (see `./examples/simpletest/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. +The QMake project looks like this (see [`jkqtplotter_simpletest.pro`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest/jkqtplotter_simpletest.pro): +```qmake +# source code for this simple demo +SOURCES = jkqtplotter_simpletest.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest + +# include JKQtPlotter source headers and link against library +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib +CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER +``` + +Alternatively to linking agains a `libjkqtplotter`, you can also directy add the JKQtPlotter sources to the project: +```qmake +# source code for this simple demo +SOURCES = jkqtplotter_simpletest.cpp + +# configure Qt +CONFIG += qt +QT += core gui svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest + +# include JKQtPlotter source code +include(../../lib/jkqtplotter.pri) +``` +The soruce code of the main application is (see [`jkqtplotter_simpletest.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest/jkqtplotter_simpletest.cpp): +```c++ +#include +#include "jkqtplotter/jkqtplotter.h" + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore + // (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for a simple plot (a sine curve) + QVector X, Y; + const int Ndata=100; + for (int i=0; iaddCopiedColumn(X, "x"); + size_t columnY=ds->addCopiedColumn(Y, "y"); + + // 4. create a graph in the plot, which plots the dataset X/Y: + JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY); + graph1->set_title(QObject::tr("sine graph")); + + // 5. add the graph to the plot, so it is actually displayed + plot.addGraph(graph1); + + // 6. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + + return app.exec(); +} +``` +The result looks like this: + +![jkqtplotter_simpletest1](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest1.png) + + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest/jkqtplotter_simpletest.cpp b/examples/simpletest/jkqtplotter_simpletest.cpp similarity index 97% rename from test/simpletest/jkqtplotter_simpletest.cpp rename to examples/simpletest/jkqtplotter_simpletest.cpp index e5a16551a1..27293ce056 100644 --- a/test/simpletest/jkqtplotter_simpletest.cpp +++ b/examples/simpletest/jkqtplotter_simpletest.cpp @@ -1,48 +1,48 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for a simple plot (a sine curve) - QVector X, Y; - const int Ndata=100; - for (int i=0; iaddCopiedColumn(X, "x"); - size_t columnY=ds->addCopiedColumn(Y, "y"); - - // 4. create a graph in the plot, which plots the dataset X/Y: - JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY); - graph1->set_title(QObject::tr("sine graph")); - - // 5. add the graph to the plot, so it is actually displayed - plot.addGraph(graph1); - - // 6. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for a simple plot (a sine curve) + QVector X, Y; + const int Ndata=100; + for (int i=0; iaddCopiedColumn(X, "x"); + size_t columnY=ds->addCopiedColumn(Y, "y"); + + // 4. create a graph in the plot, which plots the dataset X/Y: + JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY); + graph1->set_title(QObject::tr("sine graph")); + + // 5. add the graph to the plot, so it is actually displayed + plot.addGraph(graph1); + + // 6. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + + return app.exec(); +} diff --git a/test/simpletest/jkqtplotter_simpletest.pro b/examples/simpletest/jkqtplotter_simpletest.pro similarity index 73% rename from test/simpletest/jkqtplotter_simpletest.pro rename to examples/simpletest/jkqtplotter_simpletest.pro index 8127cf1bfa..1d96501593 100644 --- a/test/simpletest/jkqtplotter_simpletest.pro +++ b/examples/simpletest/jkqtplotter_simpletest.pro @@ -1,22 +1,26 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest - -# include JKQtPlotter source headers and link against library -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -win32-msvc*: DEFINES += _USE_MATH_DEFINES - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest + +# include JKQtPlotter source headers and link against library +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +win32-msvc*: DEFINES += _USE_MATH_DEFINES + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest/jkqtplotter_simpletest_and_lib.pro b/examples/simpletest/jkqtplotter_simpletest_and_lib.pro similarity index 96% rename from test/simpletest/jkqtplotter_simpletest_and_lib.pro rename to examples/simpletest/jkqtplotter_simpletest_and_lib.pro index afc81e4eb8..8000a57bd1 100644 --- a/test/simpletest/jkqtplotter_simpletest_and_lib.pro +++ b/examples/simpletest/jkqtplotter_simpletest_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest.file=$$PWD/jkqtplotter_simpletest.pro -jkqtplotter_simpletest.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest.file=$$PWD/jkqtplotter_simpletest.pro +jkqtplotter_simpletest.depends = jkqtplotterlib diff --git a/test/simpletest_barchart/README.md b/examples/simpletest_barchart/README.md similarity index 92% rename from test/simpletest_barchart/README.md rename to examples/simpletest_barchart/README.md index 94d1d7e378..1885507b29 100644 --- a/test/simpletest_barchart/README.md +++ b/examples/simpletest_barchart/README.md @@ -1,101 +1,101 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple barchart -This project (see [`simpletest_barchart`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_barchart) simply creates a JKQtPlotter widget (as a new window) and adds several barcharts. They are ordered in groups. - -The soruce code of the main application is (see [`jkqtplotter_simpletest_barchart.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp): -```c++ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsbarchart.h" - -#define Ndata 5 -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for three simple barchart - QString L[Ndata]={ "cat. A", "cat. B", "cat. C", "cat. D", "other"}; - double X[Ndata]={ 1, 2, 3, 4, 5}; - double Y1[Ndata]={ 5, 4, 3, 4, 5}; - double Y2[Ndata]={ -5, -3, 1, 3, 6}; - double Y3[Ndata]={ 6, 2, 5, 3, 6}; - - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // Note: In this step the data is copied (of not specified otherwise) - // the variables columnX and columnY... will contain the internal column ID of the - // newly created columns with names "x" and "y..." and the (copied) data from X - // and Y... - size_t columnX=ds->addCopiedColumn(X, Ndata, "x"); - size_t columnY1=ds->addCopiedColumn(Y1, Ndata, "y1"); - size_t columnY2=ds->addCopiedColumn(Y2, Ndata, "y2"); - size_t columnY3=ds->addCopiedColumn(Y3, Ndata, "y3"); - - // 4. create graphs in the plot, which plots the dataset X/Y1, X/Y2 and X/Y3: - JKQTPbarVerticalGraph* graph1=new JKQTPbarVerticalGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY1); - graph1->set_title(QObject::tr("dataset 1")); - JKQTPbarVerticalGraph* graph2=new JKQTPbarVerticalGraph(&plot); - graph2->set_xColumn(columnX); - graph2->set_yColumn(columnY2); - graph2->set_title(QObject::tr("dataset 2")); - JKQTPbarVerticalGraph* graph3=new JKQTPbarVerticalGraph(&plot); - graph3->set_xColumn(columnX); - graph3->set_yColumn(columnY3); - graph3->set_title(QObject::tr("dataset 3")); - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph1); - plot.addGraph(graph2); - plot.addGraph(graph3); - - // 6. now we set the graphs, so they are plotted side-by-side - // This function searches all JKQTPbarVerticalGraph in the current - // plot and sets their shift/scale so they form a nice plot with - // side-by-side groups - graph1->autoscaleBarWidthAndShift(0.75, 1); - - // 7. data is grouped into 5 numbere groups (1..5), but we also have string - // labels for these groups (stored in L). In order to display these labels, - // we have to tell the x-Axis to use these special labels: - plot.get_xAxis()->addAxisTickLabels(X, L, Ndata); - // also we can rotate the labels a bit (by 45 degree), so they fit better - plot.get_xAxis()->set_tickLabelAngle(45); - plot.get_xAxis()->set_tickLabelFontSize(12); - - // 8. finally we move the plot key/legend to the outside, top-right - // and lay it out as a single row - // NOTE: plot is a descendent of QWidget, which uses an internal object of - // type JKQTBasePlotter, which does the actual plotting. - // So many properties of the plot are only available in this internal - // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); - - // 9 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - - return app.exec(); -} -``` -The result looks like this: - -![jkqtplotter_simpletest_barchart](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_barchart.png) - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple barchart +This project (see [`simpletest_barchart`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_barchart) simply creates a JKQtPlotter widget (as a new window) and adds several barcharts. They are ordered in groups. + +The soruce code of the main application is (see [`jkqtplotter_simpletest_barchart.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp): +```c++ +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsbarchart.h" + +#define Ndata 5 +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for three simple barchart + QString L[Ndata]={ "cat. A", "cat. B", "cat. C", "cat. D", "other"}; + double X[Ndata]={ 1, 2, 3, 4, 5}; + double Y1[Ndata]={ 5, 4, 3, 4, 5}; + double Y2[Ndata]={ -5, -3, 1, 3, 6}; + double Y3[Ndata]={ 6, 2, 5, 3, 6}; + + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // Note: In this step the data is copied (of not specified otherwise) + // the variables columnX and columnY... will contain the internal column ID of the + // newly created columns with names "x" and "y..." and the (copied) data from X + // and Y... + size_t columnX=ds->addCopiedColumn(X, Ndata, "x"); + size_t columnY1=ds->addCopiedColumn(Y1, Ndata, "y1"); + size_t columnY2=ds->addCopiedColumn(Y2, Ndata, "y2"); + size_t columnY3=ds->addCopiedColumn(Y3, Ndata, "y3"); + + // 4. create graphs in the plot, which plots the dataset X/Y1, X/Y2 and X/Y3: + JKQTPbarVerticalGraph* graph1=new JKQTPbarVerticalGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY1); + graph1->set_title(QObject::tr("dataset 1")); + JKQTPbarVerticalGraph* graph2=new JKQTPbarVerticalGraph(&plot); + graph2->set_xColumn(columnX); + graph2->set_yColumn(columnY2); + graph2->set_title(QObject::tr("dataset 2")); + JKQTPbarVerticalGraph* graph3=new JKQTPbarVerticalGraph(&plot); + graph3->set_xColumn(columnX); + graph3->set_yColumn(columnY3); + graph3->set_title(QObject::tr("dataset 3")); + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph1); + plot.addGraph(graph2); + plot.addGraph(graph3); + + // 6. now we set the graphs, so they are plotted side-by-side + // This function searches all JKQTPbarVerticalGraph in the current + // plot and sets their shift/scale so they form a nice plot with + // side-by-side groups + graph1->autoscaleBarWidthAndShift(0.75, 1); + + // 7. data is grouped into 5 numbere groups (1..5), but we also have string + // labels for these groups (stored in L). In order to display these labels, + // we have to tell the x-Axis to use these special labels: + plot.get_xAxis()->addAxisTickLabels(X, L, Ndata); + // also we can rotate the labels a bit (by 45 degree), so they fit better + plot.get_xAxis()->set_tickLabelAngle(45); + plot.get_xAxis()->set_tickLabelFontSize(12); + + // 8. finally we move the plot key/legend to the outside, top-right + // and lay it out as a single row + // NOTE: plot is a descendent of QWidget, which uses an internal object of + // type JKQTBasePlotter, which does the actual plotting. + // So many properties of the plot are only available in this internal + // object, which you can access by plot.get_plotter(). + plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); + plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + + // 9 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + + return app.exec(); +} +``` +The result looks like this: + +![jkqtplotter_simpletest_barchart](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_barchart.png) + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp similarity index 97% rename from test/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp rename to examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp index 0939d8a526..f12547a9ce 100644 --- a/test/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp +++ b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp @@ -1,88 +1,88 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplotter/jkqtpgraphsbarchart.h" - -#define Ndata 5 -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for three simple barchart - QString L[Ndata]={ "cat. A", "cat. C", "cat. B", "cat. D", "other"}; // unsorted category axis - double X[Ndata]={ 1, 3, 2, 4, 5}; - //QString L[Ndata]={ "cat. A", "cat. B", "cat. C", "cat. D", "other"}; // correctly sorted data! - //double X[Ndata]={ 1, 2, 3, 4, 5}; - double Y1[Ndata]={ 5, 4, 3, 4, 5}; - double Y2[Ndata]={ -5, -3, 1, 3, 6}; - double Y3[Ndata]={ 6, 2, 5, 3, 6}; - - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // Note: In this step the data is copied (of not specified otherwise) - // the variables columnX and columnY... will contain the internal column ID of the - // newly created columns with names "x" and "y..." and the (copied) data from X - // and Y... - size_t columnX=ds->addCopiedColumn(X, Ndata, "x"); - size_t columnY1=ds->addCopiedColumn(Y1, Ndata, "y1"); - size_t columnY2=ds->addCopiedColumn(Y2, Ndata, "y2"); - size_t columnY3=ds->addCopiedColumn(Y3, Ndata, "y3"); - - // 4. create graphs in the plot, which plots the dataset X/Y1, X/Y2 and X/Y3: - JKQTPbarVerticalGraph* graph1=new JKQTPbarVerticalGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY1); - graph1->set_title(QObject::tr("dataset 1")); - JKQTPbarVerticalGraph* graph2=new JKQTPbarVerticalGraph(&plot); - graph2->set_xColumn(columnX); - graph2->set_yColumn(columnY2); - graph2->set_title(QObject::tr("dataset 2")); - JKQTPbarVerticalGraph* graph3=new JKQTPbarVerticalGraph(&plot); - graph3->set_xColumn(columnX); - graph3->set_yColumn(columnY3); - graph3->set_title(QObject::tr("dataset 3")); - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph1); - plot.addGraph(graph2); - plot.addGraph(graph3); - - // 6. now we set the graphs, so they are plotted side-by-side - // This function searches all JKQTPbarHorizontalGraph in the current - // plot and sets their shift/scale so they form a nice plot with - // side-by-side groups - graph1->autoscaleBarWidthAndShift(0.75, 1); - - // 7. data is grouped into 5 numbere groups (1..5), but we also have string - // labels for these groups (stored in L). In order to display these labels, - // we have to tell the x-Axis to use these special labels: - plot.get_xAxis()->addAxisTickLabels(X, L, Ndata); - // also we can rotate the labels a bit (by 45 degree), so they fit better - plot.get_xAxis()->set_tickLabelAngle(45); - plot.get_xAxis()->set_tickLabelFontSize(12); - - // 8. finally we move the plot key/legend to the outside, top-right - // and lay it out as a single row - // NOTE: plot is a descendent of QWidget, which uses an internal object of - // type JKQTBasePlotter, which does the actual plotting. - // So many properties of the plot are only available in this internal - // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); - - // 9 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplotter/jkqtpgraphsbarchart.h" + +#define Ndata 5 +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for three simple barchart + QString L[Ndata]={ "cat. A", "cat. C", "cat. B", "cat. D", "other"}; // unsorted category axis + double X[Ndata]={ 1, 3, 2, 4, 5}; + //QString L[Ndata]={ "cat. A", "cat. B", "cat. C", "cat. D", "other"}; // correctly sorted data! + //double X[Ndata]={ 1, 2, 3, 4, 5}; + double Y1[Ndata]={ 5, 4, 3, 4, 5}; + double Y2[Ndata]={ -5, -3, 1, 3, 6}; + double Y3[Ndata]={ 6, 2, 5, 3, 6}; + + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // Note: In this step the data is copied (of not specified otherwise) + // the variables columnX and columnY... will contain the internal column ID of the + // newly created columns with names "x" and "y..." and the (copied) data from X + // and Y... + size_t columnX=ds->addCopiedColumn(X, Ndata, "x"); + size_t columnY1=ds->addCopiedColumn(Y1, Ndata, "y1"); + size_t columnY2=ds->addCopiedColumn(Y2, Ndata, "y2"); + size_t columnY3=ds->addCopiedColumn(Y3, Ndata, "y3"); + + // 4. create graphs in the plot, which plots the dataset X/Y1, X/Y2 and X/Y3: + JKQTPbarVerticalGraph* graph1=new JKQTPbarVerticalGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY1); + graph1->set_title(QObject::tr("dataset 1")); + JKQTPbarVerticalGraph* graph2=new JKQTPbarVerticalGraph(&plot); + graph2->set_xColumn(columnX); + graph2->set_yColumn(columnY2); + graph2->set_title(QObject::tr("dataset 2")); + JKQTPbarVerticalGraph* graph3=new JKQTPbarVerticalGraph(&plot); + graph3->set_xColumn(columnX); + graph3->set_yColumn(columnY3); + graph3->set_title(QObject::tr("dataset 3")); + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph1); + plot.addGraph(graph2); + plot.addGraph(graph3); + + // 6. now we set the graphs, so they are plotted side-by-side + // This function searches all JKQTPbarHorizontalGraph in the current + // plot and sets their shift/scale so they form a nice plot with + // side-by-side groups + graph1->autoscaleBarWidthAndShift(0.75, 1); + + // 7. data is grouped into 5 numbere groups (1..5), but we also have string + // labels for these groups (stored in L). In order to display these labels, + // we have to tell the x-Axis to use these special labels: + plot.get_xAxis()->addAxisTickLabels(X, L, Ndata); + // also we can rotate the labels a bit (by 45 degree), so they fit better + plot.get_xAxis()->set_tickLabelAngle(45); + plot.get_xAxis()->set_tickLabelFontSize(12); + + // 8. finally we move the plot key/legend to the outside, top-right + // and lay it out as a single row + // NOTE: plot is a descendent of QWidget, which uses an internal object of + // type JKQTBasePlotter, which does the actual plotting. + // So many properties of the plot are only available in this internal + // object, which you can access by plot.get_plotter(). + plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); + plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + + // 9 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + + return app.exec(); +} diff --git a/test/simpletest_barchart/jkqtplotter_simpletest_barchart.pro b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.pro similarity index 71% rename from test/simpletest_barchart/jkqtplotter_simpletest_barchart.pro rename to examples/simpletest_barchart/jkqtplotter_simpletest_barchart.pro index c8c5ab162e..9fa0085cab 100644 --- a/test/simpletest_barchart/jkqtplotter_simpletest_barchart.pro +++ b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.pro @@ -1,21 +1,25 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_barchart.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_barchart - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_barchart.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_barchart + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_barchart/jkqtplotter_simpletest_barchart_and_lib.pro b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart_and_lib.pro similarity index 97% rename from test/simpletest_barchart/jkqtplotter_simpletest_barchart_and_lib.pro rename to examples/simpletest_barchart/jkqtplotter_simpletest_barchart_and_lib.pro index 62160e5f7b..ea2db60eeb 100644 --- a/test/simpletest_barchart/jkqtplotter_simpletest_barchart_and_lib.pro +++ b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_barchart - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_barchart.file=$$PWD/jkqtplotter_simpletest_barchart.pro -jkqtplotter_simpletest_barchart.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_barchart + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_barchart.file=$$PWD/jkqtplotter_simpletest_barchart.pro +jkqtplotter_simpletest_barchart.depends = jkqtplotterlib diff --git a/test/simpletest_dateaxes/README.md b/examples/simpletest_dateaxes/README.md similarity index 94% rename from test/simpletest_dateaxes/README.md rename to examples/simpletest_dateaxes/README.md index ef9e9c3a38..db3707b86d 100644 --- a/test/simpletest_dateaxes/README.md +++ b/examples/simpletest_dateaxes/README.md @@ -1,171 +1,171 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Date/Time Axes - -### Date Axis -This project (see `./test/simpletest_dateaxes/`) simply creates a JKQtPlotter widget (as a new window) with the X-axis showing time or date(-time) values, formated as such. - -The source code of the main application can be found in [`jkqtplotter_simpletest_dateaxes.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp). - -First some data is parsed from a CSV-file (added as ressource to the example). Note that the Time/date or Date+Time data is internally stored as milliseconds since epoc (Jan 1st 1970, 00:00:00), therefore data has to be converted accordingly before beeing added to the graph. - -```c++ - QVector date; - QVector temperature, temperature_min, temperature_max; - // parse a textfile with comments on the first line and the - // semicolon separated data. The first column is a date and time - // the second to fourth columns contain a floating-point number - // with temperature average, min and max - QFile file(":/weatherdata_gelsenkirchen.csv"); - file.open(QFile::ReadOnly|QFile::Text); - file.readLine(); // eat comment - while (!file.atEnd()) { - QString line=file.readLine(); - QTextStream in(&line); - QStringList items=line.split(";"); - // date/time values are stored as doubles representing the corresponding number of milliseconds sind epoch - date<addCopiedColumn(date, "date"); - graphTemperatureRange->set_xColumn(colDate); - graphTemperatureRange->set_yColumn(ds->addCopiedColumn(temperature_min, "temperature_min")); - graphTemperatureRange->set_yColumn2(ds->addCopiedColumn(temperature_max, "temperature_max")); - - - // 5. min/max range data - // graph fill color is a lighter shade of the average graph - graphTemperatureRange->set_fillColor(graphTemperature->get_color().lighter()); - // don't draw lines of the data - graphTemperatureRange->set_drawLine(false); - // plot label in key - graphTemperatureRange->set_title("Min/Max Temperature"); - // add the graph to the plot, so it is actually displayed - plot.addGraph(graphTemperatureRange); -``` - -On top of that plot, a second plot is added, which draws the average temperatures of each month as a line: - -```c++ - // 3. add a plot for the data mean line (graphTemperature) and range (graphTemperatureRange) - JKQTPxyLineErrorGraph* graphTemperature=new JKQTPxyLineErrorGraph(&plot); - - // 4. copy data into datastore and immediately set the yColumn - size_t colDate=ds->addCopiedColumn(date, "date"); - graphTemperature->set_xColumn(colDate); - graphTemperature->set_yColumn(ds->addCopiedColumn(temperature, "temperature")); - - - // 5. min/max range data - // .... see above - - // 6. average data - // don't use symbols - graphTemperature->set_symbol(JKQTPnoSymbol); - // set the line width - graphTemperature->set_lineWidth(1); - // draw small symbols - graphTemperature->set_symbolSize(6); - // graph title - graphTemperature->set_title("Average Temperature"); - // add the graph to the plot, so it is actually displayed - plot.addGraph(graphTemperature); -``` - -Finally the x-axis is formatted to display dates (see [Qt-Documentation of `QDateTime::toString()`]((http://doc.qt.io/qt-5/qdatetime.html#toString) for details on the formating strings): -```c++ - // 7. format the plot - // set the title above the plot, use LaTeX instructions to make text bold - plot.get_plotter()->set_plotLabel("\\textbf{Weather in Gelsenkirchen, 2017-2018}"); - // set x-axis date-time-axis - plot.get_xAxis()->set_labelType(JKQTPCALTdatetime); - plot.get_xAxis()->set_axisLabel("Date"); - // set format string for date axis (e.g. Jan '18), see Documentation of QDateTime::toString() - plot.get_xAxis()->set_tickDateTimeFormat("MMM ''yy"); - // set y-axis temperature axis - plot.get_yAxis()->set_axisLabel("Average Daily Temperature [{\\degree}C]"); -``` - -The result looks like this: - -![jkqtplotter_simpletest_symbols_and_styles](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes.png) - - -### Time Axis -A second variant (see the example CPP-file) displays data with a time-axis: - -![jkqtplotter_simpletest_symbols_and_styles](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes_timeaxis.png) - - -For that example data-pasring is a bit different, because the file only contains times and no dates: -```c++ - // 2. now we create data vectors with data parsed from a CSV-file - QVector time; - QVector temperature; - // parse a textfile with comments on the first line and the - // semicolon separated data. The first column is a time - // the second contain a floating-point number with temperatures - QFile file(":/weatherdata_heidelberg_2018-10-14.csv"); - file.open(QFile::ReadOnly|QFile::Text); - file.readLine(); // eat comment - while (!file.atEnd()) { - QString line=file.readLine(); - QTextStream in(&line); - QStringList items=line.split(";"); - // date/time values are stored as doubles representing the corresponding - // number of milliseconds sind epoch. Since the data is time only, we have to use an arbitrary - // date as basis - time<set_plotLabel("\\textbf{Weather in Heidelberg, 14^{th} Oct 2018}"); - // set x-axis date-time-axis - plot.get_xAxis()->set_labelType(JKQTPCALTtime); - plot.get_xAxis()->set_axisLabel("Time of Day"); - // set format string for time axis with 24-hour and minute only, - // see QDateTime::toString() documentation for details on format strings - plot.get_xAxis()->set_tickTimeFormat("HH:mm"); - // set y-axis temperature axis - plot.get_yAxis()->set_axisLabel("Temperature [{\\degree}C]"); -``` - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Date/Time Axes + +### Date Axis +This project (see `./examples/simpletest_dateaxes/`) simply creates a JKQtPlotter widget (as a new window) with the X-axis showing time or date(-time) values, formated as such. + +The source code of the main application can be found in [`jkqtplotter_simpletest_dateaxes.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp). + +First some data is parsed from a CSV-file (added as ressource to the example). Note that the Time/date or Date+Time data is internally stored as milliseconds since epoc (Jan 1st 1970, 00:00:00), therefore data has to be converted accordingly before beeing added to the graph. + +```c++ + QVector date; + QVector temperature, temperature_min, temperature_max; + // parse a textfile with comments on the first line and the + // semicolon separated data. The first column is a date and time + // the second to fourth columns contain a floating-point number + // with temperature average, min and max + QFile file(":/weatherdata_gelsenkirchen.csv"); + file.open(QFile::ReadOnly|QFile::Text); + file.readLine(); // eat comment + while (!file.atEnd()) { + QString line=file.readLine(); + QTextStream in(&line); + QStringList items=line.split(";"); + // date/time values are stored as doubles representing the corresponding number of milliseconds sind epoch + date<addCopiedColumn(date, "date"); + graphTemperatureRange->set_xColumn(colDate); + graphTemperatureRange->set_yColumn(ds->addCopiedColumn(temperature_min, "temperature_min")); + graphTemperatureRange->set_yColumn2(ds->addCopiedColumn(temperature_max, "temperature_max")); + + + // 5. min/max range data + // graph fill color is a lighter shade of the average graph + graphTemperatureRange->set_fillColor(graphTemperature->get_color().lighter()); + // don't draw lines of the data + graphTemperatureRange->set_drawLine(false); + // plot label in key + graphTemperatureRange->set_title("Min/Max Temperature"); + // add the graph to the plot, so it is actually displayed + plot.addGraph(graphTemperatureRange); +``` + +On top of that plot, a second plot is added, which draws the average temperatures of each month as a line: + +```c++ + // 3. add a plot for the data mean line (graphTemperature) and range (graphTemperatureRange) + JKQTPxyLineErrorGraph* graphTemperature=new JKQTPxyLineErrorGraph(&plot); + + // 4. copy data into datastore and immediately set the yColumn + size_t colDate=ds->addCopiedColumn(date, "date"); + graphTemperature->set_xColumn(colDate); + graphTemperature->set_yColumn(ds->addCopiedColumn(temperature, "temperature")); + + + // 5. min/max range data + // .... see above + + // 6. average data + // don't use symbols + graphTemperature->set_symbol(JKQTPnoSymbol); + // set the line width + graphTemperature->set_lineWidth(1); + // draw small symbols + graphTemperature->set_symbolSize(6); + // graph title + graphTemperature->set_title("Average Temperature"); + // add the graph to the plot, so it is actually displayed + plot.addGraph(graphTemperature); +``` + +Finally the x-axis is formatted to display dates (see [Qt-Documentation of `QDateTime::toString()`]((http://doc.qt.io/qt-5/qdatetime.html#toString) for details on the formating strings): +```c++ + // 7. format the plot + // set the title above the plot, use LaTeX instructions to make text bold + plot.get_plotter()->set_plotLabel("\\textbf{Weather in Gelsenkirchen, 2017-2018}"); + // set x-axis date-time-axis + plot.get_xAxis()->set_labelType(JKQTPCALTdatetime); + plot.get_xAxis()->set_axisLabel("Date"); + // set format string for date axis (e.g. Jan '18), see Documentation of QDateTime::toString() + plot.get_xAxis()->set_tickDateTimeFormat("MMM ''yy"); + // set y-axis temperature axis + plot.get_yAxis()->set_axisLabel("Average Daily Temperature [{\\degree}C]"); +``` + +The result looks like this: + +![jkqtplotter_simpletest_symbols_and_styles](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes.png) + + +### Time Axis +A second variant (see the example CPP-file) displays data with a time-axis: + +![jkqtplotter_simpletest_symbols_and_styles](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_dateaxes_timeaxis.png) + + +For that example data-pasring is a bit different, because the file only contains times and no dates: +```c++ + // 2. now we create data vectors with data parsed from a CSV-file + QVector time; + QVector temperature; + // parse a textfile with comments on the first line and the + // semicolon separated data. The first column is a time + // the second contain a floating-point number with temperatures + QFile file(":/weatherdata_heidelberg_2018-10-14.csv"); + file.open(QFile::ReadOnly|QFile::Text); + file.readLine(); // eat comment + while (!file.atEnd()) { + QString line=file.readLine(); + QTextStream in(&line); + QStringList items=line.split(";"); + // date/time values are stored as doubles representing the corresponding + // number of milliseconds sind epoch. Since the data is time only, we have to use an arbitrary + // date as basis + time<set_plotLabel("\\textbf{Weather in Heidelberg, 14^{th} Oct 2018}"); + // set x-axis date-time-axis + plot.get_xAxis()->set_labelType(JKQTPCALTtime); + plot.get_xAxis()->set_axisLabel("Time of Day"); + // set format string for time axis with 24-hour and minute only, + // see QDateTime::toString() documentation for details on format strings + plot.get_xAxis()->set_tickTimeFormat("HH:mm"); + // set y-axis temperature axis + plot.get_yAxis()->set_axisLabel("Temperature [{\\degree}C]"); +``` + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp similarity index 97% rename from test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp rename to examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp index 17fb0499ce..c137c7614c 100644 --- a/test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp +++ b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp @@ -1,174 +1,174 @@ -#include -#include -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplottertools/jkqtptools.h" -#include "jkqtplotter/jkqtpgraphsfilledcurve.h" - -void drawWithDateAxis(JKQtPlotter& plot) { - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data vectors with data parsed from a CSV-file - QVector date; - QVector temperature, temperature_min, temperature_max; - // parse a textfile with comments on the first line and the - // semicolon separated data. The first column is a date and time - // the second to fourth columns contain a floating-point number - // with temperature average, min and max - QFile file(":/weatherdata_gelsenkirchen.csv"); - file.open(QFile::ReadOnly|QFile::Text); - file.readLine(); // eat comment - while (!file.atEnd()) { - QString line=file.readLine(); - QTextStream in(&line); - QStringList items=line.split(";"); - // date/time values are stored as doubles representing the corresponding number of milliseconds sind epoch - date<addCopiedColumn(date, "date"); - graphTemperature->set_xColumn(colDate); - graphTemperature->set_yColumn(ds->addCopiedColumn(temperature, "temperature")); - graphTemperatureRange->set_xColumn(colDate); - graphTemperatureRange->set_yColumn(ds->addCopiedColumn(temperature_min, "temperature_min")); - graphTemperatureRange->set_yColumn2(ds->addCopiedColumn(temperature_max, "temperature_max")); - - - // 5. min/max range data - // graph fill color is a lighter shade of the average graph - graphTemperatureRange->set_fillColor(graphTemperature->get_color().lighter()); - // don't draw lines of the data - graphTemperatureRange->set_drawLine(false); - // plot label in key - graphTemperatureRange->set_title("Min/Max Temperature"); - // add the graph to the plot, so it is actually displayed - plot.addGraph(graphTemperatureRange); - - // 6. average data - // don't use symbols - graphTemperature->set_symbol(JKQTPnoSymbol); - // set the line width - graphTemperature->set_lineWidth(1); - // draw small symbols - graphTemperature->set_symbolSize(6); - // graph title - graphTemperature->set_title("Average Temperature"); - // add the graph to the plot, so it is actually displayed - plot.addGraph(graphTemperature); - - - // 7. format the plot - // set the title above the plot, use LaTeX instructions to make text bold - plot.get_plotter()->set_plotLabel("\\textbf{Weather in Gelsenkirchen, 2017-2018}"); - // set x-axis date-time-axis - plot.get_xAxis()->set_labelType(JKQTPCALTdatetime); - plot.get_xAxis()->set_axisLabel("Date"); - // set format string for date axis (e.g. Jan '18), see Documentation of QDateTime::toString() - plot.get_xAxis()->set_tickDateTimeFormat("MMM ''yy"); - // set y-axis temperature axis - plot.get_yAxis()->set_axisLabel("Average Daily Temperature [{\\degree}C]"); - - // 8. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // 9. show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - plot.setWindowTitle("Date Axis"); -} - -void drawWithTimeAxis(JKQtPlotter& plot) { - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data vectors with data parsed from a CSV-file - QVector time; - QVector temperature; - // parse a textfile with comments on the first line and the - // semicolon separated data. The first column is a time - // the second contain a floating-point number with temperatures - QFile file(":/weatherdata_heidelberg_2018-10-14.csv"); - file.open(QFile::ReadOnly|QFile::Text); - file.readLine(); // eat comment - while (!file.atEnd()) { - QString line=file.readLine(); - QTextStream in(&line); - QStringList items=line.split(";"); - // date/time values are stored as doubles representing the corresponding - // number of milliseconds sind epoch. Since the data is time only, we have to use an arbitrary - // date as basis - time<addCopiedColumn(time, "time"); - graphTemperature->set_xColumn(colDate); - graphTemperature->set_yColumn(ds->addCopiedColumn(temperature, "temperature")); - - - // 6. average data - // don't use symbols - graphTemperature->set_symbol(JKQTPcross); - // set the line width - graphTemperature->set_lineWidth(1); - // draw small symbols - graphTemperature->set_symbolSize(6); - // graph title - graphTemperature->set_title("Average Temperature"); - // add the graph to the plot, so it is actually displayed - plot.addGraph(graphTemperature); - - - // 7. format the plot - // set the title above the plot, use LaTeX instructions to make text bold - plot.get_plotter()->set_plotLabel("\\textbf{Weather in Heidelberg, 14^{th} Oct 2018}"); - // set x-axis date-time-axis - plot.get_xAxis()->set_labelType(JKQTPCALTtime); - plot.get_xAxis()->set_axisLabel("Time of Day"); - // set format string for time axis with 24-hour and minute only, - // see QDateTime::toString() documentation for details on format strings - plot.get_xAxis()->set_tickTimeFormat("HH:mm"); - // set y-axis temperature axis - plot.get_yAxis()->set_axisLabel("Temperature [{\\degree}C]"); - - // 8. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // 9. show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - plot.setWindowTitle("Time Axis"); -} - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - JKQtPlotter plotDate; - drawWithDateAxis(plotDate); - plotDate.move(100,100); - JKQtPlotter plotTime; - drawWithTimeAxis(plotTime); - plotTime.move(100,550); - - return app.exec(); -} +#include +#include +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplottertools/jkqtptools.h" +#include "jkqtplotter/jkqtpgraphsfilledcurve.h" + +void drawWithDateAxis(JKQtPlotter& plot) { + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data vectors with data parsed from a CSV-file + QVector date; + QVector temperature, temperature_min, temperature_max; + // parse a textfile with comments on the first line and the + // semicolon separated data. The first column is a date and time + // the second to fourth columns contain a floating-point number + // with temperature average, min and max + QFile file(":/weatherdata_gelsenkirchen.csv"); + file.open(QFile::ReadOnly|QFile::Text); + file.readLine(); // eat comment + while (!file.atEnd()) { + QString line=file.readLine(); + QTextStream in(&line); + QStringList items=line.split(";"); + // date/time values are stored as doubles representing the corresponding number of milliseconds sind epoch + date<addCopiedColumn(date, "date"); + graphTemperature->set_xColumn(colDate); + graphTemperature->set_yColumn(ds->addCopiedColumn(temperature, "temperature")); + graphTemperatureRange->set_xColumn(colDate); + graphTemperatureRange->set_yColumn(ds->addCopiedColumn(temperature_min, "temperature_min")); + graphTemperatureRange->set_yColumn2(ds->addCopiedColumn(temperature_max, "temperature_max")); + + + // 5. min/max range data + // graph fill color is a lighter shade of the average graph + graphTemperatureRange->set_fillColor(graphTemperature->get_color().lighter()); + // don't draw lines of the data + graphTemperatureRange->set_drawLine(false); + // plot label in key + graphTemperatureRange->set_title("Min/Max Temperature"); + // add the graph to the plot, so it is actually displayed + plot.addGraph(graphTemperatureRange); + + // 6. average data + // don't use symbols + graphTemperature->set_symbol(JKQTPnoSymbol); + // set the line width + graphTemperature->set_lineWidth(1); + // draw small symbols + graphTemperature->set_symbolSize(6); + // graph title + graphTemperature->set_title("Average Temperature"); + // add the graph to the plot, so it is actually displayed + plot.addGraph(graphTemperature); + + + // 7. format the plot + // set the title above the plot, use LaTeX instructions to make text bold + plot.get_plotter()->set_plotLabel("\\textbf{Weather in Gelsenkirchen, 2017-2018}"); + // set x-axis date-time-axis + plot.get_xAxis()->set_labelType(JKQTPCALTdatetime); + plot.get_xAxis()->set_axisLabel("Date"); + // set format string for date axis (e.g. Jan '18), see Documentation of QDateTime::toString() + plot.get_xAxis()->set_tickDateTimeFormat("MMM ''yy"); + // set y-axis temperature axis + plot.get_yAxis()->set_axisLabel("Average Daily Temperature [{\\degree}C]"); + + // 8. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // 9. show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + plot.setWindowTitle("Date Axis"); +} + +void drawWithTimeAxis(JKQtPlotter& plot) { + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data vectors with data parsed from a CSV-file + QVector time; + QVector temperature; + // parse a textfile with comments on the first line and the + // semicolon separated data. The first column is a time + // the second contain a floating-point number with temperatures + QFile file(":/weatherdata_heidelberg_2018-10-14.csv"); + file.open(QFile::ReadOnly|QFile::Text); + file.readLine(); // eat comment + while (!file.atEnd()) { + QString line=file.readLine(); + QTextStream in(&line); + QStringList items=line.split(";"); + // date/time values are stored as doubles representing the corresponding + // number of milliseconds sind epoch. Since the data is time only, we have to use an arbitrary + // date as basis + time<addCopiedColumn(time, "time"); + graphTemperature->set_xColumn(colDate); + graphTemperature->set_yColumn(ds->addCopiedColumn(temperature, "temperature")); + + + // 6. average data + // don't use symbols + graphTemperature->set_symbol(JKQTPcross); + // set the line width + graphTemperature->set_lineWidth(1); + // draw small symbols + graphTemperature->set_symbolSize(6); + // graph title + graphTemperature->set_title("Average Temperature"); + // add the graph to the plot, so it is actually displayed + plot.addGraph(graphTemperature); + + + // 7. format the plot + // set the title above the plot, use LaTeX instructions to make text bold + plot.get_plotter()->set_plotLabel("\\textbf{Weather in Heidelberg, 14^{th} Oct 2018}"); + // set x-axis date-time-axis + plot.get_xAxis()->set_labelType(JKQTPCALTtime); + plot.get_xAxis()->set_axisLabel("Time of Day"); + // set format string for time axis with 24-hour and minute only, + // see QDateTime::toString() documentation for details on format strings + plot.get_xAxis()->set_tickTimeFormat("HH:mm"); + // set y-axis temperature axis + plot.get_yAxis()->set_axisLabel("Temperature [{\\degree}C]"); + + // 8. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // 9. show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + plot.setWindowTitle("Time Axis"); +} + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + JKQtPlotter plotDate; + drawWithDateAxis(plotDate); + plotDate.move(100,100); + JKQtPlotter plotTime; + drawWithTimeAxis(plotTime); + plotTime.move(100,550); + + return app.exec(); +} diff --git a/test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro similarity index 73% rename from test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro rename to examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro index 8472f9c5a0..7ad1ea6314 100644 --- a/test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro +++ b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro @@ -1,24 +1,28 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_dateaxes.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_dateaxes - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER - -RESOURCES += \ - jkqtplotter_simpletest_dateaxes.qrc +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_dateaxes.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_dateaxes + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER + +RESOURCES += \ + jkqtplotter_simpletest_dateaxes.qrc diff --git a/test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.qrc b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.qrc similarity index 96% rename from test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.qrc rename to examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.qrc index 93bf12d449..46fdf4b961 100644 --- a/test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.qrc +++ b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.qrc @@ -1,7 +1,7 @@ - - - weatherdata_gelsenkirchen.csv - weatherdata_heidelberg_2018-10-14.csv - weatherdata_heidelberg.csv - - + + + weatherdata_gelsenkirchen.csv + weatherdata_heidelberg_2018-10-14.csv + weatherdata_heidelberg.csv + + diff --git a/test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes_and_lib.pro b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes_and_lib.pro similarity index 97% rename from test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes_and_lib.pro rename to examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes_and_lib.pro index 60274292e5..ede7419e2a 100644 --- a/test/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes_and_lib.pro +++ b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_dateaxes - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_dateaxes.file=$$PWD/jkqtplotter_simpletest_dateaxes.pro -jkqtplotter_simpletest_dateaxes.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_dateaxes + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_dateaxes.file=$$PWD/jkqtplotter_simpletest_dateaxes.pro +jkqtplotter_simpletest_dateaxes.depends = jkqtplotterlib diff --git a/test/simpletest_dateaxes/weatherdata_gelsenkirchen.csv b/examples/simpletest_dateaxes/weatherdata_gelsenkirchen.csv similarity index 97% rename from test/simpletest_dateaxes/weatherdata_gelsenkirchen.csv rename to examples/simpletest_dateaxes/weatherdata_gelsenkirchen.csv index 766bd02b6d..4ab828df2e 100644 --- a/test/simpletest_dateaxes/weatherdata_gelsenkirchen.csv +++ b/examples/simpletest_dateaxes/weatherdata_gelsenkirchen.csv @@ -1,24 +1,24 @@ -Datum;Zeit;Temp_mean[degC];Temp_min[degC];Temp_max[degC]; data from http://wetter.mpg-ge.de/NOAA/NOAA-2018.txt and http://wetter.mpg-ge.de/NOAA/NOAA-2017.txt -2017-01-15T12:00; 1.2; -1.2; 3.7 -2017-02-15T12:00; 5.6; 3.2; 8.1 -2017-03-15T12:00; 9.6; 6.2; 13.5 -2017-04-15T12:00; 8.9; 5.1; 12.9 -2017-05-15T12:00; 16.0; 11.4; 20.8 -2017-06-15T12:00; 19.2; 15.0; 23.5 -2017-07-15T12:00; 19.1; 15.2; 23.4 -2017-08-15T12:00; 18.5; 14.7; 22.5 -2017-09-15T12:00; 14.4; 11.4; 18.3 -2017-10-15T12:00; 13.1; 10.8; 16.0 -2017-11-15T12:00; 7.5; 5.6; 9.7 -2017-12-15T12:00; 4.2; 2.6; 5.9 -2018-01-15T12:00; 5.7; 3.7; 7.8 -2018-02-15T12:00; 0.4; -1.9; 3.2 -2018-03-15T12:00; 5.0; 1.5; 8.5 -2018-04-15T12:00; 14.3; 9.8; 18.9 -2018-05-15T12:00; 16.7; 12.3; 21.2 -2018-06-15T12:00; 18.3; 14.5; 22.7 -2018-07-15T12:00; 22.2; 16.4; 27.9 -2018-08-15T12:00; 20.5; 15.9; 25.6 -2018-09-15T12:00; 16.2; 12.1; 20.8 -2018-10-15T12:00; 13.0; 9.6; 17.0 -2018-11-15T12:00; 7.2; 4.8; 10.0 +Datum;Zeit;Temp_mean[degC];Temp_min[degC];Temp_max[degC]; data from http://wetter.mpg-ge.de/NOAA/NOAA-2018.txt and http://wetter.mpg-ge.de/NOAA/NOAA-2017.txt +2017-01-15T12:00; 1.2; -1.2; 3.7 +2017-02-15T12:00; 5.6; 3.2; 8.1 +2017-03-15T12:00; 9.6; 6.2; 13.5 +2017-04-15T12:00; 8.9; 5.1; 12.9 +2017-05-15T12:00; 16.0; 11.4; 20.8 +2017-06-15T12:00; 19.2; 15.0; 23.5 +2017-07-15T12:00; 19.1; 15.2; 23.4 +2017-08-15T12:00; 18.5; 14.7; 22.5 +2017-09-15T12:00; 14.4; 11.4; 18.3 +2017-10-15T12:00; 13.1; 10.8; 16.0 +2017-11-15T12:00; 7.5; 5.6; 9.7 +2017-12-15T12:00; 4.2; 2.6; 5.9 +2018-01-15T12:00; 5.7; 3.7; 7.8 +2018-02-15T12:00; 0.4; -1.9; 3.2 +2018-03-15T12:00; 5.0; 1.5; 8.5 +2018-04-15T12:00; 14.3; 9.8; 18.9 +2018-05-15T12:00; 16.7; 12.3; 21.2 +2018-06-15T12:00; 18.3; 14.5; 22.7 +2018-07-15T12:00; 22.2; 16.4; 27.9 +2018-08-15T12:00; 20.5; 15.9; 25.6 +2018-09-15T12:00; 16.2; 12.1; 20.8 +2018-10-15T12:00; 13.0; 9.6; 17.0 +2018-11-15T12:00; 7.2; 4.8; 10.0 diff --git a/test/simpletest_dateaxes/weatherdata_heidelberg.csv b/examples/simpletest_dateaxes/weatherdata_heidelberg.csv similarity index 96% rename from test/simpletest_dateaxes/weatherdata_heidelberg.csv rename to examples/simpletest_dateaxes/weatherdata_heidelberg.csv index 7a345b510b..315f2fa5a0 100644 --- a/test/simpletest_dateaxes/weatherdata_heidelberg.csv +++ b/examples/simpletest_dateaxes/weatherdata_heidelberg.csv @@ -1,289 +1,289 @@ -2018-10-14T00:00:00; 24.2 -2018-10-14T00:10:00; 24.2 -2018-10-14T00:20:00; 24.1 -2018-10-14T00:30:00; 24.1 -2018-10-14T00:40:00; 24.1 -2018-10-14T00:50:00; 24.0 -2018-10-14T01:00:00; 24.0 -2018-10-14T01:10:00; 24.0 -2018-10-14T01:20:00; 24.0 -2018-10-14T01:30:00; 24.0 -2018-10-14T01:40:00; 23.9 -2018-10-14T01:50:00; 23.9 -2018-10-14T02:00:00; 23.8 -2018-10-14T02:10:00; 23.8 -2018-10-14T02:20:00; 23.8 -2018-10-14T02:30:00; 23.8 -2018-10-14T02:40:00; 23.8 -2018-10-14T02:50:00; 23.7 -2018-10-14T03:00:00; 23.7 -2018-10-14T03:10:00; 23.7 -2018-10-14T03:20:00; 23.6 -2018-10-14T03:30:00; 23.6 -2018-10-14T03:40:00; 23.6 -2018-10-14T03:50:00; 23.6 -2018-10-14T04:00:00; 23.6 -2018-10-14T04:10:00; 23.6 -2018-10-14T04:20:00; 23.6 -2018-10-14T04:30:00; 23.6 -2018-10-14T04:40:00; 23.6 -2018-10-14T04:50:00; 23.5 -2018-10-14T05:00:00; 23.5 -2018-10-14T05:10:00; 23.5 -2018-10-14T05:20:00; 23.4 -2018-10-14T05:30:00; 23.4 -2018-10-14T05:40:00; 23.4 -2018-10-14T05:50:00; 23.4 -2018-10-14T06:00:00; 23.4 -2018-10-14T06:10:00; 23.4 -2018-10-14T06:20:00; 23.4 -2018-10-14T06:30:00; 23.4 -2018-10-14T06:40:00; 23.4 -2018-10-14T06:50:00; 23.4 -2018-10-14T07:00:00; 23.4 -2018-10-14T07:10:00; 23.4 -2018-10-14T07:20:00; 23.4 -2018-10-14T07:30:00; 23.4 -2018-10-14T07:40:00; 23.4 -2018-10-14T07:50:00; 23.4 -2018-10-14T08:00:00; 23.4 -2018-10-14T08:10:00; 23.3 -2018-10-14T08:20:00; 23.3 -2018-10-14T08:30:00; 23.2 -2018-10-14T08:40:00; 23.2 -2018-10-14T08:50:00; 23.2 -2018-10-14T09:00:00; 23.1 -2018-10-14T09:10:00; 23.1 -2018-10-14T09:20:00; 23.0 -2018-10-14T09:30:00; 23.0 -2018-10-14T09:40:00; 23.0 -2018-10-14T09:50:00; 23.1 -2018-10-14T10:00:00; 23.1 -2018-10-14T10:10:00; 23.2 -2018-10-14T10:20:00; 23.2 -2018-10-14T10:30:00; 23.3 -2018-10-14T10:40:00; 23.4 -2018-10-14T10:50:00; 23.5 -2018-10-14T11:00:00; 23.6 -2018-10-14T11:10:00; 23.8 -2018-10-14T11:20:00; 24.0 -2018-10-14T11:30:00; 24.3 -2018-10-14T11:40:00; 24.6 -2018-10-14T11:50:00; 24.9 -2018-10-14T12:00:00; 25.3 -2018-10-14T12:10:00; 25.6 -2018-10-14T12:20:00; 25.8 -2018-10-14T12:30:00; 25.8 -2018-10-14T12:40:00; 25.8 -2018-10-14T12:50:00; 25.8 -2018-10-14T13:00:00; 25.8 -2018-10-14T13:10:00; 25.9 -2018-10-14T13:20:00; 26.1 -2018-10-14T13:30:00; 26.3 -2018-10-14T13:40:00; 26.5 -2018-10-14T13:50:00; 26.6 -2018-10-14T14:00:00; 26.8 -2018-10-14T14:10:00; 26.9 -2018-10-14T14:20:00; 27.0 -2018-10-14T14:30:00; 27.2 -2018-10-14T14:40:00; 27.2 -2018-10-14T14:50:00; 27.4 -2018-10-14T15:00:00; 27.4 -2018-10-14T15:10:00; 27.4 -2018-10-14T15:20:00; 27.4 -2018-10-14T15:30:00; 27.5 -2018-10-14T15:40:00; 27.5 -2018-10-14T15:50:00; 27.5 -2018-10-14T16:00:00; 27.5 -2018-10-14T16:10:00; 27.4 -2018-10-14T16:20:00; 27.3 -2018-10-14T16:30:00; 27.0 -2018-10-14T16:40:00; 26.8 -2018-10-14T16:50:00; 26.0 -2018-10-14T17:00:00; 25.5 -2018-10-14T17:10:00; 25.3 -2018-10-14T17:20:00; 25.1 -2018-10-14T17:30:00; 24.9 -2018-10-14T17:40:00; 24.7 -2018-10-14T17:50:00; 24.5 -2018-10-14T18:00:00; 24.3 -2018-10-14T18:10:00; 24.2 -2018-10-14T18:20:00; 24.1 -2018-10-14T18:30:00; 24.0 -2018-10-14T18:40:00; 23.8 -2018-10-14T18:50:00; 23.8 -2018-10-14T19:00:00; 23.7 -2018-10-14T19:10:00; 23.6 -2018-10-14T19:20:00; 23.6 -2018-10-14T19:30:00; 23.4 -2018-10-14T19:40:00; 23.2 -2018-10-14T19:50:00; 23.2 -2018-10-14T20:00:00; 23.1 -2018-10-14T20:10:00; 23.0 -2018-10-14T20:20:00; 23.4 -2018-10-14T20:30:00; 24.0 -2018-10-14T20:40:00; 24.5 -2018-10-14T20:50:00; 24.8 -2018-10-14T21:00:00; 25.1 -2018-10-14T21:10:00; 25.4 -2018-10-14T21:20:00; 25.6 -2018-10-14T21:30:00; 25.6 -2018-10-14T21:40:00; 25.8 -2018-10-14T21:50:00; 25.9 -2018-10-14T22:00:00; 25.9 -2018-10-14T22:10:00; 26.0 -2018-10-14T22:20:00; 26.0 -2018-10-14T22:30:00; 26.0 -2018-10-14T22:40:00; 26.0 -2018-10-14T22:50:00; 26.0 -2018-10-14T23:00:00; 26.0 -2018-10-14T23:10:00; 26.0 -2018-10-14T23:20:00; 26.0 -2018-10-14T23:30:00; 26.0 -2018-10-14T23:40:00; 25.8 -2018-10-14T23:50:00; 25.6 -2018-10-15T00:00:00; 25.4 -2018-10-15T00:10:00; 25.2 -2018-10-15T00:20:00; 25.0 -2018-10-15T00:30:00; 24.9 -2018-10-15T00:40:00; 24.8 -2018-10-15T00:50:00; 24.6 -2018-10-15T01:00:00; 24.5 -2018-10-15T01:10:00; 24.4 -2018-10-15T01:20:00; 24.4 -2018-10-15T01:30:00; 24.3 -2018-10-15T01:40:00; 24.2 -2018-10-15T01:50:00; 24.2 -2018-10-15T02:00:00; 24.1 -2018-10-15T02:10:00; 24.0 -2018-10-15T02:20:00; 24.0 -2018-10-15T02:30:00; 23.9 -2018-10-15T02:40:00; 23.8 -2018-10-15T02:50:00; 23.8 -2018-10-15T03:00:00; 23.7 -2018-10-15T03:10:00; 23.7 -2018-10-15T03:20:00; 23.6 -2018-10-15T03:30:00; 23.6 -2018-10-15T03:40:00; 23.5 -2018-10-15T03:50:00; 23.5 -2018-10-15T04:00:00; 23.4 -2018-10-15T04:10:00; 23.4 -2018-10-15T04:20:00; 23.4 -2018-10-15T04:30:00; 23.3 -2018-10-15T04:40:00; 23.2 -2018-10-15T04:50:00; 23.2 -2018-10-15T05:00:00; 23.2 -2018-10-15T05:10:00; 23.1 -2018-10-15T05:20:00; 23.2 -2018-10-15T05:30:00; 23.1 -2018-10-15T05:39:00; 23.1 -2018-10-15T05:40:00; 23.1 -2018-10-15T05:50:00; 23.1 -2018-10-15T06:00:00; 23.1 -2018-10-15T06:10:00; 23.1 -2018-10-15T06:20:00; 23.0 -2018-10-15T06:30:00; 23.0 -2018-10-15T06:40:00; 23.0 -2018-10-15T06:50:00; 23.0 -2018-10-15T07:00:00; 23.0 -2018-10-15T07:10:00; 23.0 -2018-10-15T07:20:00; 23.0 -2018-10-15T07:30:00; 22.9 -2018-10-15T07:40:00; 22.9 -2018-10-15T07:50:00; 22.9 -2018-10-15T08:00:00; 22.9 -2018-10-15T08:10:00; 22.8 -2018-10-15T08:20:00; 22.8 -2018-10-15T08:30:00; 22.8 -2018-10-15T08:40:00; 22.8 -2018-10-15T08:50:00; 22.8 -2018-10-15T09:00:00; 22.8 -2018-10-15T09:10:00; 22.8 -2018-10-15T09:20:00; 22.8 -2018-10-15T09:30:00; 22.8 -2018-10-15T09:40:00; 22.8 -2018-10-15T09:50:00; 22.8 -2018-10-15T10:00:00; 22.6 -2018-10-15T10:10:00; 22.3 -2018-10-15T10:20:00; 22.1 -2018-10-15T10:30:00; 21.9 -2018-10-15T10:40:00; 21.8 -2018-10-15T10:50:00; 22.0 -2018-10-15T11:00:00; 22.4 -2018-10-15T11:10:00; 22.6 -2018-10-15T11:20:00; 23.0 -2018-10-15T11:30:00; 23.4 -2018-10-15T11:40:00; 23.8 -2018-10-15T11:50:00; 24.2 -2018-10-15T12:00:00; 24.4 -2018-10-15T12:10:00; 24.8 -2018-10-15T12:20:00; 25.0 -2018-10-15T12:30:00; 25.2 -2018-10-15T12:40:00; 25.3 -2018-10-15T12:50:00; 25.4 -2018-10-15T13:00:00; 25.5 -2018-10-15T13:10:00; 25.7 -2018-10-15T13:20:00; 26.0 -2018-10-15T13:30:00; 26.4 -2018-10-15T13:40:00; 26.6 -2018-10-15T13:50:00; 26.9 -2018-10-15T14:00:00; 27.1 -2018-10-15T14:10:00; 27.3 -2018-10-15T14:20:00; 27.3 -2018-10-15T14:30:00; 27.5 -2018-10-15T14:40:00; 27.6 -2018-10-15T14:50:00; 27.7 -2018-10-15T15:00:00; 27.8 -2018-10-15T15:10:00; 27.9 -2018-10-15T15:20:00; 28.0 -2018-10-15T15:30:00; 28.0 -2018-10-15T15:40:00; 28.0 -2018-10-15T15:50:00; 28.1 -2018-10-15T16:00:00; 28.2 -2018-10-15T16:10:00; 28.0 -2018-10-15T16:20:00; 28.0 -2018-10-15T16:30:00; 27.8 -2018-10-15T16:40:00; 27.6 -2018-10-15T16:50:00; 27.4 -2018-10-15T17:00:00; 27.2 -2018-10-15T17:10:00; 27.0 -2018-10-15T17:20:00; 26.8 -2018-10-15T17:30:00; 26.7 -2018-10-15T17:40:00; 26.6 -2018-10-15T17:50:00; 26.4 -2018-10-15T18:00:00; 26.3 -2018-10-15T18:10:00; 26.2 -2018-10-15T18:20:00; 26.1 -2018-10-15T18:30:00; 26.0 -2018-10-15T18:40:00; 25.9 -2018-10-15T18:50:00; 25.8 -2018-10-15T19:00:00; 25.7 -2018-10-15T19:10:00; 25.6 -2018-10-15T19:20:00; 25.5 -2018-10-15T19:30:00; 25.4 -2018-10-15T19:40:00; 25.4 -2018-10-15T19:50:00; 25.3 -2018-10-15T20:00:00; 25.2 -2018-10-15T20:10:00; 25.0 -2018-10-15T20:20:00; 24.9 -2018-10-15T20:30:00; 24.8 -2018-10-15T20:40:00; 24.7 -2018-10-15T20:50:00; 24.6 -2018-10-15T21:00:00; 24.5 -2018-10-15T21:10:00; 24.4 -2018-10-15T21:20:00; 24.4 -2018-10-15T21:30:00; 24.3 -2018-10-15T21:40:00; 24.3 -2018-10-15T21:50:00; 24.2 -2018-10-15T22:00:00; 24.2 -2018-10-15T22:10:00; 24.1 -2018-10-15T22:20:00; 24.1 -2018-10-15T22:30:00; 24.0 -2018-10-15T22:40:00; 24.0 -2018-10-15T22:50:00; 24.0 -2018-10-15T23:00:00; 23.9 -2018-10-15T23:10:00; 23.9 -2018-10-15T23:20:00; 23.8 -2018-10-15T23:30:00; 23.8 -2018-10-15T23:40:00; 23.8 -2018-10-15T23:50:00; 23.7 +2018-10-14T00:00:00; 24.2 +2018-10-14T00:10:00; 24.2 +2018-10-14T00:20:00; 24.1 +2018-10-14T00:30:00; 24.1 +2018-10-14T00:40:00; 24.1 +2018-10-14T00:50:00; 24.0 +2018-10-14T01:00:00; 24.0 +2018-10-14T01:10:00; 24.0 +2018-10-14T01:20:00; 24.0 +2018-10-14T01:30:00; 24.0 +2018-10-14T01:40:00; 23.9 +2018-10-14T01:50:00; 23.9 +2018-10-14T02:00:00; 23.8 +2018-10-14T02:10:00; 23.8 +2018-10-14T02:20:00; 23.8 +2018-10-14T02:30:00; 23.8 +2018-10-14T02:40:00; 23.8 +2018-10-14T02:50:00; 23.7 +2018-10-14T03:00:00; 23.7 +2018-10-14T03:10:00; 23.7 +2018-10-14T03:20:00; 23.6 +2018-10-14T03:30:00; 23.6 +2018-10-14T03:40:00; 23.6 +2018-10-14T03:50:00; 23.6 +2018-10-14T04:00:00; 23.6 +2018-10-14T04:10:00; 23.6 +2018-10-14T04:20:00; 23.6 +2018-10-14T04:30:00; 23.6 +2018-10-14T04:40:00; 23.6 +2018-10-14T04:50:00; 23.5 +2018-10-14T05:00:00; 23.5 +2018-10-14T05:10:00; 23.5 +2018-10-14T05:20:00; 23.4 +2018-10-14T05:30:00; 23.4 +2018-10-14T05:40:00; 23.4 +2018-10-14T05:50:00; 23.4 +2018-10-14T06:00:00; 23.4 +2018-10-14T06:10:00; 23.4 +2018-10-14T06:20:00; 23.4 +2018-10-14T06:30:00; 23.4 +2018-10-14T06:40:00; 23.4 +2018-10-14T06:50:00; 23.4 +2018-10-14T07:00:00; 23.4 +2018-10-14T07:10:00; 23.4 +2018-10-14T07:20:00; 23.4 +2018-10-14T07:30:00; 23.4 +2018-10-14T07:40:00; 23.4 +2018-10-14T07:50:00; 23.4 +2018-10-14T08:00:00; 23.4 +2018-10-14T08:10:00; 23.3 +2018-10-14T08:20:00; 23.3 +2018-10-14T08:30:00; 23.2 +2018-10-14T08:40:00; 23.2 +2018-10-14T08:50:00; 23.2 +2018-10-14T09:00:00; 23.1 +2018-10-14T09:10:00; 23.1 +2018-10-14T09:20:00; 23.0 +2018-10-14T09:30:00; 23.0 +2018-10-14T09:40:00; 23.0 +2018-10-14T09:50:00; 23.1 +2018-10-14T10:00:00; 23.1 +2018-10-14T10:10:00; 23.2 +2018-10-14T10:20:00; 23.2 +2018-10-14T10:30:00; 23.3 +2018-10-14T10:40:00; 23.4 +2018-10-14T10:50:00; 23.5 +2018-10-14T11:00:00; 23.6 +2018-10-14T11:10:00; 23.8 +2018-10-14T11:20:00; 24.0 +2018-10-14T11:30:00; 24.3 +2018-10-14T11:40:00; 24.6 +2018-10-14T11:50:00; 24.9 +2018-10-14T12:00:00; 25.3 +2018-10-14T12:10:00; 25.6 +2018-10-14T12:20:00; 25.8 +2018-10-14T12:30:00; 25.8 +2018-10-14T12:40:00; 25.8 +2018-10-14T12:50:00; 25.8 +2018-10-14T13:00:00; 25.8 +2018-10-14T13:10:00; 25.9 +2018-10-14T13:20:00; 26.1 +2018-10-14T13:30:00; 26.3 +2018-10-14T13:40:00; 26.5 +2018-10-14T13:50:00; 26.6 +2018-10-14T14:00:00; 26.8 +2018-10-14T14:10:00; 26.9 +2018-10-14T14:20:00; 27.0 +2018-10-14T14:30:00; 27.2 +2018-10-14T14:40:00; 27.2 +2018-10-14T14:50:00; 27.4 +2018-10-14T15:00:00; 27.4 +2018-10-14T15:10:00; 27.4 +2018-10-14T15:20:00; 27.4 +2018-10-14T15:30:00; 27.5 +2018-10-14T15:40:00; 27.5 +2018-10-14T15:50:00; 27.5 +2018-10-14T16:00:00; 27.5 +2018-10-14T16:10:00; 27.4 +2018-10-14T16:20:00; 27.3 +2018-10-14T16:30:00; 27.0 +2018-10-14T16:40:00; 26.8 +2018-10-14T16:50:00; 26.0 +2018-10-14T17:00:00; 25.5 +2018-10-14T17:10:00; 25.3 +2018-10-14T17:20:00; 25.1 +2018-10-14T17:30:00; 24.9 +2018-10-14T17:40:00; 24.7 +2018-10-14T17:50:00; 24.5 +2018-10-14T18:00:00; 24.3 +2018-10-14T18:10:00; 24.2 +2018-10-14T18:20:00; 24.1 +2018-10-14T18:30:00; 24.0 +2018-10-14T18:40:00; 23.8 +2018-10-14T18:50:00; 23.8 +2018-10-14T19:00:00; 23.7 +2018-10-14T19:10:00; 23.6 +2018-10-14T19:20:00; 23.6 +2018-10-14T19:30:00; 23.4 +2018-10-14T19:40:00; 23.2 +2018-10-14T19:50:00; 23.2 +2018-10-14T20:00:00; 23.1 +2018-10-14T20:10:00; 23.0 +2018-10-14T20:20:00; 23.4 +2018-10-14T20:30:00; 24.0 +2018-10-14T20:40:00; 24.5 +2018-10-14T20:50:00; 24.8 +2018-10-14T21:00:00; 25.1 +2018-10-14T21:10:00; 25.4 +2018-10-14T21:20:00; 25.6 +2018-10-14T21:30:00; 25.6 +2018-10-14T21:40:00; 25.8 +2018-10-14T21:50:00; 25.9 +2018-10-14T22:00:00; 25.9 +2018-10-14T22:10:00; 26.0 +2018-10-14T22:20:00; 26.0 +2018-10-14T22:30:00; 26.0 +2018-10-14T22:40:00; 26.0 +2018-10-14T22:50:00; 26.0 +2018-10-14T23:00:00; 26.0 +2018-10-14T23:10:00; 26.0 +2018-10-14T23:20:00; 26.0 +2018-10-14T23:30:00; 26.0 +2018-10-14T23:40:00; 25.8 +2018-10-14T23:50:00; 25.6 +2018-10-15T00:00:00; 25.4 +2018-10-15T00:10:00; 25.2 +2018-10-15T00:20:00; 25.0 +2018-10-15T00:30:00; 24.9 +2018-10-15T00:40:00; 24.8 +2018-10-15T00:50:00; 24.6 +2018-10-15T01:00:00; 24.5 +2018-10-15T01:10:00; 24.4 +2018-10-15T01:20:00; 24.4 +2018-10-15T01:30:00; 24.3 +2018-10-15T01:40:00; 24.2 +2018-10-15T01:50:00; 24.2 +2018-10-15T02:00:00; 24.1 +2018-10-15T02:10:00; 24.0 +2018-10-15T02:20:00; 24.0 +2018-10-15T02:30:00; 23.9 +2018-10-15T02:40:00; 23.8 +2018-10-15T02:50:00; 23.8 +2018-10-15T03:00:00; 23.7 +2018-10-15T03:10:00; 23.7 +2018-10-15T03:20:00; 23.6 +2018-10-15T03:30:00; 23.6 +2018-10-15T03:40:00; 23.5 +2018-10-15T03:50:00; 23.5 +2018-10-15T04:00:00; 23.4 +2018-10-15T04:10:00; 23.4 +2018-10-15T04:20:00; 23.4 +2018-10-15T04:30:00; 23.3 +2018-10-15T04:40:00; 23.2 +2018-10-15T04:50:00; 23.2 +2018-10-15T05:00:00; 23.2 +2018-10-15T05:10:00; 23.1 +2018-10-15T05:20:00; 23.2 +2018-10-15T05:30:00; 23.1 +2018-10-15T05:39:00; 23.1 +2018-10-15T05:40:00; 23.1 +2018-10-15T05:50:00; 23.1 +2018-10-15T06:00:00; 23.1 +2018-10-15T06:10:00; 23.1 +2018-10-15T06:20:00; 23.0 +2018-10-15T06:30:00; 23.0 +2018-10-15T06:40:00; 23.0 +2018-10-15T06:50:00; 23.0 +2018-10-15T07:00:00; 23.0 +2018-10-15T07:10:00; 23.0 +2018-10-15T07:20:00; 23.0 +2018-10-15T07:30:00; 22.9 +2018-10-15T07:40:00; 22.9 +2018-10-15T07:50:00; 22.9 +2018-10-15T08:00:00; 22.9 +2018-10-15T08:10:00; 22.8 +2018-10-15T08:20:00; 22.8 +2018-10-15T08:30:00; 22.8 +2018-10-15T08:40:00; 22.8 +2018-10-15T08:50:00; 22.8 +2018-10-15T09:00:00; 22.8 +2018-10-15T09:10:00; 22.8 +2018-10-15T09:20:00; 22.8 +2018-10-15T09:30:00; 22.8 +2018-10-15T09:40:00; 22.8 +2018-10-15T09:50:00; 22.8 +2018-10-15T10:00:00; 22.6 +2018-10-15T10:10:00; 22.3 +2018-10-15T10:20:00; 22.1 +2018-10-15T10:30:00; 21.9 +2018-10-15T10:40:00; 21.8 +2018-10-15T10:50:00; 22.0 +2018-10-15T11:00:00; 22.4 +2018-10-15T11:10:00; 22.6 +2018-10-15T11:20:00; 23.0 +2018-10-15T11:30:00; 23.4 +2018-10-15T11:40:00; 23.8 +2018-10-15T11:50:00; 24.2 +2018-10-15T12:00:00; 24.4 +2018-10-15T12:10:00; 24.8 +2018-10-15T12:20:00; 25.0 +2018-10-15T12:30:00; 25.2 +2018-10-15T12:40:00; 25.3 +2018-10-15T12:50:00; 25.4 +2018-10-15T13:00:00; 25.5 +2018-10-15T13:10:00; 25.7 +2018-10-15T13:20:00; 26.0 +2018-10-15T13:30:00; 26.4 +2018-10-15T13:40:00; 26.6 +2018-10-15T13:50:00; 26.9 +2018-10-15T14:00:00; 27.1 +2018-10-15T14:10:00; 27.3 +2018-10-15T14:20:00; 27.3 +2018-10-15T14:30:00; 27.5 +2018-10-15T14:40:00; 27.6 +2018-10-15T14:50:00; 27.7 +2018-10-15T15:00:00; 27.8 +2018-10-15T15:10:00; 27.9 +2018-10-15T15:20:00; 28.0 +2018-10-15T15:30:00; 28.0 +2018-10-15T15:40:00; 28.0 +2018-10-15T15:50:00; 28.1 +2018-10-15T16:00:00; 28.2 +2018-10-15T16:10:00; 28.0 +2018-10-15T16:20:00; 28.0 +2018-10-15T16:30:00; 27.8 +2018-10-15T16:40:00; 27.6 +2018-10-15T16:50:00; 27.4 +2018-10-15T17:00:00; 27.2 +2018-10-15T17:10:00; 27.0 +2018-10-15T17:20:00; 26.8 +2018-10-15T17:30:00; 26.7 +2018-10-15T17:40:00; 26.6 +2018-10-15T17:50:00; 26.4 +2018-10-15T18:00:00; 26.3 +2018-10-15T18:10:00; 26.2 +2018-10-15T18:20:00; 26.1 +2018-10-15T18:30:00; 26.0 +2018-10-15T18:40:00; 25.9 +2018-10-15T18:50:00; 25.8 +2018-10-15T19:00:00; 25.7 +2018-10-15T19:10:00; 25.6 +2018-10-15T19:20:00; 25.5 +2018-10-15T19:30:00; 25.4 +2018-10-15T19:40:00; 25.4 +2018-10-15T19:50:00; 25.3 +2018-10-15T20:00:00; 25.2 +2018-10-15T20:10:00; 25.0 +2018-10-15T20:20:00; 24.9 +2018-10-15T20:30:00; 24.8 +2018-10-15T20:40:00; 24.7 +2018-10-15T20:50:00; 24.6 +2018-10-15T21:00:00; 24.5 +2018-10-15T21:10:00; 24.4 +2018-10-15T21:20:00; 24.4 +2018-10-15T21:30:00; 24.3 +2018-10-15T21:40:00; 24.3 +2018-10-15T21:50:00; 24.2 +2018-10-15T22:00:00; 24.2 +2018-10-15T22:10:00; 24.1 +2018-10-15T22:20:00; 24.1 +2018-10-15T22:30:00; 24.0 +2018-10-15T22:40:00; 24.0 +2018-10-15T22:50:00; 24.0 +2018-10-15T23:00:00; 23.9 +2018-10-15T23:10:00; 23.9 +2018-10-15T23:20:00; 23.8 +2018-10-15T23:30:00; 23.8 +2018-10-15T23:40:00; 23.8 +2018-10-15T23:50:00; 23.7 diff --git a/test/simpletest_dateaxes/weatherdata_heidelberg_2018-10-14.csv b/examples/simpletest_dateaxes/weatherdata_heidelberg_2018-10-14.csv similarity index 93% rename from test/simpletest_dateaxes/weatherdata_heidelberg_2018-10-14.csv rename to examples/simpletest_dateaxes/weatherdata_heidelberg_2018-10-14.csv index c5b32aafa6..aefbf2ac47 100644 --- a/test/simpletest_dateaxes/weatherdata_heidelberg_2018-10-14.csv +++ b/examples/simpletest_dateaxes/weatherdata_heidelberg_2018-10-14.csv @@ -1,145 +1,145 @@ -Time; Temperature [degC] -00:00:00; 24.2 -00:10:00; 24.2 -00:20:00; 24.1 -00:30:00; 24.1 -00:40:00; 24.1 -00:50:00; 24.0 -01:00:00; 24.0 -01:10:00; 24.0 -01:20:00; 24.0 -01:30:00; 24.0 -01:40:00; 23.9 -01:50:00; 23.9 -02:00:00; 23.8 -02:10:00; 23.8 -02:20:00; 23.8 -02:30:00; 23.8 -02:40:00; 23.8 -02:50:00; 23.7 -03:00:00; 23.7 -03:10:00; 23.7 -03:20:00; 23.6 -03:30:00; 23.6 -03:40:00; 23.6 -03:50:00; 23.6 -04:00:00; 23.6 -04:10:00; 23.6 -04:20:00; 23.6 -04:30:00; 23.6 -04:40:00; 23.6 -04:50:00; 23.5 -05:00:00; 23.5 -05:10:00; 23.5 -05:20:00; 23.4 -05:30:00; 23.4 -05:40:00; 23.4 -05:50:00; 23.4 -06:00:00; 23.4 -06:10:00; 23.4 -06:20:00; 23.4 -06:30:00; 23.4 -06:40:00; 23.4 -06:50:00; 23.4 -07:00:00; 23.4 -07:10:00; 23.4 -07:20:00; 23.4 -07:30:00; 23.4 -07:40:00; 23.4 -07:50:00; 23.4 -08:00:00; 23.4 -08:10:00; 23.3 -08:20:00; 23.3 -08:30:00; 23.2 -08:40:00; 23.2 -08:50:00; 23.2 -09:00:00; 23.1 -09:10:00; 23.1 -09:20:00; 23.0 -09:30:00; 23.0 -09:40:00; 23.0 -09:50:00; 23.1 -10:00:00; 23.1 -10:10:00; 23.2 -10:20:00; 23.2 -10:30:00; 23.3 -10:40:00; 23.4 -10:50:00; 23.5 -11:00:00; 23.6 -11:10:00; 23.8 -11:20:00; 24.0 -11:30:00; 24.3 -11:40:00; 24.6 -11:50:00; 24.9 -12:00:00; 25.3 -12:10:00; 25.6 -12:20:00; 25.8 -12:30:00; 25.8 -12:40:00; 25.8 -12:50:00; 25.8 -13:00:00; 25.8 -13:10:00; 25.9 -13:20:00; 26.1 -13:30:00; 26.3 -13:40:00; 26.5 -13:50:00; 26.6 -14:00:00; 26.8 -14:10:00; 26.9 -14:20:00; 27.0 -14:30:00; 27.2 -14:40:00; 27.2 -14:50:00; 27.4 -15:00:00; 27.4 -15:10:00; 27.4 -15:20:00; 27.4 -15:30:00; 27.5 -15:40:00; 27.5 -15:50:00; 27.5 -16:00:00; 27.5 -16:10:00; 27.4 -16:20:00; 27.3 -16:30:00; 27.0 -16:40:00; 26.8 -16:50:00; 26.0 -17:00:00; 25.5 -17:10:00; 25.3 -17:20:00; 25.1 -17:30:00; 24.9 -17:40:00; 24.7 -17:50:00; 24.5 -18:00:00; 24.3 -18:10:00; 24.2 -18:20:00; 24.1 -18:30:00; 24.0 -18:40:00; 23.8 -18:50:00; 23.8 -19:00:00; 23.7 -19:10:00; 23.6 -19:20:00; 23.6 -19:30:00; 23.4 -19:40:00; 23.2 -19:50:00; 23.2 -20:00:00; 23.1 -20:10:00; 23.0 -20:20:00; 23.4 -20:30:00; 24.0 -20:40:00; 24.5 -20:50:00; 24.8 -21:00:00; 25.1 -21:10:00; 25.4 -21:20:00; 25.6 -21:30:00; 25.6 -21:40:00; 25.8 -21:50:00; 25.9 -22:00:00; 25.9 -22:10:00; 26.0 -22:20:00; 26.0 -22:30:00; 26.0 -22:40:00; 26.0 -22:50:00; 26.0 -23:00:00; 26.0 -23:10:00; 26.0 -23:20:00; 26.0 -23:30:00; 26.0 -23:40:00; 25.8 -23:50:00; 25.6 +Time; Temperature [degC] +00:00:00; 24.2 +00:10:00; 24.2 +00:20:00; 24.1 +00:30:00; 24.1 +00:40:00; 24.1 +00:50:00; 24.0 +01:00:00; 24.0 +01:10:00; 24.0 +01:20:00; 24.0 +01:30:00; 24.0 +01:40:00; 23.9 +01:50:00; 23.9 +02:00:00; 23.8 +02:10:00; 23.8 +02:20:00; 23.8 +02:30:00; 23.8 +02:40:00; 23.8 +02:50:00; 23.7 +03:00:00; 23.7 +03:10:00; 23.7 +03:20:00; 23.6 +03:30:00; 23.6 +03:40:00; 23.6 +03:50:00; 23.6 +04:00:00; 23.6 +04:10:00; 23.6 +04:20:00; 23.6 +04:30:00; 23.6 +04:40:00; 23.6 +04:50:00; 23.5 +05:00:00; 23.5 +05:10:00; 23.5 +05:20:00; 23.4 +05:30:00; 23.4 +05:40:00; 23.4 +05:50:00; 23.4 +06:00:00; 23.4 +06:10:00; 23.4 +06:20:00; 23.4 +06:30:00; 23.4 +06:40:00; 23.4 +06:50:00; 23.4 +07:00:00; 23.4 +07:10:00; 23.4 +07:20:00; 23.4 +07:30:00; 23.4 +07:40:00; 23.4 +07:50:00; 23.4 +08:00:00; 23.4 +08:10:00; 23.3 +08:20:00; 23.3 +08:30:00; 23.2 +08:40:00; 23.2 +08:50:00; 23.2 +09:00:00; 23.1 +09:10:00; 23.1 +09:20:00; 23.0 +09:30:00; 23.0 +09:40:00; 23.0 +09:50:00; 23.1 +10:00:00; 23.1 +10:10:00; 23.2 +10:20:00; 23.2 +10:30:00; 23.3 +10:40:00; 23.4 +10:50:00; 23.5 +11:00:00; 23.6 +11:10:00; 23.8 +11:20:00; 24.0 +11:30:00; 24.3 +11:40:00; 24.6 +11:50:00; 24.9 +12:00:00; 25.3 +12:10:00; 25.6 +12:20:00; 25.8 +12:30:00; 25.8 +12:40:00; 25.8 +12:50:00; 25.8 +13:00:00; 25.8 +13:10:00; 25.9 +13:20:00; 26.1 +13:30:00; 26.3 +13:40:00; 26.5 +13:50:00; 26.6 +14:00:00; 26.8 +14:10:00; 26.9 +14:20:00; 27.0 +14:30:00; 27.2 +14:40:00; 27.2 +14:50:00; 27.4 +15:00:00; 27.4 +15:10:00; 27.4 +15:20:00; 27.4 +15:30:00; 27.5 +15:40:00; 27.5 +15:50:00; 27.5 +16:00:00; 27.5 +16:10:00; 27.4 +16:20:00; 27.3 +16:30:00; 27.0 +16:40:00; 26.8 +16:50:00; 26.0 +17:00:00; 25.5 +17:10:00; 25.3 +17:20:00; 25.1 +17:30:00; 24.9 +17:40:00; 24.7 +17:50:00; 24.5 +18:00:00; 24.3 +18:10:00; 24.2 +18:20:00; 24.1 +18:30:00; 24.0 +18:40:00; 23.8 +18:50:00; 23.8 +19:00:00; 23.7 +19:10:00; 23.6 +19:20:00; 23.6 +19:30:00; 23.4 +19:40:00; 23.2 +19:50:00; 23.2 +20:00:00; 23.1 +20:10:00; 23.0 +20:20:00; 23.4 +20:30:00; 24.0 +20:40:00; 24.5 +20:50:00; 24.8 +21:00:00; 25.1 +21:10:00; 25.4 +21:20:00; 25.6 +21:30:00; 25.6 +21:40:00; 25.8 +21:50:00; 25.9 +22:00:00; 25.9 +22:10:00; 26.0 +22:20:00; 26.0 +22:30:00; 26.0 +22:40:00; 26.0 +22:50:00; 26.0 +23:00:00; 26.0 +23:10:00; 26.0 +23:20:00; 26.0 +23:30:00; 26.0 +23:40:00; 25.8 +23:50:00; 25.6 diff --git a/test/simpletest_errorbarstyles/README.md b/examples/simpletest_errorbarstyles/README.md similarity index 90% rename from test/simpletest_errorbarstyles/README.md rename to examples/simpletest_errorbarstyles/README.md index ee1d290ed5..99a5fc75d2 100644 --- a/test/simpletest_errorbarstyles/README.md +++ b/examples/simpletest_errorbarstyles/README.md @@ -1,120 +1,120 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Different Types of Errorindicators -This project (see `./test/simpletest_errorbarstyles/`) simply creates a JKQtPlotter widget (as a new window) and adds several curves show-casing different styles of error indicators. Data is initialized from two QVector objects. - -The source code of the main application can be found in [`jkqtplotter_simpletest_errorbarstyles.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp). - -First some data is added to the internal datastore (mostly, like explained in several other examples, like e.g. [Line Graph with Different Symbols and Line Styles](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_symbols_and_styles)). The (in a loop) several graphs are added, each with a distinct style for its error indicators: - -```c++ - // 3. now we make several plots with different error styles - // for that we iterate over every style from the vector errorStyles - // the array showXandYError indicates whether we want x- and y-error - // for a style for all stywhere this is false, only y-error-indicators - // are shown - QVector errorStyles {JKQTPnoError, JKQTPerrorBars, JKQTPerrorSimpleBars, JKQTPerrorLines, JKQTPerrorPolygons, JKQTPerrorBoxes, JKQTPerrorEllipses, JKQTPerrorBarsPolygons, JKQTPerrorBarsLines, JKQTPerrorSimpleBarsLines, JKQTPerrorSimpleBarsPolygons }; - QVector showXandYError { false , true , true , false , false , true , true , false , false , false , false }; - - for (int errorID=0; errorID Y; - for (auto& xx: X) { - Y<(errorID)*2.5; - } - - // create a graph object - JKQTPxyLineErrorGraph* graph=new JKQTPxyLineErrorGraph(&plot); - - // copy data into datastore and immediately set the yColumn - graph->set_xColumn(columnX); - graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(errorID))); - graph->set_xErrorColumn(columnXError); - graph->set_yErrorColumn(columnYError); - - // set error style, for the y-axis - graph->set_yErrorStyle(errorStyles[errorID]); - // no error indicators for the x-values - graph->set_xErrorStyle(JKQTPnoError); - // ... unless: for some error styles we want error in both directions - if (showXandYError[errorID]) { - graph->set_xErrorStyle(errorStyles[errorID]); - graph->set_drawLine(false); - } - // make error indicator 30% transparent - QColor c=graph->get_errorFillColor(); - c.setAlphaF(0.3); - graph->set_errorFillColor(c); - // set error indicator line width - graph->set_errorWidth(1); - // set length of small bars at the end of error bars - graph->set_errorbarSize(15); - - - // set symbol (cross/X) + pen style (and color)dashed) - graph->set_symbol(JKQTPcross); - graph->set_style(Qt::DashLine); - // set symbol size - graph->set_symbolSize(5); - // set width of symbol lines - graph->set_symbolWidth(1); - // set width of graph line - graph->set_lineWidth(1); - - // graph title is made from symbol+errorStylestyle, we use the LaTeX instruction \verb around the - // result of JKQTPerrorPlotstyle2String(), because it contains underscores that would otherwise - // lead to lower-case letter, which we don't want - graph->set_title("\\verb{"+JKQTPerrorPlotstyle2String(errorStyles[errorID])+"}"); - - // add the graph to the plot, so it is actually displayed - plot.addGraph(graph); - } -``` - -The error styles are set in these lines: -```c++ - // set error style, for the y-axis - graph->set_yErrorStyle(errorStyles[errorID]); - // no error indicators for the x-values - graph->set_xErrorStyle(errorStyles[errorID]); -``` - -There are several variables that can be used to further style the error indicator, like: -```c++ - // make error indicator 30% transparent - QColor c=graph->get_errorFillColor(); - c.setAlphaF(0.3); - graph->set_errorFillColor(c); - // set error indicator line width - graph->set_errorWidth(1); - // set length of small bars at the end of error bars - graph->set_errorbarSize(15); -``` - -There are more properties that you can find in the documentation of the mix-in classes `JKQTPxyGraphErrors`, `JKQTPxGraphErrors`, `JKQTPyGraphErrors`, `JKQTPgraphErrors`. - -In addition the plot key is moved outside the pot and the grid in the plot is switched off: -```c++ - // 6. change locaion of key (outside top-right) - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideRightTop); - // ... and switch off the grid - plot.get_xAxis()->set_drawGrid(false); - plot.get_xAxis()->set_drawMinorGrid(false); - plot.get_yAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawMinorGrid(false); -``` - -The result looks like this: - -![jkqtplotter_simpletest_errorbarstyles](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles.png) - -Error bars are implemented in the mixin-classes `JKQTPxyGraphErrors`, `JKQTPxGraphErrors` and `JKQTPyGraphErrors` that are all derived from `JKQTPgraphErrors`. With these it is simple to add error indicators to several different plot styles. Usually you can recognize these by looking at the class name, e.g. `JKQTPxyLineGraph` is a simple line+symbol graph, and `JKQTPxyLineErrorGraph` is the same with error indictaors (see above). There are also several other plots with error indicators: - - `JKQTPbarVerticalErrorGraph` for barcharts with errors:
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles_barcharts.png) - - `JKQTPimpulsesVerticalGraph` for impulse/candle-stick charts with errors:
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles_impulses.png) - - `JKQTPfilledCurveXErrorGraph` for filled curves with errors:
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles_filledcurves.png) -. - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Different Types of Errorindicators +This project (see `./examples/simpletest_errorbarstyles/`) simply creates a JKQtPlotter widget (as a new window) and adds several curves show-casing different styles of error indicators. Data is initialized from two QVector objects. + +The source code of the main application can be found in [`jkqtplotter_simpletest_errorbarstyles.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp). + +First some data is added to the internal datastore (mostly, like explained in several other examples, like e.g. [Line Graph with Different Symbols and Line Styles](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_symbols_and_styles)). The (in a loop) several graphs are added, each with a distinct style for its error indicators: + +```c++ + // 3. now we make several plots with different error styles + // for that we iterate over every style from the vector errorStyles + // the array showXandYError indicates whether we want x- and y-error + // for a style for all stywhere this is false, only y-error-indicators + // are shown + QVector errorStyles {JKQTPnoError, JKQTPerrorBars, JKQTPerrorSimpleBars, JKQTPerrorLines, JKQTPerrorPolygons, JKQTPerrorBoxes, JKQTPerrorEllipses, JKQTPerrorBarsPolygons, JKQTPerrorBarsLines, JKQTPerrorSimpleBarsLines, JKQTPerrorSimpleBarsPolygons }; + QVector showXandYError { false , true , true , false , false , true , true , false , false , false , false }; + + for (int errorID=0; errorID Y; + for (auto& xx: X) { + Y<(errorID)*2.5; + } + + // create a graph object + JKQTPxyLineErrorGraph* graph=new JKQTPxyLineErrorGraph(&plot); + + // copy data into datastore and immediately set the yColumn + graph->set_xColumn(columnX); + graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(errorID))); + graph->set_xErrorColumn(columnXError); + graph->set_yErrorColumn(columnYError); + + // set error style, for the y-axis + graph->set_yErrorStyle(errorStyles[errorID]); + // no error indicators for the x-values + graph->set_xErrorStyle(JKQTPnoError); + // ... unless: for some error styles we want error in both directions + if (showXandYError[errorID]) { + graph->set_xErrorStyle(errorStyles[errorID]); + graph->set_drawLine(false); + } + // make error indicator 30% transparent + QColor c=graph->get_errorFillColor(); + c.setAlphaF(0.3); + graph->set_errorFillColor(c); + // set error indicator line width + graph->set_errorWidth(1); + // set length of small bars at the end of error bars + graph->set_errorbarSize(15); + + + // set symbol (cross/X) + pen style (and color)dashed) + graph->set_symbol(JKQTPcross); + graph->set_style(Qt::DashLine); + // set symbol size + graph->set_symbolSize(5); + // set width of symbol lines + graph->set_symbolWidth(1); + // set width of graph line + graph->set_lineWidth(1); + + // graph title is made from symbol+errorStylestyle, we use the LaTeX instruction \verb around the + // result of JKQTPerrorPlotstyle2String(), because it contains underscores that would otherwise + // lead to lower-case letter, which we don't want + graph->set_title("\\verb{"+JKQTPerrorPlotstyle2String(errorStyles[errorID])+"}"); + + // add the graph to the plot, so it is actually displayed + plot.addGraph(graph); + } +``` + +The error styles are set in these lines: +```c++ + // set error style, for the y-axis + graph->set_yErrorStyle(errorStyles[errorID]); + // no error indicators for the x-values + graph->set_xErrorStyle(errorStyles[errorID]); +``` + +There are several variables that can be used to further style the error indicator, like: +```c++ + // make error indicator 30% transparent + QColor c=graph->get_errorFillColor(); + c.setAlphaF(0.3); + graph->set_errorFillColor(c); + // set error indicator line width + graph->set_errorWidth(1); + // set length of small bars at the end of error bars + graph->set_errorbarSize(15); +``` + +There are more properties that you can find in the documentation of the mix-in classes `JKQTPxyGraphErrors`, `JKQTPxGraphErrors`, `JKQTPyGraphErrors`, `JKQTPgraphErrors`. + +In addition the plot key is moved outside the pot and the grid in the plot is switched off: +```c++ + // 6. change locaion of key (outside top-right) + plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideRightTop); + // ... and switch off the grid + plot.get_xAxis()->set_drawGrid(false); + plot.get_xAxis()->set_drawMinorGrid(false); + plot.get_yAxis()->set_drawGrid(false); + plot.get_yAxis()->set_drawMinorGrid(false); +``` + +The result looks like this: + +![jkqtplotter_simpletest_errorbarstyles](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles.png) + +Error bars are implemented in the mixin-classes `JKQTPxyGraphErrors`, `JKQTPxGraphErrors` and `JKQTPyGraphErrors` that are all derived from `JKQTPgraphErrors`. With these it is simple to add error indicators to several different plot styles. Usually you can recognize these by looking at the class name, e.g. `JKQTPxyLineGraph` is a simple line+symbol graph, and `JKQTPxyLineErrorGraph` is the same with error indictaors (see above). There are also several other plots with error indicators: + - `JKQTPbarVerticalErrorGraph` for barcharts with errors:
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles_barcharts.png) + - `JKQTPimpulsesVerticalGraph` for impulse/candle-stick charts with errors:
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles_impulses.png) + - `JKQTPfilledCurveXErrorGraph` for filled curves with errors:
![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_errorbarstyles_filledcurves.png) +. + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp similarity index 97% rename from test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp rename to examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp index 3d26fd9bbe..bdc4f97d9a 100644 --- a/test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp +++ b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp @@ -1,110 +1,110 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplottertools/jkqtptools.h" - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data a vector of x-values for a simple plot - // and generate some values for varying errors - // y-data for the pot will be generated later to position the - // plot at different locations. - QVector X, Yerror, Xerror; - const int Ndata=7; // number of plot points in each curve - for (int i=0; iaddCopiedColumn(X, "x"); - size_t columnXError=ds->addCopiedColumn(Xerror, "xerror"); - size_t columnYError=ds->addCopiedColumn(Yerror, "yerror"); - - - // 3. now we make several plots with different error styles - // for that we iterate over every style from the vector errorStyles - // the array showXandYError indicates whether we want x- and y-error - // for a style for all stywhere this is false, only y-error-indicators - // are shown - QVector errorStyles {JKQTPnoError, JKQTPerrorBars, JKQTPerrorSimpleBars, JKQTPerrorLines, JKQTPerrorPolygons, JKQTPerrorBoxes, JKQTPerrorEllipses, JKQTPerrorBarsPolygons, JKQTPerrorBarsLines, JKQTPerrorSimpleBarsLines, JKQTPerrorSimpleBarsPolygons }; - QVector showXandYError { false , true , true , false , false , true , true , false , false , false , false }; - - for (int errorID=0; errorID Y; - for (auto& xx: X) { - Y<(errorID)*2.5; - } - - JKQTPxyLineErrorGraph* graph=new JKQTPxyLineErrorGraph(&plot); - - // copy data into datastore and immediately set the yColumn - graph->set_xColumn(columnX); - graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(errorID))); - graph->set_xErrorColumn(columnXError); - graph->set_yErrorColumn(columnYError); - - // set error style, for the y-axis - graph->set_yErrorStyle(errorStyles[errorID]); - // no error indicators for the x-values - graph->set_xErrorStyle(JKQTPnoError); - // ... unless: for some error styles we want error in both directions - if (showXandYError[errorID]) { - graph->set_xErrorStyle(errorStyles[errorID]); - graph->set_drawLine(false); - } - // make error indicator 30% transparent - QColor c=graph->get_errorFillColor(); - c.setAlphaF(0.3); - graph->set_errorFillColor(c); - // set error indicator line width - graph->set_errorWidth(1); - // set length of small bars at the end of error bars - graph->set_errorbarSize(15); - - - // set symbol (cross/X) + pen style (and color)dashed) - graph->set_symbol(JKQTPcross); - graph->set_style(Qt::DashLine); - // set symbol size - graph->set_symbolSize(5); - // set width of symbol lines - graph->set_symbolWidth(1); - // set width of graph line - graph->set_lineWidth(1); - - // graph title is made from symbol+errorStylestyle, we use the LaTeX instruction \verb around the - // result of JKQTPerrorPlotstyle2String(), because it contains underscores that would otherwise - // lead to lower-case letter, which we don't want - graph->set_title("\\verb{"+JKQTPerrorPlotstyle2String(errorStyles[errorID])+"}"); - - // add the graph to the plot, so it is actually displayed - plot.addGraph(graph); - } - - // 4. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // 6. change locaion of key (outside top-right) - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideRightTop); - // ... and switch off the grid - plot.get_xAxis()->set_drawGrid(false); - plot.get_xAxis()->set_drawMinorGrid(false); - plot.get_yAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawMinorGrid(false); - - // 7. show plotter and make it a decent size - plot.show(); - plot.resize(800,600); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplottertools/jkqtptools.h" + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data a vector of x-values for a simple plot + // and generate some values for varying errors + // y-data for the pot will be generated later to position the + // plot at different locations. + QVector X, Yerror, Xerror; + const int Ndata=7; // number of plot points in each curve + for (int i=0; iaddCopiedColumn(X, "x"); + size_t columnXError=ds->addCopiedColumn(Xerror, "xerror"); + size_t columnYError=ds->addCopiedColumn(Yerror, "yerror"); + + + // 3. now we make several plots with different error styles + // for that we iterate over every style from the vector errorStyles + // the array showXandYError indicates whether we want x- and y-error + // for a style for all stywhere this is false, only y-error-indicators + // are shown + QVector errorStyles {JKQTPnoError, JKQTPerrorBars, JKQTPerrorSimpleBars, JKQTPerrorLines, JKQTPerrorPolygons, JKQTPerrorBoxes, JKQTPerrorEllipses, JKQTPerrorBarsPolygons, JKQTPerrorBarsLines, JKQTPerrorSimpleBarsLines, JKQTPerrorSimpleBarsPolygons }; + QVector showXandYError { false , true , true , false , false , true , true , false , false , false , false }; + + for (int errorID=0; errorID Y; + for (auto& xx: X) { + Y<(errorID)*2.5; + } + + JKQTPxyLineErrorGraph* graph=new JKQTPxyLineErrorGraph(&plot); + + // copy data into datastore and immediately set the yColumn + graph->set_xColumn(columnX); + graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(errorID))); + graph->set_xErrorColumn(columnXError); + graph->set_yErrorColumn(columnYError); + + // set error style, for the y-axis + graph->set_yErrorStyle(errorStyles[errorID]); + // no error indicators for the x-values + graph->set_xErrorStyle(JKQTPnoError); + // ... unless: for some error styles we want error in both directions + if (showXandYError[errorID]) { + graph->set_xErrorStyle(errorStyles[errorID]); + graph->set_drawLine(false); + } + // make error indicator 30% transparent + QColor c=graph->get_errorFillColor(); + c.setAlphaF(0.3); + graph->set_errorFillColor(c); + // set error indicator line width + graph->set_errorWidth(1); + // set length of small bars at the end of error bars + graph->set_errorbarSize(15); + + + // set symbol (cross/X) + pen style (and color)dashed) + graph->set_symbol(JKQTPcross); + graph->set_style(Qt::DashLine); + // set symbol size + graph->set_symbolSize(5); + // set width of symbol lines + graph->set_symbolWidth(1); + // set width of graph line + graph->set_lineWidth(1); + + // graph title is made from symbol+errorStylestyle, we use the LaTeX instruction \verb around the + // result of JKQTPerrorPlotstyle2String(), because it contains underscores that would otherwise + // lead to lower-case letter, which we don't want + graph->set_title("\\verb{"+JKQTPerrorPlotstyle2String(errorStyles[errorID])+"}"); + + // add the graph to the plot, so it is actually displayed + plot.addGraph(graph); + } + + // 4. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // 6. change locaion of key (outside top-right) + plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideRightTop); + // ... and switch off the grid + plot.get_xAxis()->set_drawGrid(false); + plot.get_xAxis()->set_drawMinorGrid(false); + plot.get_yAxis()->set_drawGrid(false); + plot.get_yAxis()->set_drawMinorGrid(false); + + // 7. show plotter and make it a decent size + plot.show(); + plot.resize(800,600); + + return app.exec(); +} diff --git a/test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro similarity index 72% rename from test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro rename to examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro index b2ab65eeac..8940125c1a 100644 --- a/test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro +++ b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro @@ -1,20 +1,24 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_errorbarstyles.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_errorbarstyles - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_errorbarstyles.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_errorbarstyles + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles_and_lib.pro b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles_and_lib.pro similarity index 97% rename from test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles_and_lib.pro rename to examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles_and_lib.pro index 39b4334650..51c5c23e0c 100644 --- a/test/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles_and_lib.pro +++ b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_errorbarstyles - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_errorbarstyles.file=$$PWD/jkqtplotter_simpletest_errorbarstyles.pro -jkqtplotter_simpletest_errorbarstyles.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_errorbarstyles + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_errorbarstyles.file=$$PWD/jkqtplotter_simpletest_errorbarstyles.pro +jkqtplotter_simpletest_errorbarstyles.depends = jkqtplotterlib diff --git a/test/simpletest_filledgraphs/README.md b/examples/simpletest_filledgraphs/README.md similarity index 89% rename from test/simpletest_filledgraphs/README.md rename to examples/simpletest_filledgraphs/README.md index 18f6f720d0..14e28ad0c3 100644 --- a/test/simpletest_filledgraphs/README.md +++ b/examples/simpletest_filledgraphs/README.md @@ -1,88 +1,88 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Filled Curve Plots -This project (see `./test/simpletest_filledgraphs/`) simply creates a JKQtPlotter widget (as a new window) and adds several filled curve graphs (Histograms). Data is initialized from QVector objects. - -The source code of the main application can be found in [`jkqtplotter_simpletest_filledgraphs.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp). - -First the data columns for three x-y-curves are generated. One column of x-values with entries 0,1,2,...,254,255 (256 entries). -```c++ - size_t columnX=ds->addLinearColumn(256, 0, 255, "x"); -``` - -And three columns with 256 entries each, which will be filled with the R-, G- and B-histograms of an image `example.bmp`: -```c++ - size_t columnR=ds->addColumn(256, "historam_R"); - size_t columnG=ds->addColumn(256, "historam_G"); - size_t columnB=ds->addColumn(256, "historam_B"); -``` - -In this example we will access the data in the internal datastore directly. This access is possible through objects of type JKQTPcolumn, which is a proxy to the data in one of the columns in a `JKQTdatastore`: - -```c++ - JKQTPcolumn cG=ds->getColumn(columnG); - JKQTPcolumn cR=ds->getColumn(columnR); - JKQTPcolumn cB=ds->getColumn(columnB); -``` - -In order to calculate the histograms, first all enries in the columns are set to 0: - -```c++ - cR.setAll(0); - cG.setAll(0); - cB.setAll(0); -``` - -Finally the histogram is calculated: - -```c++ - QImage image(":/example.bmp"); - for (int y=0; y(image.width()*image.height())); - cG.scale(100.0/static_cast(image.width()*image.height())); - cB.scale(100.0/static_cast(image.width()*image.height())); -``` - -Finally three `JKQTPfilledCurveXGraph` objects are generated and added to the plot (here we show the code for the R-channel only): - -```c++ - JKQTPfilledCurveXGraph* graphR=new JKQTPfilledCurveXGraph(&plot); - - // set graph titles - graphR->set_title("R-channel"); - - // set graph colors (lines: non-transparent, fill: semi-transparent - QColor col; - col=QColor("red"); graphR->set_color(col); - col.setAlphaF(0.25); graphR->set_fillColor(col); - - // set data - graphR->set_xColumn(columnX); graphR->set_yColumn(columnR); - - - // add the graphs to the plot, so they are actually displayed - plot.addGraph(graphR); -``` - -The curves are fille with a semi-transparent color, which is achieved by setting `col.setAlphaF(0.25)` on the graph color `col`. - -The result looks like this: - -![jkqtplotter_simpletest_filledgraphs](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_filledgraphs.png) - -If you use `JKQTPfilledCurveYGraph` instead of `JKQTPfilledCurveXGraph`, the curve will not be filled until the y=0-axis, but until the x=0-axis. Of course you will also have to swap the x- and y-data columns. The result will look like this: - -![jkqtplotter_simpletest_filledgraphs_yaxis](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_filledgraphs_yaxis.png) - - - -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Filled Curve Plots +This project (see `./examples/simpletest_filledgraphs/`) simply creates a JKQtPlotter widget (as a new window) and adds several filled curve graphs (Histograms). Data is initialized from QVector objects. + +The source code of the main application can be found in [`jkqtplotter_simpletest_filledgraphs.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp). + +First the data columns for three x-y-curves are generated. One column of x-values with entries 0,1,2,...,254,255 (256 entries). +```c++ + size_t columnX=ds->addLinearColumn(256, 0, 255, "x"); +``` + +And three columns with 256 entries each, which will be filled with the R-, G- and B-histograms of an image `example.bmp`: +```c++ + size_t columnR=ds->addColumn(256, "historam_R"); + size_t columnG=ds->addColumn(256, "historam_G"); + size_t columnB=ds->addColumn(256, "historam_B"); +``` + +In this example we will access the data in the internal datastore directly. This access is possible through objects of type JKQTPcolumn, which is a proxy to the data in one of the columns in a `JKQTdatastore`: + +```c++ + JKQTPcolumn cG=ds->getColumn(columnG); + JKQTPcolumn cR=ds->getColumn(columnR); + JKQTPcolumn cB=ds->getColumn(columnB); +``` + +In order to calculate the histograms, first all enries in the columns are set to 0: + +```c++ + cR.setAll(0); + cG.setAll(0); + cB.setAll(0); +``` + +Finally the histogram is calculated: + +```c++ + QImage image(":/example.bmp"); + for (int y=0; y(image.width()*image.height())); + cG.scale(100.0/static_cast(image.width()*image.height())); + cB.scale(100.0/static_cast(image.width()*image.height())); +``` + +Finally three `JKQTPfilledCurveXGraph` objects are generated and added to the plot (here we show the code for the R-channel only): + +```c++ + JKQTPfilledCurveXGraph* graphR=new JKQTPfilledCurveXGraph(&plot); + + // set graph titles + graphR->set_title("R-channel"); + + // set graph colors (lines: non-transparent, fill: semi-transparent + QColor col; + col=QColor("red"); graphR->set_color(col); + col.setAlphaF(0.25); graphR->set_fillColor(col); + + // set data + graphR->set_xColumn(columnX); graphR->set_yColumn(columnR); + + + // add the graphs to the plot, so they are actually displayed + plot.addGraph(graphR); +``` + +The curves are fille with a semi-transparent color, which is achieved by setting `col.setAlphaF(0.25)` on the graph color `col`. + +The result looks like this: + +![jkqtplotter_simpletest_filledgraphs](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_filledgraphs.png) + +If you use `JKQTPfilledCurveYGraph` instead of `JKQTPfilledCurveXGraph`, the curve will not be filled until the y=0-axis, but until the x=0-axis. Of course you will also have to swap the x- and y-data columns. The result will look like this: + +![jkqtplotter_simpletest_filledgraphs_yaxis](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_filledgraphs_yaxis.png) + + + +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) diff --git a/test/simpletest_filledgraphs/example.bmp b/examples/simpletest_filledgraphs/example.bmp similarity index 100% rename from test/simpletest_filledgraphs/example.bmp rename to examples/simpletest_filledgraphs/example.bmp diff --git a/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp similarity index 97% rename from test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp rename to examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp index cd972628b2..32faf5281c 100644 --- a/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp +++ b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp @@ -1,98 +1,98 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsfilledcurve.h" - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create 4 datacolumns with length 256 entries in the datastore - // these will later hold the RGB-histogram and a linear x-values vector - // - the x-values are directly initialized as linear vector 0..255 in 256 steps - // - the other columns are generated and size_t-type indexes are stored for later - // reference to these columns in the graphs- - size_t columnX=ds->addLinearColumn(256, 0, 255, "x"); - size_t columnR=ds->addColumn(256, "historam_R"); - size_t columnG=ds->addColumn(256, "historam_G"); - size_t columnB=ds->addColumn(256, "historam_B"); - // - in addition JKQTPcolumn objects are generated, which can be used to access - // the data in the columns - JKQTPcolumn cG=ds->getColumn(columnG); - JKQTPcolumn cR=ds->getColumn(columnR); - JKQTPcolumn cB=ds->getColumn(columnB); - // - now all columns for RGB are initialized to 0 - cR.setAll(0); - cG.setAll(0); - cB.setAll(0); - - // 3. now we open a BMP-file and load it into a QImage - QImage image(":/example.bmp"); - // ... and calculate the RGB-histograms - for (int y=0; y(image.width()*image.height())); - cG.scale(100.0/static_cast(image.width()*image.height())); - cB.scale(100.0/static_cast(image.width()*image.height())); - - - // 4. now we add three semi-transparent, filled curve plots, one for each histogram - JKQTPfilledCurveXGraph* graphR=new JKQTPfilledCurveXGraph(&plot); - JKQTPfilledCurveXGraph* graphG=new JKQTPfilledCurveXGraph(&plot); - JKQTPfilledCurveXGraph* graphB=new JKQTPfilledCurveXGraph(&plot); - - // set graph titles - graphR->set_title("R-channel"); - graphG->set_title("G-channel"); - graphB->set_title("B-channel"); - - // set graph colors (lines: non-transparent, fill: semi-transparent) and style - QColor col; - col=QColor("red"); graphR->set_color(col); - col.setAlphaF(0.25); graphR->set_fillColor(col); - col=QColor("green"); graphG->set_color(col); - col.setAlphaF(0.25); graphG->set_fillColor(col); - col=QColor("blue"); graphB->set_color(col); - col.setAlphaF(0.25); graphB->set_fillColor(col); - graphR->set_lineWidth(1); - graphG->set_lineWidth(1); - graphB->set_lineWidth(1); - - // set data - graphR->set_xColumn(columnX); graphR->set_yColumn(columnR); - graphG->set_xColumn(columnX); graphG->set_yColumn(columnG); - graphB->set_xColumn(columnX); graphB->set_yColumn(columnB); - - - // add the graphs to the plot, so they are actually displayed - plot.addGraph(graphB); - plot.addGraph(graphG); - plot.addGraph(graphR); - - // 5. set axis labels - plot.get_xAxis()->set_axisLabel("R/G/B-value"); - plot.get_yAxis()->set_axisLabel("normalized frequency [%]"); - - - // 4. set the maximum size of the plot to 0..100% and 0..256 - plot.setAbsoluteX(0,256); - plot.setAbsoluteY(0,100); - // ... and scale plot automatically - plot.zoomToFit(); - - // 5. show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsfilledcurve.h" + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create 4 datacolumns with length 256 entries in the datastore + // these will later hold the RGB-histogram and a linear x-values vector + // - the x-values are directly initialized as linear vector 0..255 in 256 steps + // - the other columns are generated and size_t-type indexes are stored for later + // reference to these columns in the graphs- + size_t columnX=ds->addLinearColumn(256, 0, 255, "x"); + size_t columnR=ds->addColumn(256, "historam_R"); + size_t columnG=ds->addColumn(256, "historam_G"); + size_t columnB=ds->addColumn(256, "historam_B"); + // - in addition JKQTPcolumn objects are generated, which can be used to access + // the data in the columns + JKQTPcolumn cG=ds->getColumn(columnG); + JKQTPcolumn cR=ds->getColumn(columnR); + JKQTPcolumn cB=ds->getColumn(columnB); + // - now all columns for RGB are initialized to 0 + cR.setAll(0); + cG.setAll(0); + cB.setAll(0); + + // 3. now we open a BMP-file and load it into a QImage + QImage image(":/example.bmp"); + // ... and calculate the RGB-histograms + for (int y=0; y(image.width()*image.height())); + cG.scale(100.0/static_cast(image.width()*image.height())); + cB.scale(100.0/static_cast(image.width()*image.height())); + + + // 4. now we add three semi-transparent, filled curve plots, one for each histogram + JKQTPfilledCurveXGraph* graphR=new JKQTPfilledCurveXGraph(&plot); + JKQTPfilledCurveXGraph* graphG=new JKQTPfilledCurveXGraph(&plot); + JKQTPfilledCurveXGraph* graphB=new JKQTPfilledCurveXGraph(&plot); + + // set graph titles + graphR->set_title("R-channel"); + graphG->set_title("G-channel"); + graphB->set_title("B-channel"); + + // set graph colors (lines: non-transparent, fill: semi-transparent) and style + QColor col; + col=QColor("red"); graphR->set_color(col); + col.setAlphaF(0.25); graphR->set_fillColor(col); + col=QColor("green"); graphG->set_color(col); + col.setAlphaF(0.25); graphG->set_fillColor(col); + col=QColor("blue"); graphB->set_color(col); + col.setAlphaF(0.25); graphB->set_fillColor(col); + graphR->set_lineWidth(1); + graphG->set_lineWidth(1); + graphB->set_lineWidth(1); + + // set data + graphR->set_xColumn(columnX); graphR->set_yColumn(columnR); + graphG->set_xColumn(columnX); graphG->set_yColumn(columnG); + graphB->set_xColumn(columnX); graphB->set_yColumn(columnB); + + + // add the graphs to the plot, so they are actually displayed + plot.addGraph(graphB); + plot.addGraph(graphG); + plot.addGraph(graphR); + + // 5. set axis labels + plot.get_xAxis()->set_axisLabel("R/G/B-value"); + plot.get_yAxis()->set_axisLabel("normalized frequency [%]"); + + + // 4. set the maximum size of the plot to 0..100% and 0..256 + plot.setAbsoluteX(0,256); + plot.setAbsoluteY(0,100); + // ... and scale plot automatically + plot.zoomToFit(); + + // 5. show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + + return app.exec(); +} diff --git a/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro similarity index 74% rename from test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro rename to examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro index 5c1744cbf3..e8f8e406a5 100644 --- a/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro +++ b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro @@ -1,24 +1,28 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_filledgraphs.cpp - -RESOURCES += jkqtplotter_simpletest_filledgraphs.qrc - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_filledgraphs - - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_filledgraphs.cpp + +RESOURCES += jkqtplotter_simpletest_filledgraphs.qrc + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_filledgraphs + + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.qrc b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.qrc similarity index 100% rename from test/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.qrc rename to examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.qrc diff --git a/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs_and_lib.pro b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs_and_lib.pro similarity index 97% rename from test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs_and_lib.pro rename to examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs_and_lib.pro index 4c57303975..6da7639acd 100644 --- a/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs_and_lib.pro +++ b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_filledgraphs - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_filledgraphs.file=$$PWD/jkqtplotter_simpletest_filledgraphs.pro -jkqtplotter_simpletest_filledgraphs.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_filledgraphs + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_filledgraphs.file=$$PWD/jkqtplotter_simpletest_filledgraphs.pro +jkqtplotter_simpletest_filledgraphs.depends = jkqtplotterlib diff --git a/test/simpletest_functionplot/README.md b/examples/simpletest_functionplot/README.md similarity index 88% rename from test/simpletest_functionplot/README.md rename to examples/simpletest_functionplot/README.md index 2976eca3f1..15197a07e0 100644 --- a/test/simpletest_functionplot/README.md +++ b/examples/simpletest_functionplot/README.md @@ -4,7 +4,7 @@ ## Plotting Mathematical Functions as Line Graphs ### Basics -This project (see `./test/simpletest_functionplot/`) demonstrates how to plot mathematical functions as line graphs. The functions may be defined as static C functions, C++ functors or c++ inline functions. See [test/simpletest_parsedfunctionplot](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_parsedfunctionplot) for an example of how to use an internal equation parser provided with JKQtPlotter instead of directly defining functions. +This project (see `./examples/simpletest_functionplot/`) demonstrates how to plot mathematical functions as line graphs. The functions may be defined as static C functions, C++ functors or c++ inline functions. See [test/simpletest_parsedfunctionplot](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_parsedfunctionplot) for an example of how to use an internal equation parser provided with JKQtPlotter instead of directly defining functions. ### Simple C++ inline function The first example shows how to plot a C++ inline function: @@ -114,7 +114,7 @@ This code snippets above result in a plot like this: ### Notes Note that all the different variants to provide parameters can be used with all types of functions! -Also see the example [Plotting Parsed Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_parsedfunctionplot) for details on how the actual plotting algorithm works. That example also shows how to define a function as a string, which is then parsed and evaluated by an expression parser library embedded in JKQtPlotter. +Also see the example [Plotting Parsed Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_parsedfunctionplot) for details on how the actual plotting algorithm works. That example also shows how to define a function as a string, which is then parsed and evaluated by an expression parser library embedded in JKQtPlotter. All examples above use the graph class `JKQTPxFunctionLineGraph`, which plots a function `y=f(x)`. If you want to plot a function `x=f(y)`, you can use the class `JKQTPyFunctionLineGraph` instead. If in the examples above, we exchange all `JKQTPxFunctionLineGraph` for `JKQTPyFunctionLineGraph`, the graphs will be rotated by 90 degree, as all functions are interpreted as `x=f(y)`: diff --git a/test/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp similarity index 100% rename from test/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp rename to examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp diff --git a/test/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro similarity index 73% rename from test/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro rename to examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro index c98b11696e..c893359377 100644 --- a/test/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro +++ b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro @@ -13,8 +13,12 @@ TARGET = jkqtplotter_simpletest_functionplot # include JKQtPlotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") win32-msvc*: DEFINES += _USE_MATH_DEFINES diff --git a/test/simpletest_functionplot/jkqtplotter_simpletest_functionplot_and_lib.pro b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot_and_lib.pro similarity index 100% rename from test/simpletest_functionplot/jkqtplotter_simpletest_functionplot_and_lib.pro rename to examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot_and_lib.pro diff --git a/test/simpletest_imageplot/README.md b/examples/simpletest_imageplot/README.md similarity index 89% rename from test/simpletest_imageplot/README.md rename to examples/simpletest_imageplot/README.md index c019139d30..223d7112cd 100644 --- a/test/simpletest_imageplot/README.md +++ b/examples/simpletest_imageplot/README.md @@ -1,152 +1,152 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple math image plot -This project (see `./test/simpletest_imageplot/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is stored as a simple C-array in row-major ordering and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). This very simple interface can also be used to interface with many common image processing libraries, like CImg or OpenCV. - -The soruce code of the main application is (see [`jkqtplotter_simpletest_imageplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp): -```c++ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsimage.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - const int NX=100; // image dimension in x-direction [pixels] - const int NY=100; // image dimension in x-direction [pixels] - const double dx=1e-2; // size of a pixel in x-direction [micrometers] - const double dy=1e-2; // size of a pixel in x-direction [micrometers] - const double w=static_cast(NX)*dx; - const double h=static_cast(NY)*dy; - double airydisk[NX*NY]; // row-major image - - // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) - double NA=1.1; // numerical aperture of lens - double wavelength=488e-3; // wavelength of the light [micrometers] - - // 2.2 calculate image of airy disk in a row-major array - double x, y=-h/2.0; - for (int iy=0; iyaddCopiedImageAsColumn(airydisk, NX, NY, "imagedata"); - - - // 4. create a graph (JKQTPColumnMathImage) with the column created above as data - // The data is color-coded with the color-palette JKQTPMathImageMATLAB - // the converted range of data is determined automatically because set_autoImageRange(true) - JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); - graph->set_title(""); - // image column with the data - graph->set_imageColumn(cAiryDisk); - // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering - graph->set_Nx(NX); - graph->set_Ny(NY); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(-w/2.0); - graph->set_y(-h/2.0); - // width and height of the image in plot-axis-coordinates - graph->set_width(w); - graph->set_height(h); - // color-map is "MATLAB" - graph->set_palette(JKQTPMathImageMATLAB); - // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); - // determine min/max of data automatically and use it to set the range of the color-scale - graph->set_autoImageRange(true); - - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); - - - // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - - // 8 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,600); - plot.setWindowTitle("JKQTPColumnMathImage"); - - - return app.exec(); -} - -``` -The result looks like this: - -![jkqtplotter_simpletest_imageplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot.png) - -There are several ways to modify the plot: - 1. You can set the color scale manually (here 0..2), by using - ``` - graph->set_autoImageRange(false); - graph->set_imageMin(0); - graph->set_imageMax(2); - ``` - instead of - ``` - graph->set_autoImageRange(true); - ``` - from above. The result will look like this:
- ![jkqtplotter_simpletest_imageplot__scale02](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot__scale02.png)
- Note how the color scale is not used completely, because data really only scales between 0 and 1. - 2. If you set the color-range to 0.1 .. 0.8 with - ``` - graph->set_autoImageRange(false); - graph->set_imageMin(0.1); - graph->set_imageMax(0.8); - ``` - Then there will be datapoints above or below the range of the colorscale. The default behaviour of the graph is to use the first color of the palette for every pixel with a value below the minimum (here 0.1) and the last color in the palette for every pixel with a value above the maximum.
- ![jkqtplotter_simpletest_imageplot__smallscalelimitcolor](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot__smallscalelimitcolor.png)
- You can change this behaviour by `set_rangeMinFailAction(),set_rangeMaxFailAction()` with one of these parameters: - - `JKQTPMathImageLastPaletteColor`: the default behaviour explained above - - `JKQTPMathImageGivenColor`: use a color set by `set_rangeMinFailColor(),set_rangeMaxFailColor()` (here e.g. black for min and grey for max)
- ![jkqtplotter_simpletest_imageplot__smallscalecolor](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot__smallscalecolor.png) - - `JKQTPMathImageTransparent`: draw pixels transparent
- ![jkqtplotter_simpletest_imageplot__smallscaletransparent](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot__smallscaletransparent.png) - . -. - - -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple math image plot +This project (see `./examples/simpletest_imageplot/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is stored as a simple C-array in row-major ordering and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). This very simple interface can also be used to interface with many common image processing libraries, like CImg or OpenCV. + +The soruce code of the main application is (see [`jkqtplotter_simpletest_imageplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp): +```c++ +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsimage.h" + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + const int NX=100; // image dimension in x-direction [pixels] + const int NY=100; // image dimension in x-direction [pixels] + const double dx=1e-2; // size of a pixel in x-direction [micrometers] + const double dy=1e-2; // size of a pixel in x-direction [micrometers] + const double w=static_cast(NX)*dx; + const double h=static_cast(NY)*dy; + double airydisk[NX*NY]; // row-major image + + // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) + double NA=1.1; // numerical aperture of lens + double wavelength=488e-3; // wavelength of the light [micrometers] + + // 2.2 calculate image of airy disk in a row-major array + double x, y=-h/2.0; + for (int iy=0; iyaddCopiedImageAsColumn(airydisk, NX, NY, "imagedata"); + + + // 4. create a graph (JKQTPColumnMathImage) with the column created above as data + // The data is color-coded with the color-palette JKQTPMathImageMATLAB + // the converted range of data is determined automatically because set_autoImageRange(true) + JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); + graph->set_title(""); + // image column with the data + graph->set_imageColumn(cAiryDisk); + // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering + graph->set_Nx(NX); + graph->set_Ny(NY); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(-w/2.0); + graph->set_y(-h/2.0); + // width and height of the image in plot-axis-coordinates + graph->set_width(w); + graph->set_height(h); + // color-map is "MATLAB" + graph->set_palette(JKQTPMathImageMATLAB); + // get coordinate axis of color-bar and set its label + graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + // determine min/max of data automatically and use it to set the range of the color-scale + graph->set_autoImageRange(true); + + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); + plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + + + // 7. fix axis and plot aspect ratio to 1 + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_maintainAxisAspectRatio(true); + + // 8 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,600); + plot.setWindowTitle("JKQTPColumnMathImage"); + + + return app.exec(); +} + +``` +The result looks like this: + +![jkqtplotter_simpletest_imageplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot.png) + +There are several ways to modify the plot: + 1. You can set the color scale manually (here 0..2), by using + ``` + graph->set_autoImageRange(false); + graph->set_imageMin(0); + graph->set_imageMax(2); + ``` + instead of + ``` + graph->set_autoImageRange(true); + ``` + from above. The result will look like this:
+ ![jkqtplotter_simpletest_imageplot__scale02](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot__scale02.png)
+ Note how the color scale is not used completely, because data really only scales between 0 and 1. + 2. If you set the color-range to 0.1 .. 0.8 with + ``` + graph->set_autoImageRange(false); + graph->set_imageMin(0.1); + graph->set_imageMax(0.8); + ``` + Then there will be datapoints above or below the range of the colorscale. The default behaviour of the graph is to use the first color of the palette for every pixel with a value below the minimum (here 0.1) and the last color in the palette for every pixel with a value above the maximum.
+ ![jkqtplotter_simpletest_imageplot__smallscalelimitcolor](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot__smallscalelimitcolor.png)
+ You can change this behaviour by `set_rangeMinFailAction(),set_rangeMaxFailAction()` with one of these parameters: + - `JKQTPMathImageLastPaletteColor`: the default behaviour explained above + - `JKQTPMathImageGivenColor`: use a color set by `set_rangeMinFailColor(),set_rangeMaxFailColor()` (here e.g. black for min and grey for max)
+ ![jkqtplotter_simpletest_imageplot__smallscalecolor](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot__smallscalecolor.png) + - `JKQTPMathImageTransparent`: draw pixels transparent
+ ![jkqtplotter_simpletest_imageplot__smallscaletransparent](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot__smallscaletransparent.png) + . +. + + +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) diff --git a/test/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp similarity index 97% rename from test/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp rename to examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp index 6d2f0a75eb..1fde71b22f 100644 --- a/test/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp +++ b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp @@ -1,107 +1,107 @@ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsimage.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - const int NX=100; // image dimension in x-direction [pixels] - const int NY=100; // image dimension in x-direction [pixels] - const double dx=1e-2; // size of a pixel in x-direction [micrometers] - const double dy=1e-2; // size of a pixel in x-direction [micrometers] - const double w=static_cast(NX)*dx; - const double h=static_cast(NY)*dy; - double airydisk[NX*NY]; // row-major image - - // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) - double NA=1.1; // numerical aperture of lens - double wavelength=488e-3; // wavelength of the light [micrometers] - - // 2.2 calculate image of airy disk in a row-major array - double x, y=-h/2.0; - for (int iy=0; iyaddCopiedImageAsColumn(airydisk, NX, NY, "imagedata"); - - - // 4. create a graph (JKQTPColumnMathImage) with the column created above as data - // The data is color-coded with the color-palette JKQTPMathImageMATLAB - // the converted range of data is determined automatically because set_autoImageRange(true) - JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); - graph->set_title(""); - // image column with the data - graph->set_imageColumn(cAiryDisk); - // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering - graph->set_Nx(NX); - graph->set_Ny(NY); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(-w/2.0); - graph->set_y(-h/2.0); - // width and height of the image in plot-axis-coordinates - graph->set_width(w); - graph->set_height(h); - // color-map is "MATLAB" - graph->set_palette(JKQTPMathImageMATLAB); - // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); - // determine min/max of data automatically and use it to set the range of the color-scale - graph->set_autoImageRange(true); - // you can set the color-scale range manually by using: - // graph->set_autoImageRange(false); - // graph->set_imageMin(0); - // graph->set_imageMax(10); - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); - - - // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - - // 8 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,600); - plot.setWindowTitle("JKQTPColumnMathImage"); - - - return app.exec(); -} +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsimage.h" + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + const int NX=100; // image dimension in x-direction [pixels] + const int NY=100; // image dimension in x-direction [pixels] + const double dx=1e-2; // size of a pixel in x-direction [micrometers] + const double dy=1e-2; // size of a pixel in x-direction [micrometers] + const double w=static_cast(NX)*dx; + const double h=static_cast(NY)*dy; + double airydisk[NX*NY]; // row-major image + + // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) + double NA=1.1; // numerical aperture of lens + double wavelength=488e-3; // wavelength of the light [micrometers] + + // 2.2 calculate image of airy disk in a row-major array + double x, y=-h/2.0; + for (int iy=0; iyaddCopiedImageAsColumn(airydisk, NX, NY, "imagedata"); + + + // 4. create a graph (JKQTPColumnMathImage) with the column created above as data + // The data is color-coded with the color-palette JKQTPMathImageMATLAB + // the converted range of data is determined automatically because set_autoImageRange(true) + JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); + graph->set_title(""); + // image column with the data + graph->set_imageColumn(cAiryDisk); + // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering + graph->set_Nx(NX); + graph->set_Ny(NY); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(-w/2.0); + graph->set_y(-h/2.0); + // width and height of the image in plot-axis-coordinates + graph->set_width(w); + graph->set_height(h); + // color-map is "MATLAB" + graph->set_palette(JKQTPMathImageMATLAB); + // get coordinate axis of color-bar and set its label + graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + // determine min/max of data automatically and use it to set the range of the color-scale + graph->set_autoImageRange(true); + // you can set the color-scale range manually by using: + // graph->set_autoImageRange(false); + // graph->set_imageMin(0); + // graph->set_imageMax(10); + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); + plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + + + // 7. fix axis and plot aspect ratio to 1 + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_maintainAxisAspectRatio(true); + + // 8 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,600); + plot.setWindowTitle("JKQTPColumnMathImage"); + + + return app.exec(); +} diff --git a/test/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro similarity index 71% rename from test/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro rename to examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro index 9e71a55267..b0e7bfdb8c 100644 --- a/test/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro +++ b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro @@ -1,21 +1,25 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_imageplot.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_imageplot - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_imageplot.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_imageplot + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_imageplot/jkqtplotter_simpletest_imageplot_and_lib.pro b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot_and_lib.pro similarity index 97% rename from test/simpletest_imageplot/jkqtplotter_simpletest_imageplot_and_lib.pro rename to examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot_and_lib.pro index 60458635ef..f245498919 100644 --- a/test/simpletest_imageplot/jkqtplotter_simpletest_imageplot_and_lib.pro +++ b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_imageplot - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_imageplot.file=$$PWD/jkqtplotter_simpletest_imageplot.pro -jkqtplotter_simpletest_imageplot.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_imageplot + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_imageplot.file=$$PWD/jkqtplotter_simpletest_imageplot.pro +jkqtplotter_simpletest_imageplot.depends = jkqtplotterlib diff --git a/test/simpletest_imageplot_modifier/README.md b/examples/simpletest_imageplot_modifier/README.md similarity index 84% rename from test/simpletest_imageplot_modifier/README.md rename to examples/simpletest_imageplot_modifier/README.md index 560c52bc9e..31cdc4d38f 100644 --- a/test/simpletest_imageplot_modifier/README.md +++ b/examples/simpletest_imageplot_modifier/README.md @@ -1,125 +1,125 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple math image plot -This project (see `./test/simpletest_imageplot_modifier/`) creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here `sin(r)`). Then a second image (linearly scaling from 1 in the center to 0 at the borders) is used to modify the first image. The modification can alter several properties of the original image, like its saturation, its transparency (alpha) ... - -The soruce code of the main application is (see [`jkqtplotter_simpletest_imageplot_modifier.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp): -```c++ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsimage.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - const int NX=150; // image dimension in x-direction [pixels] - const int NY=150; // image dimension in x-direction [pixels] - double image[NX*NY]; // row-major image - double modifier[NX*NY]; // row-major modfier image - - // 2 calculate image of airy disk in a row-major array - double x, y=-static_cast(NY)/2.0; - for (int iy=0; iy(NX)/2.0; - for (int ix=0; ixaddCopiedImageAsColumn(image, NX, NY, "imagedata"); - size_t cModifier=ds->addCopiedImageAsColumn(modifier, NX, NY, "modifier"); - - - // 4. create a graph (JKQTPColumnMathImage) with the column created above as data - // The data is color-coded with the color-palette JKQTPMathImageMATLAB - // the converted range of data is determined automatically because set_autoImageRange(true) - JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); - graph->set_title(""); - // image column with the data - graph->set_imageColumn(cImage); - // now set the modifier image: - graph->set_modifierColumn(cModifier); - graph->set_autoModifierRange(true); - // ... and specify which image property is modified (here the saturation, but ModifyAlpha for the transparency and ModifyValue from the HSV color-model are also possible): - graph->set_modifierMode(JKQTPMathImageBase::ModifySaturation); - // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering - graph->set_Nx(NX); - graph->set_Ny(NY); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(-NX/2.0); - graph->set_y(-NX/2.0); - // width and height of the image in plot-axis-coordinates - graph->set_width(NX); - graph->set_height(NY); - // color-map is "MATLAB" - graph->set_palette(JKQTPMathImageMATLAB); - // determine min/max of data automatically and use it to set the range of the color-scale - graph->set_autoImageRange(true); - - - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); - - - // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - - // 8 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(500,500); - plot.setWindowTitle("JKQTPColumnMathImage"); - - - return app.exec(); -} -``` -The data image (`sin(r/30)`) on its own looks like this:
-![jkqtplotter_simpletest_imageplot_modifier_imageonly](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_modifier_imageonly.png)
-and the modifier image on its own would look like this:
-![jkqtplotter_simpletest_imageplot_modifier_modifieronly](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_modifier_modifieronly.png) - -Combined the two form this plot:
-![jkqtplotter_simpletest_imageplot_modifier](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_modifier.png) - - -See [`test/simpletest_imageplot`](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot) for a detailed description of the other possibilities that the class JKQTPColumnMathImage (and also JKQTPMathImage) offer with respect to determining how an image is plotted. You can combine all options there with the modifier feature described here. - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple math image plot +This project (see `./examples/simpletest_imageplot_modifier/`) creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here `sin(r)`). Then a second image (linearly scaling from 1 in the center to 0 at the borders) is used to modify the first image. The modification can alter several properties of the original image, like its saturation, its transparency (alpha) ... + +The soruce code of the main application is (see [`jkqtplotter_simpletest_imageplot_modifier.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp): +```c++ +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsimage.h" + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + const int NX=150; // image dimension in x-direction [pixels] + const int NY=150; // image dimension in x-direction [pixels] + double image[NX*NY]; // row-major image + double modifier[NX*NY]; // row-major modfier image + + // 2 calculate image of airy disk in a row-major array + double x, y=-static_cast(NY)/2.0; + for (int iy=0; iy(NX)/2.0; + for (int ix=0; ixaddCopiedImageAsColumn(image, NX, NY, "imagedata"); + size_t cModifier=ds->addCopiedImageAsColumn(modifier, NX, NY, "modifier"); + + + // 4. create a graph (JKQTPColumnMathImage) with the column created above as data + // The data is color-coded with the color-palette JKQTPMathImageMATLAB + // the converted range of data is determined automatically because set_autoImageRange(true) + JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); + graph->set_title(""); + // image column with the data + graph->set_imageColumn(cImage); + // now set the modifier image: + graph->set_modifierColumn(cModifier); + graph->set_autoModifierRange(true); + // ... and specify which image property is modified (here the saturation, but ModifyAlpha for the transparency and ModifyValue from the HSV color-model are also possible): + graph->set_modifierMode(JKQTPMathImageBase::ModifySaturation); + // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering + graph->set_Nx(NX); + graph->set_Ny(NY); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(-NX/2.0); + graph->set_y(-NX/2.0); + // width and height of the image in plot-axis-coordinates + graph->set_width(NX); + graph->set_height(NY); + // color-map is "MATLAB" + graph->set_palette(JKQTPMathImageMATLAB); + // determine min/max of data automatically and use it to set the range of the color-scale + graph->set_autoImageRange(true); + + + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); + plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + + + // 7. fix axis and plot aspect ratio to 1 + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_maintainAxisAspectRatio(true); + + // 8 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(500,500); + plot.setWindowTitle("JKQTPColumnMathImage"); + + + return app.exec(); +} +``` +The data image (`sin(r/30)`) on its own looks like this:
+![jkqtplotter_simpletest_imageplot_modifier_imageonly](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_modifier_imageonly.png)
+and the modifier image on its own would look like this:
+![jkqtplotter_simpletest_imageplot_modifier_modifieronly](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_modifier_modifieronly.png) + +Combined the two form this plot:
+![jkqtplotter_simpletest_imageplot_modifier](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_modifier.png) + + +See [`test/simpletest_imageplot`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot) for a detailed description of the other possibilities that the class JKQTPColumnMathImage (and also JKQTPMathImage) offer with respect to determining how an image is plotted. You can combine all options there with the modifier feature described here. + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp similarity index 97% rename from test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp rename to examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp index cf6071b49c..f1b0f7778f 100644 --- a/test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp +++ b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp @@ -1,102 +1,102 @@ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsimage.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - const int NX=150; // image dimension in x-direction [pixels] - const int NY=150; // image dimension in x-direction [pixels] - double image[NX*NY]; // row-major image - double modifier[NX*NY]; // row-major modfier image - - // 2 calculate image of airy disk in a row-major array - double x, y=-static_cast(NY)/2.0; - for (int iy=0; iy(NX)/2.0; - for (int ix=0; ixaddCopiedImageAsColumn(image, NX, NY, "imagedata"); - size_t cModifier=ds->addCopiedImageAsColumn(modifier, NX, NY, "modifier"); - - - // 4. create a graph (JKQTPColumnMathImage) with the column created above as data - // The data is color-coded with the color-palette JKQTPMathImageMATLAB - // the converted range of data is determined automatically because set_autoImageRange(true) - JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); - graph->set_title(""); - // image column with the data - graph->set_imageColumn(cImage); - // now set the modifier image: - graph->set_modifierColumn(cModifier); - graph->set_autoModifierRange(true); - // ... and specify which image property is modified (here the saturation, but ModifyAlpha for the transparency and ModifyValue from the HSV color-model are also possible): - graph->set_modifierMode(JKQTPMathImageBase::ModifySaturation); - // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering - graph->set_Nx(NX); - graph->set_Ny(NY); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(-NX/2.0); - graph->set_y(-NX/2.0); - // width and height of the image in plot-axis-coordinates - graph->set_width(NX); - graph->set_height(NY); - // color-map is "MATLAB" - graph->set_palette(JKQTPMathImageMATLAB); - // determine min/max of data automatically and use it to set the range of the color-scale - graph->set_autoImageRange(true); - - - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); - - - // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - - // 8 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(500,500); - plot.setWindowTitle("JKQTPColumnMathImage"); - - - return app.exec(); -} +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsimage.h" + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + const int NX=150; // image dimension in x-direction [pixels] + const int NY=150; // image dimension in x-direction [pixels] + double image[NX*NY]; // row-major image + double modifier[NX*NY]; // row-major modfier image + + // 2 calculate image of airy disk in a row-major array + double x, y=-static_cast(NY)/2.0; + for (int iy=0; iy(NX)/2.0; + for (int ix=0; ixaddCopiedImageAsColumn(image, NX, NY, "imagedata"); + size_t cModifier=ds->addCopiedImageAsColumn(modifier, NX, NY, "modifier"); + + + // 4. create a graph (JKQTPColumnMathImage) with the column created above as data + // The data is color-coded with the color-palette JKQTPMathImageMATLAB + // the converted range of data is determined automatically because set_autoImageRange(true) + JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); + graph->set_title(""); + // image column with the data + graph->set_imageColumn(cImage); + // now set the modifier image: + graph->set_modifierColumn(cModifier); + graph->set_autoModifierRange(true); + // ... and specify which image property is modified (here the saturation, but ModifyAlpha for the transparency and ModifyValue from the HSV color-model are also possible): + graph->set_modifierMode(JKQTPMathImageBase::ModifySaturation); + // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering + graph->set_Nx(NX); + graph->set_Ny(NY); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(-NX/2.0); + graph->set_y(-NX/2.0); + // width and height of the image in plot-axis-coordinates + graph->set_width(NX); + graph->set_height(NY); + // color-map is "MATLAB" + graph->set_palette(JKQTPMathImageMATLAB); + // determine min/max of data automatically and use it to set the range of the color-scale + graph->set_autoImageRange(true); + + + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); + plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + + + // 7. fix axis and plot aspect ratio to 1 + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_maintainAxisAspectRatio(true); + + // 8 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(500,500); + plot.setWindowTitle("JKQTPColumnMathImage"); + + + return app.exec(); +} diff --git a/test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro similarity index 72% rename from test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro rename to examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro index 87ae37fc9b..b87c16caef 100644 --- a/test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro +++ b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro @@ -1,21 +1,25 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_imageplot_modifier.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_imageplot_modifier - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_imageplot_modifier.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_imageplot_modifier + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier_and_lib.pro b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier_and_lib.pro similarity index 97% rename from test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier_and_lib.pro rename to examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier_and_lib.pro index e6f7b97d75..a0cfacee3d 100644 --- a/test/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier_and_lib.pro +++ b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_imageplot_modifier - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_imageplot_modifier.file=$$PWD/jkqtplotter_simpletest_imageplot_modifier.pro -jkqtplotter_simpletest_imageplot_modifier.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_imageplot_modifier + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_imageplot_modifier.file=$$PWD/jkqtplotter_simpletest_imageplot_modifier.pro +jkqtplotter_simpletest_imageplot_modifier.depends = jkqtplotterlib diff --git a/test/simpletest_imageplot_nodatastore/README.md b/examples/simpletest_imageplot_nodatastore/README.md similarity index 77% rename from test/simpletest_imageplot_nodatastore/README.md rename to examples/simpletest_imageplot_nodatastore/README.md index a61aba75ff..54351bd6a8 100644 --- a/test/simpletest_imageplot_nodatastore/README.md +++ b/examples/simpletest_imageplot_nodatastore/README.md @@ -1,115 +1,115 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple math image plot without use of central JKQTdatastore -This project (see `./test/simpletest_imageplot_nodatastore/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is stored as a simple C-array in row-major ordering and then given to a JKQTPMathImage to visualize it. The data is stored as a pointer directly in the JKQTPMathImage object. There is also a variant JKQTPColumnMathImage of JKQTPMathImage, which references a column in the internal JKQTdatastore and uses the data there for plotting. In both cases data has to be organized as a row-major matrix of values. JKQTPMathImage supports different dataytpes ([u]nit8/16/32/64,float,double see `JKQTPMathImageBase::DataType`) that can be configured e.g. by `set_data()`. - -The soruce code of the main application is (see [`jkqtplotter_simpletest_imageplot_nodatastore.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp): -```c++ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsimage.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - const int NX=100; // image dimension in x-direction [pixels] - const int NY=100; // image dimension in x-direction [pixels] - const double dx=1e-2; // size of a pixel in x-direction [micrometers] - const double dy=1e-2; // size of a pixel in x-direction [micrometers] - const double w=static_cast(NX)*dx; - const double h=static_cast(NY)*dy; - double airydisk[NX*NY]; // row-major image - - // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) - double NA=1.1; // numerical aperture of lens - double wavelength=488e-3; // wavelength of the light [micrometers] - - // 2.2 calculate image of airy disk in a row-major array - double x, y=-h/2.0; - for (int iy=0; iyset_title(""); - // set array as datasource, with correct size NX*NY and datatype JKQTPMathImageBase::DataType::DoubleArray - graph->set_data(airydisk, NX, NY, JKQTPMathImageBase::DataType::DoubleArray); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(-w/2.0); - graph->set_y(-h/2.0); - // width and height of the image in plot-axis-coordinates - graph->set_width(w); - graph->set_height(h); - // color-map is "BLUEYELLOW" - graph->set_palette(JKQTPMathImageBLUEYELLOW); - // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); - // determine min/max of data automatically and use it to set the range of the color-scale - graph->set_autoImageRange(true); - // you can set the color-scale range manually by using: - // graph->set_autoImageRange(false); - // graph->set_imageMin(0); - // graph->set_imageMax(10); - - - // 4. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - - // 5. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); - - - // 6. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - - // 7. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,600); - plot.setWindowTitle("JKQTPMathImage"); - - - return app.exec(); -} -``` - -The result looks like this: - -![jkqtplotter_simpletest_imageplot_nodatastore](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_nodatastore.png) - -See [`test/simpletest_imageplot`](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot) for a detailed description of the other possibilities that the class JKQTPColumnMathImage (and also JKQTPMathImage) offer with respect to determining how an image is plottet. - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple math image plot without use of central JKQTdatastore +This project (see `./examples/simpletest_imageplot_nodatastore/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is stored as a simple C-array in row-major ordering and then given to a JKQTPMathImage to visualize it. The data is stored as a pointer directly in the JKQTPMathImage object. There is also a variant JKQTPColumnMathImage of JKQTPMathImage, which references a column in the internal JKQTdatastore and uses the data there for plotting. In both cases data has to be organized as a row-major matrix of values. JKQTPMathImage supports different dataytpes ([u]nit8/16/32/64,float,double see `JKQTPMathImageBase::DataType`) that can be configured e.g. by `set_data()`. + +The soruce code of the main application is (see [`jkqtplotter_simpletest_imageplot_nodatastore.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp): +```c++ +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsimage.h" + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + const int NX=100; // image dimension in x-direction [pixels] + const int NY=100; // image dimension in x-direction [pixels] + const double dx=1e-2; // size of a pixel in x-direction [micrometers] + const double dy=1e-2; // size of a pixel in x-direction [micrometers] + const double w=static_cast(NX)*dx; + const double h=static_cast(NY)*dy; + double airydisk[NX*NY]; // row-major image + + // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) + double NA=1.1; // numerical aperture of lens + double wavelength=488e-3; // wavelength of the light [micrometers] + + // 2.2 calculate image of airy disk in a row-major array + double x, y=-h/2.0; + for (int iy=0; iyset_title(""); + // set array as datasource, with correct size NX*NY and datatype JKQTPMathImageBase::DataType::DoubleArray + graph->set_data(airydisk, NX, NY, JKQTPMathImageBase::DataType::DoubleArray); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(-w/2.0); + graph->set_y(-h/2.0); + // width and height of the image in plot-axis-coordinates + graph->set_width(w); + graph->set_height(h); + // color-map is "BLUEYELLOW" + graph->set_palette(JKQTPMathImageBLUEYELLOW); + // get coordinate axis of color-bar and set its label + graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + // determine min/max of data automatically and use it to set the range of the color-scale + graph->set_autoImageRange(true); + // you can set the color-scale range manually by using: + // graph->set_autoImageRange(false); + // graph->set_imageMin(0); + // graph->set_imageMax(10); + + + // 4. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + + // 5. set axis labels + plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); + plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + + + // 6. fix axis and plot aspect ratio to 1 + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_maintainAxisAspectRatio(true); + + // 7. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,600); + plot.setWindowTitle("JKQTPMathImage"); + + + return app.exec(); +} +``` + +The result looks like this: + +![jkqtplotter_simpletest_imageplot_nodatastore](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_nodatastore.png) + +See [`test/simpletest_imageplot`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot) for a detailed description of the other possibilities that the class JKQTPColumnMathImage (and also JKQTPMathImage) offer with respect to determining how an image is plottet. + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp similarity index 97% rename from test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp rename to examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp index afab1639a4..0adfdd65c9 100644 --- a/test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp +++ b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp @@ -1,96 +1,96 @@ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsimage.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - const int NX=100; // image dimension in x-direction [pixels] - const int NY=100; // image dimension in x-direction [pixels] - const double dx=1e-2; // size of a pixel in x-direction [micrometers] - const double dy=1e-2; // size of a pixel in x-direction [micrometers] - const double w=static_cast(NX)*dx; - const double h=static_cast(NY)*dy; - double airydisk[NX*NY]; // row-major image - - // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) - double NA=1.1; // numerical aperture of lens - double wavelength=488e-3; // wavelength of the light [micrometers] - - // 2.2 calculate image of airy disk in a row-major array - double x, y=-h/2.0; - for (int iy=0; iyset_title(""); - // set array as datasource, with correct size NX*NY and datatype JKQTPMathImageBase::DataType::DoubleArray - graph->set_data(airydisk, NX, NY, JKQTPMathImageBase::DataType::DoubleArray); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(-w/2.0); - graph->set_y(-h/2.0); - // width and height of the image in plot-axis-coordinates - graph->set_width(w); - graph->set_height(h); - // color-map is "BLUEYELLOW" - graph->set_palette(JKQTPMathImageBLUEYELLOW); - // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); - // determine min/max of data automatically and use it to set the range of the color-scale - graph->set_autoImageRange(true); - // you can set the color-scale range manually by using: - // graph->set_autoImageRange(false); - // graph->set_imageMin(0); - // graph->set_imageMax(10); - - - // 4. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - - // 5. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); - - - // 6. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - - // 7. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,600); - plot.setWindowTitle("JKQTPMathImage"); - - - return app.exec(); -} +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsimage.h" + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + const int NX=100; // image dimension in x-direction [pixels] + const int NY=100; // image dimension in x-direction [pixels] + const double dx=1e-2; // size of a pixel in x-direction [micrometers] + const double dy=1e-2; // size of a pixel in x-direction [micrometers] + const double w=static_cast(NX)*dx; + const double h=static_cast(NY)*dy; + double airydisk[NX*NY]; // row-major image + + // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) + double NA=1.1; // numerical aperture of lens + double wavelength=488e-3; // wavelength of the light [micrometers] + + // 2.2 calculate image of airy disk in a row-major array + double x, y=-h/2.0; + for (int iy=0; iyset_title(""); + // set array as datasource, with correct size NX*NY and datatype JKQTPMathImageBase::DataType::DoubleArray + graph->set_data(airydisk, NX, NY, JKQTPMathImageBase::DataType::DoubleArray); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(-w/2.0); + graph->set_y(-h/2.0); + // width and height of the image in plot-axis-coordinates + graph->set_width(w); + graph->set_height(h); + // color-map is "BLUEYELLOW" + graph->set_palette(JKQTPMathImageBLUEYELLOW); + // get coordinate axis of color-bar and set its label + graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + // determine min/max of data automatically and use it to set the range of the color-scale + graph->set_autoImageRange(true); + // you can set the color-scale range manually by using: + // graph->set_autoImageRange(false); + // graph->set_imageMin(0); + // graph->set_imageMax(10); + + + // 4. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + + // 5. set axis labels + plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); + plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + + + // 6. fix axis and plot aspect ratio to 1 + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_maintainAxisAspectRatio(true); + + // 7. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,600); + plot.setWindowTitle("JKQTPMathImage"); + + + return app.exec(); +} diff --git a/test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro similarity index 73% rename from test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro rename to examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro index 9f1142fb4f..c94aae8289 100644 --- a/test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro +++ b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro @@ -1,23 +1,27 @@ -TEMPLATE = app - -# output executable name -TARGET = jkqtplotter_simpletest_imageplot_nodatastore - -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_imageplot_nodatastore.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +TEMPLATE = app + +# output executable name +TARGET = jkqtplotter_simpletest_imageplot_nodatastore + +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_imageplot_nodatastore.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore_and_lib.pro b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore_and_lib.pro similarity index 97% rename from test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore_and_lib.pro rename to examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore_and_lib.pro index 433f01c66c..b79fe413de 100644 --- a/test/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore_and_lib.pro +++ b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_imageplot_nodatastore - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_imageplot_nodatastore.file=$$PWD/jkqtplotter_simpletest_imageplot_nodatastore.pro -jkqtplotter_simpletest_imageplot_nodatastore.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_imageplot_nodatastore + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_imageplot_nodatastore.file=$$PWD/jkqtplotter_simpletest_imageplot_nodatastore.pro +jkqtplotter_simpletest_imageplot_nodatastore.depends = jkqtplotterlib diff --git a/test/simpletest_imageplot_opencv/.gitignore b/examples/simpletest_imageplot_opencv/.gitignore similarity index 100% rename from test/simpletest_imageplot_opencv/.gitignore rename to examples/simpletest_imageplot_opencv/.gitignore diff --git a/test/simpletest_imageplot_opencv/README.md b/examples/simpletest_imageplot_opencv/README.md similarity index 86% rename from test/simpletest_imageplot_opencv/README.md rename to examples/simpletest_imageplot_opencv/README.md index e50bac6942..fa6913c099 100644 --- a/test/simpletest_imageplot_opencv/README.md +++ b/examples/simpletest_imageplot_opencv/README.md @@ -1,128 +1,128 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple math image plot, showin a 1-channel OpenCV cv::Mat -This project (see `./test/simpletest_imageplot_opencv/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is generated as an OpenCV cv::Mat image and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). -To copy the data a special OpenCV Interface function `JKQTPcopyCvMatToColumn()` is used, that copies the data from a cv::Mat directly into a column. - -The function `JKQTPcopyCvMatToColumn()` is available from the (non-default) header-only extension from `jkqtplotter/jkqtpopencvinterface.h`. This header provides facilities to interface JKQtPlotter with OPenCV. - -The source code of the main application is (see [`jkqtplotter_simpletest_imageplot_opencv.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp): -```c++ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpopencvinterface.h" -#include - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - cv::Mat airydisk(150, 150, CV_64FC1); // OpenCV-Image for the data - const double dx=1e-2; // size of a pixel in x-direction [micrometers] - const double dy=1e-2; // size of a pixel in x-direction [micrometers] - const double w=static_cast(airydisk.cols)*dx; - const double h=static_cast(airydisk.rows)*dy; - - // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) - double NA=1.1; // numerical aperture of lens - double wavelength=488e-3; // wavelength of the light [micrometers] - - // 2.2 calculate image of airy disk in a row-major array - double x, y=-h/2.0; - for (int iy=0; iy(iy,ix) = pow(2.0*j1(v)/v, 2); - x+=dx; - } - y+=dy; - } - - - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // In this step the contents of one channel of the openCV cv::Mat is copied into a column - // of the datastore in row-major order - size_t cAiryDisk=JKQTPcopyCvMatToColumn(ds, airydisk, "imagedata"); - - - // 4. create a graph (JKQTPColumnMathImage) with the column created above as data - // The data is color-coded with the color-palette JKQTPMathImageMATLAB - // the converted range of data is determined automatically because set_autoImageRange(true) - JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); - graph->set_title(""); - // image column with the data - graph->set_imageColumn(cAiryDisk); - // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering - graph->set_Nx(airydisk.cols); - graph->set_Ny(airydisk.rows); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(-w/2.0); - graph->set_y(-h/2.0); - // width and height of the image in plot-axis-coordinates - graph->set_width(w); - graph->set_height(h); - // color-map is "MATLAB" - graph->set_palette(JKQTPMathImageMATLAB); - // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); - // determine min/max of data automatically and use it to set the range of the color-scale - graph->set_autoImageRange(true); - // you can set the color-scale range manually by using: - // graph->set_autoImageRange(false); - // graph->set_imageMin(0); - // graph->set_imageMax(10); - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); - - // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - - // 8 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,600); - plot.setWindowTitle("JKQTPColumnMathImage"); - - - return app.exec(); -} - -``` -The result looks like this: - -![jkqtplotter_simpletest_imageplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_opencv.png) - -See [`test/simpletest_imageplot`](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_imageplot) for a detailed description of the other possibilities that the class JKQTPColumnMathImage (and also JKQTPMathImage) offer with respect to determining how an image is plottet. - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple math image plot, showin a 1-channel OpenCV cv::Mat +This project (see `./examples/simpletest_imageplot_opencv/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is generated as an OpenCV cv::Mat image and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). +To copy the data a special OpenCV Interface function `JKQTPcopyCvMatToColumn()` is used, that copies the data from a cv::Mat directly into a column. + +The function `JKQTPcopyCvMatToColumn()` is available from the (non-default) header-only extension from `jkqtplotter/jkqtpopencvinterface.h`. This header provides facilities to interface JKQtPlotter with OPenCV. + +The source code of the main application is (see [`jkqtplotter_simpletest_imageplot_opencv.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp): +```c++ +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpopencvinterface.h" +#include + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + cv::Mat airydisk(150, 150, CV_64FC1); // OpenCV-Image for the data + const double dx=1e-2; // size of a pixel in x-direction [micrometers] + const double dy=1e-2; // size of a pixel in x-direction [micrometers] + const double w=static_cast(airydisk.cols)*dx; + const double h=static_cast(airydisk.rows)*dy; + + // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) + double NA=1.1; // numerical aperture of lens + double wavelength=488e-3; // wavelength of the light [micrometers] + + // 2.2 calculate image of airy disk in a row-major array + double x, y=-h/2.0; + for (int iy=0; iy(iy,ix) = pow(2.0*j1(v)/v, 2); + x+=dx; + } + y+=dy; + } + + + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // In this step the contents of one channel of the openCV cv::Mat is copied into a column + // of the datastore in row-major order + size_t cAiryDisk=JKQTPcopyCvMatToColumn(ds, airydisk, "imagedata"); + + + // 4. create a graph (JKQTPColumnMathImage) with the column created above as data + // The data is color-coded with the color-palette JKQTPMathImageMATLAB + // the converted range of data is determined automatically because set_autoImageRange(true) + JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); + graph->set_title(""); + // image column with the data + graph->set_imageColumn(cAiryDisk); + // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering + graph->set_Nx(airydisk.cols); + graph->set_Ny(airydisk.rows); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(-w/2.0); + graph->set_y(-h/2.0); + // width and height of the image in plot-axis-coordinates + graph->set_width(w); + graph->set_height(h); + // color-map is "MATLAB" + graph->set_palette(JKQTPMathImageMATLAB); + // get coordinate axis of color-bar and set its label + graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + // determine min/max of data automatically and use it to set the range of the color-scale + graph->set_autoImageRange(true); + // you can set the color-scale range manually by using: + // graph->set_autoImageRange(false); + // graph->set_imageMin(0); + // graph->set_imageMax(10); + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); + plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + + // 7. fix axis and plot aspect ratio to 1 + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_maintainAxisAspectRatio(true); + + // 8 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,600); + plot.setWindowTitle("JKQTPColumnMathImage"); + + + return app.exec(); +} + +``` +The result looks like this: + +![jkqtplotter_simpletest_imageplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_opencv.png) + +See [`test/simpletest_imageplot`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot) for a detailed description of the other possibilities that the class JKQTPColumnMathImage (and also JKQTPMathImage) offer with respect to determining how an image is plottet. + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp similarity index 97% rename from test/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp rename to examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp index 477c491ba4..24193a8f82 100644 --- a/test/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp +++ b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp @@ -1,108 +1,108 @@ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpopencvinterface.h" -#include - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - cv::Mat airydisk(150, 150, CV_64FC1); // OpenCV-Image for the data - const double dx=1e-2; // size of a pixel in x-direction [micrometers] - const double dy=1e-2; // size of a pixel in x-direction [micrometers] - const double w=static_cast(airydisk.cols)*dx; - const double h=static_cast(airydisk.rows)*dy; - - // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) - double NA=1.1; // numerical aperture of lens - double wavelength=488e-3; // wavelength of the light [micrometers] - - // 2.2 calculate image of airy disk in a row-major array - double x, y=-h/2.0; - for (int iy=0; iy(iy,ix) = pow(2.0*j1(v)/v, 2); - x+=dx; - } - y+=dy; - } - - - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // In this step the contents of one channel of the openCV cv::Mat is copied into a column - // of the datastore in row-major order - size_t cAiryDisk=JKQTPcopyCvMatToColumn(ds, airydisk, "imagedata"); - - - // 4. create a graph (JKQTPColumnMathImage) with the column created above as data - // The data is color-coded with the color-palette JKQTPMathImageMATLAB - // the converted range of data is determined automatically because set_autoImageRange(true) - JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); - graph->set_title(""); - // image column with the data - graph->set_imageColumn(cAiryDisk); - // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering - graph->set_Nx(airydisk.cols); - graph->set_Ny(airydisk.rows); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(-w/2.0); - graph->set_y(-h/2.0); - // width and height of the image in plot-axis-coordinates - graph->set_width(w); - graph->set_height(h); - // color-map is "MATLAB" - graph->set_palette(JKQTPMathImageMATLAB); - // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); - // determine min/max of data automatically and use it to set the range of the color-scale - graph->set_autoImageRange(true); - // you can set the color-scale range manually by using: - // graph->set_autoImageRange(false); - // graph->set_imageMin(0); - // graph->set_imageMax(10); - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); - - // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - - // 8 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,600); - plot.setWindowTitle("JKQTPColumnMathImage"); - - - return app.exec(); -} +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpopencvinterface.h" +#include + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + cv::Mat airydisk(150, 150, CV_64FC1); // OpenCV-Image for the data + const double dx=1e-2; // size of a pixel in x-direction [micrometers] + const double dy=1e-2; // size of a pixel in x-direction [micrometers] + const double w=static_cast(airydisk.cols)*dx; + const double h=static_cast(airydisk.rows)*dy; + + // 2.1 Parameters for airy disk plot (see https://en.wikipedia.org/wiki/Airy_disk) + double NA=1.1; // numerical aperture of lens + double wavelength=488e-3; // wavelength of the light [micrometers] + + // 2.2 calculate image of airy disk in a row-major array + double x, y=-h/2.0; + for (int iy=0; iy(iy,ix) = pow(2.0*j1(v)/v, 2); + x+=dx; + } + y+=dy; + } + + + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // In this step the contents of one channel of the openCV cv::Mat is copied into a column + // of the datastore in row-major order + size_t cAiryDisk=JKQTPcopyCvMatToColumn(ds, airydisk, "imagedata"); + + + // 4. create a graph (JKQTPColumnMathImage) with the column created above as data + // The data is color-coded with the color-palette JKQTPMathImageMATLAB + // the converted range of data is determined automatically because set_autoImageRange(true) + JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(&plot); + graph->set_title(""); + // image column with the data + graph->set_imageColumn(cAiryDisk); + // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering + graph->set_Nx(airydisk.cols); + graph->set_Ny(airydisk.rows); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(-w/2.0); + graph->set_y(-h/2.0); + // width and height of the image in plot-axis-coordinates + graph->set_width(w); + graph->set_height(h); + // color-map is "MATLAB" + graph->set_palette(JKQTPMathImageMATLAB); + // get coordinate axis of color-bar and set its label + graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + // determine min/max of data automatically and use it to set the range of the color-scale + graph->set_autoImageRange(true); + // you can set the color-scale range manually by using: + // graph->set_autoImageRange(false); + // graph->set_imageMin(0); + // graph->set_imageMax(10); + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); + plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + + // 7. fix axis and plot aspect ratio to 1 + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_maintainAxisAspectRatio(true); + + // 8 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,600); + plot.setWindowTitle("JKQTPColumnMathImage"); + + + return app.exec(); +} diff --git a/test/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro similarity index 76% rename from test/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro rename to examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro index 2e13f1230e..d6822f8081 100644 --- a/test/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro +++ b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro @@ -1,26 +1,31 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_imageplot_opencv.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_imageplot_opencv - -# add OpenCV-interface to JKQTPdatastore -DEFINES += JKQTPLOTTER_OPENCV_INTERFACE - -# include JKQtPlotter source code -include(../../lib/jkqtplotter.pri) - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER - - -# link agains OpenCV-3.4.1 -INCLUDEPATH += $$PWD/OpenCV-3.4.1/include/ -LIBS += -L$$PWD/OpenCV-3.4.1/bin/ -llibopencv_core341 +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_imageplot_opencv.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_imageplot_opencv + +# add OpenCV-interface to JKQTPdatastore +DEFINES += JKQTPLOTTER_OPENCV_INTERFACE + + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER + + +# link agains OpenCV-3.4.1 +INCLUDEPATH += $$PWD/OpenCV-3.4.1/include/ +LIBS += -L$$PWD/OpenCV-3.4.1/bin/ -llibopencv_core341 + +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") \ No newline at end of file diff --git a/test/simpletest_impulsesplot/README.md b/examples/simpletest_impulsesplot/README.md similarity index 86% rename from test/simpletest_impulsesplot/README.md rename to examples/simpletest_impulsesplot/README.md index 29484d1535..716f3d6e4c 100644 --- a/test/simpletest_impulsesplot/README.md +++ b/examples/simpletest_impulsesplot/README.md @@ -1,58 +1,58 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple impulse plots -This project (see `./test/simpletest_impulsesplot/`) simply creates a JKQtPlotter widget (as a new window) and adds a single impulse graph. -The soruce code of the main application is (see [`jkqtplotter_simpletest_impulsesplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp). - - - -First data for a curve is calculated and stored in `QVector`: -```c++ - QVector X, Y; - for (int i=0; iaddCopiedColumn(X, "x"); - size_t columnY=ds->addCopiedColumn(Y, "y"); -``` - -Now an impulse graph object is generated and added to the plot: -```c++ - JKQTPimpulsesVerticalGraph* graph=new JKQTPimpulsesVerticalGraph(&plot); - graph->set_xColumn(columnX); - graph->set_yColumn(columnY); - graph->set_lineWidth(2); - graph->set_color(QColor("red")); - graph->set_title(QObject::tr("$\\cos(x)\\cdot\\exp(-x/10)$")); - - plot.addGraph(graph); -``` - -The result looks like this: - -![jkqtplotter_simpletest_impulsesplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_impulsesplot.png) - -There is an alternative class `JKQTPimpulsesHorizontalGraph` which draws horizontal impulse plots: -```c++ - JKQTPimpulsesHorizontalGraph* graph=new JKQTPimpulsesHorizontalGraph(&plot); - graph->set_yColumn(columnX); - graph->set_xColumn(columnY); - graph->set_lineWidth(2); - graph->set_color(QColor("blue")); - graph->set_title(QObject::tr("$\\cos(x)\\cdot\\exp(-x/10)$")); -``` - -This code snippet results in a plot like this: - -![jkqtplotter_simpletest_impulsesplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_impulsesplot_horizontal.png) - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple impulse plots +This project (see `./examples/simpletest_impulsesplot/`) simply creates a JKQtPlotter widget (as a new window) and adds a single impulse graph. +The soruce code of the main application is (see [`jkqtplotter_simpletest_impulsesplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp). + + + +First data for a curve is calculated and stored in `QVector`: +```c++ + QVector X, Y; + for (int i=0; iaddCopiedColumn(X, "x"); + size_t columnY=ds->addCopiedColumn(Y, "y"); +``` + +Now an impulse graph object is generated and added to the plot: +```c++ + JKQTPimpulsesVerticalGraph* graph=new JKQTPimpulsesVerticalGraph(&plot); + graph->set_xColumn(columnX); + graph->set_yColumn(columnY); + graph->set_lineWidth(2); + graph->set_color(QColor("red")); + graph->set_title(QObject::tr("$\\cos(x)\\cdot\\exp(-x/10)$")); + + plot.addGraph(graph); +``` + +The result looks like this: + +![jkqtplotter_simpletest_impulsesplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_impulsesplot.png) + +There is an alternative class `JKQTPimpulsesHorizontalGraph` which draws horizontal impulse plots: +```c++ + JKQTPimpulsesHorizontalGraph* graph=new JKQTPimpulsesHorizontalGraph(&plot); + graph->set_yColumn(columnX); + graph->set_xColumn(columnY); + graph->set_lineWidth(2); + graph->set_color(QColor("blue")); + graph->set_title(QObject::tr("$\\cos(x)\\cdot\\exp(-x/10)$")); +``` + +This code snippet results in a plot like this: + +![jkqtplotter_simpletest_impulsesplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_impulsesplot_horizontal.png) + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp similarity index 96% rename from test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp rename to examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp index 872c963384..d32b5467c5 100644 --- a/test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp +++ b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp @@ -1,55 +1,55 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsimpulses.h" - -// number of datapoints: -#define Ndata 40 - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for a simple plot (a sine curve with lin. increasing errors) - QVector X, Y; - for (int i=0; iaddCopiedColumn(X, "x"); - size_t columnY=ds->addCopiedColumn(Y, "y"); - - // 4. create a vertical impulse graph in the plot, which plots the dataset X/Y: - JKQTPimpulsesVerticalGraph* graph=new JKQTPimpulsesVerticalGraph(&plot); - graph->set_xColumn(columnX); - graph->set_yColumn(columnY); - graph->set_lineWidth(2); - graph->set_color(QColor("red")); - graph->set_title(QObject::tr("$\\cos(x)\\cdot\\exp(-x/10)$")); - - // 5. add the graph to the plot, so it is actually displayed - plot.addGraph(graph); - - // 6. set some axis properties (we use LaTeX for nice equation rendering) - plot.get_xAxis()->set_axisLabel(QObject::tr("x-axis")); - plot.get_yAxis()->set_axisLabel(QObject::tr("y-axis")); - - // 7. switch the grid off - plot.get_xAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawGrid(false); - - // 8. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsimpulses.h" + +// number of datapoints: +#define Ndata 40 + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for a simple plot (a sine curve with lin. increasing errors) + QVector X, Y; + for (int i=0; iaddCopiedColumn(X, "x"); + size_t columnY=ds->addCopiedColumn(Y, "y"); + + // 4. create a vertical impulse graph in the plot, which plots the dataset X/Y: + JKQTPimpulsesVerticalGraph* graph=new JKQTPimpulsesVerticalGraph(&plot); + graph->set_xColumn(columnX); + graph->set_yColumn(columnY); + graph->set_lineWidth(2); + graph->set_color(QColor("red")); + graph->set_title(QObject::tr("$\\cos(x)\\cdot\\exp(-x/10)$")); + + // 5. add the graph to the plot, so it is actually displayed + plot.addGraph(graph); + + // 6. set some axis properties (we use LaTeX for nice equation rendering) + plot.get_xAxis()->set_axisLabel(QObject::tr("x-axis")); + plot.get_yAxis()->set_axisLabel(QObject::tr("y-axis")); + + // 7. switch the grid off + plot.get_xAxis()->set_drawGrid(false); + plot.get_yAxis()->set_drawGrid(false); + + // 8. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + + return app.exec(); +} diff --git a/test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro similarity index 73% rename from test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro rename to examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro index f432c7bd70..36fd4a0659 100644 --- a/test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro +++ b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro @@ -1,23 +1,27 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_impulsesplot.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_impulsesplot - - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -win32-msvc*: DEFINES += _USE_MATH_DEFINES - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_impulsesplot.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_impulsesplot + + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +win32-msvc*: DEFINES += _USE_MATH_DEFINES + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot_and_lib.pro b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot_and_lib.pro similarity index 97% rename from test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot_and_lib.pro rename to examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot_and_lib.pro index cab3f5ead2..83c05a64c0 100644 --- a/test/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot_and_lib.pro +++ b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_impulsesplot - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_impulsesplot.file=$$PWD/jkqtplotter_simpletest_impulsesplot.pro -jkqtplotter_simpletest_impulsesplot.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_impulsesplot + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_impulsesplot.file=$$PWD/jkqtplotter_simpletest_impulsesplot.pro +jkqtplotter_simpletest_impulsesplot.depends = jkqtplotterlib diff --git a/test/simpletest_logaxes/README.md b/examples/simpletest_logaxes/README.md similarity index 91% rename from test/simpletest_logaxes/README.md rename to examples/simpletest_logaxes/README.md index 3a378a95ff..21b26bd1e8 100644 --- a/test/simpletest_logaxes/README.md +++ b/examples/simpletest_logaxes/README.md @@ -1,110 +1,110 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Line Graph with Logarithmic y-axis -This project (see `./test/simpletest_logaxes/`) simply creates a JKQtPlotter widget (as a new window) and several line-graphs of different resonance curves. - -The source code of the main application can be found in [`jkqtplotter_simpletest_logaxes.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp). Mainly several graphs are generated in a loop and then different line styles are applied to the graphs (set by ``graph->set_style()`). The colors are set automtically from an internal default palette. The main loop looks like this: - -```c++ - QVector pens {Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; - for (int id=0; id Y; - for (auto& xx: X) { - Y<<1.0/sqrt(sqr(1-sqr(xx))+sqr(2*xx*D[id])); - } - - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); - - // copy data into datastore and immediately set the yColumn - graph->set_xColumn(columnX); - graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(id))); - - // don't use symbols - graph->set_symbol(JKQTPnoSymbol); - // use one of different pens - graph->set_style(pens[id%pens.size()]); - // set width of graph line - graph->set_lineWidth(1.5); - - // graph title is made from symbol+penstyle - graph->set_title(QString("D=\\delta/\\omega_0=%1").arg(D[id])); - - // add the graph to the plot, so it is actually displayed - plot.addGraph(graph); - } -``` - -Then a `JKQTPgeoText` is added to the graph, which shows the function plotted in the plot: -```c++ - // 4. Also we add a text-element in the plot to show the plotted function - // This element (JKQTPgeoText) is taken from the set of geometric elements - // and is simply parametrized by a position (1.25/10) and the text to display. - // In addition you can also set the font size (here to 15) - // Use '$...$' around the actual math string to ensure rendering with a math font - // (the internal renderer uses XITS fonts by default, which are free and auto-distributed - // and loaded in the library). If you don't use the math-mode modifiers, the default - // font of the other rendering text is used, which might not be suitable for - // high-quality math rendering. - plot.addGraph(new JKQTPgeoText(&plot, 1.25, 10, "$\\frac{A}{A_{stat}}=\\frac{1}{\\sqrt{\\left(1-\\eta^2\\right)^2+\\left(2{\\eta}D\\right)^2}}$", 15)); -``` -The difference between not using and using `$...$` for the equation can be seen here: -- no $-math-mode: ![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_lowqmathrendering.png) -- using $-math-mode: ![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_highqmathrendering.png) - -Finally the y-axis is switched to logarithmic scaling and the axis labels are set: -```c++ -// 5. set y-axis to logarithmic (x-axis would be analogous, but using `plot.get_xAxis()`) - plot.get_yAxis()->set_logAxis(true); - // now we set the number of label ticks to 9 (you give the count if minor between two majors, - // so if you want ticks for 1,2,3,...,10,20,30,...,100... you need to use 9: - plot.get_yAxis()->set_minorTicks(9); - // the minor grid is not shown by default. You can switch it on: - plot.get_yAxis()->set_drawMinorGrid(true); - // usually axis ticks are shown as numbers 0.01, 0.1, 1, 10, ... You can also force the scientific - // power-of-10 notation, using: - plot.get_yAxis()->set_labelType(JKQTPCALTexponent); - // the number of digits in JKQTPCALTexponent determines which labels are drawn in standard-notation, - // as compared to power-notation (e.g. if set to 1, the labels 0.1=10^{-1}, 1, 10 are shown in - // standard notation, the rest in power-notation. This tweak improves readability) - plot.get_yAxis()->set_labelDigits(0); - // minor tick labels are usually not displayed, but you can switch them on, using - //plot.get_yAxis()->set_minorTickLabelsEnabled(true); - // the axis font sizes can be set with: - plot.get_yAxis()->set_tickLabelFontSize(10); // axis tick labels - plot.get_yAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels - plot.get_yAxis()->set_labelFontSize(14); // axis label size - plot.get_xAxis()->set_tickLabelFontSize(10); // axis tick labels - plot.get_xAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels - plot.get_xAxis()->set_labelFontSize(14); // axis label size - // ... and finally set axis labels (using LaTeX notation and $...$ to improve rendering) - plot.get_yAxis()->set_axisLabel("Amplitude $A/A_{stat}$"); - plot.get_xAxis()->set_axisLabel("relative driving frequency $\\eta=\\omega/\\omega_0$"); -``` - -As an alternative `JKQTPCALTexponentCharacter` does not use the power-of-10 notation, but uses the usual unit-characters, e.g. 0.001=1m, 0.000001=1µ, 10000=10k, ... - -The result looks like this: - -![jkqtplotter_simpletest_logaxes](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes.png) - -Without the logarithmic scaling we would have: - -![jkqtplotter_simpletest_logaxes_nolog](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_nolog.png) - -Switching the minor grid off results in a plot like this: - -![jkqtplotter_simpletest_logaxes_nominorgrid](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_nominorgrid.png) - -These examples show the results for different typical values for `set_minorTicks()`: - -![logaxis_set_minorticks](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/logaxis_set_minorticks.png) - -These examples show the results for different typical values for `set_labelType()`: - -![logaxis_set_labelType](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/logaxis_set_labelType.png) - - -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Line Graph with Logarithmic y-axis +This project (see `./examples/simpletest_logaxes/`) simply creates a JKQtPlotter widget (as a new window) and several line-graphs of different resonance curves. + +The source code of the main application can be found in [`jkqtplotter_simpletest_logaxes.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp). Mainly several graphs are generated in a loop and then different line styles are applied to the graphs (set by ``graph->set_style()`). The colors are set automtically from an internal default palette. The main loop looks like this: + +```c++ + QVector pens {Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; + for (int id=0; id Y; + for (auto& xx: X) { + Y<<1.0/sqrt(sqr(1-sqr(xx))+sqr(2*xx*D[id])); + } + + JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); + + // copy data into datastore and immediately set the yColumn + graph->set_xColumn(columnX); + graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(id))); + + // don't use symbols + graph->set_symbol(JKQTPnoSymbol); + // use one of different pens + graph->set_style(pens[id%pens.size()]); + // set width of graph line + graph->set_lineWidth(1.5); + + // graph title is made from symbol+penstyle + graph->set_title(QString("D=\\delta/\\omega_0=%1").arg(D[id])); + + // add the graph to the plot, so it is actually displayed + plot.addGraph(graph); + } +``` + +Then a `JKQTPgeoText` is added to the graph, which shows the function plotted in the plot: +```c++ + // 4. Also we add a text-element in the plot to show the plotted function + // This element (JKQTPgeoText) is taken from the set of geometric elements + // and is simply parametrized by a position (1.25/10) and the text to display. + // In addition you can also set the font size (here to 15) + // Use '$...$' around the actual math string to ensure rendering with a math font + // (the internal renderer uses XITS fonts by default, which are free and auto-distributed + // and loaded in the library). If you don't use the math-mode modifiers, the default + // font of the other rendering text is used, which might not be suitable for + // high-quality math rendering. + plot.addGraph(new JKQTPgeoText(&plot, 1.25, 10, "$\\frac{A}{A_{stat}}=\\frac{1}{\\sqrt{\\left(1-\\eta^2\\right)^2+\\left(2{\\eta}D\\right)^2}}$", 15)); +``` +The difference between not using and using `$...$` for the equation can be seen here: +- no $-math-mode: ![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_lowqmathrendering.png) +- using $-math-mode: ![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_highqmathrendering.png) + +Finally the y-axis is switched to logarithmic scaling and the axis labels are set: +```c++ +// 5. set y-axis to logarithmic (x-axis would be analogous, but using `plot.get_xAxis()`) + plot.get_yAxis()->set_logAxis(true); + // now we set the number of label ticks to 9 (you give the count if minor between two majors, + // so if you want ticks for 1,2,3,...,10,20,30,...,100... you need to use 9: + plot.get_yAxis()->set_minorTicks(9); + // the minor grid is not shown by default. You can switch it on: + plot.get_yAxis()->set_drawMinorGrid(true); + // usually axis ticks are shown as numbers 0.01, 0.1, 1, 10, ... You can also force the scientific + // power-of-10 notation, using: + plot.get_yAxis()->set_labelType(JKQTPCALTexponent); + // the number of digits in JKQTPCALTexponent determines which labels are drawn in standard-notation, + // as compared to power-notation (e.g. if set to 1, the labels 0.1=10^{-1}, 1, 10 are shown in + // standard notation, the rest in power-notation. This tweak improves readability) + plot.get_yAxis()->set_labelDigits(0); + // minor tick labels are usually not displayed, but you can switch them on, using + //plot.get_yAxis()->set_minorTickLabelsEnabled(true); + // the axis font sizes can be set with: + plot.get_yAxis()->set_tickLabelFontSize(10); // axis tick labels + plot.get_yAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels + plot.get_yAxis()->set_labelFontSize(14); // axis label size + plot.get_xAxis()->set_tickLabelFontSize(10); // axis tick labels + plot.get_xAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels + plot.get_xAxis()->set_labelFontSize(14); // axis label size + // ... and finally set axis labels (using LaTeX notation and $...$ to improve rendering) + plot.get_yAxis()->set_axisLabel("Amplitude $A/A_{stat}$"); + plot.get_xAxis()->set_axisLabel("relative driving frequency $\\eta=\\omega/\\omega_0$"); +``` + +As an alternative `JKQTPCALTexponentCharacter` does not use the power-of-10 notation, but uses the usual unit-characters, e.g. 0.001=1m, 0.000001=1µ, 10000=10k, ... + +The result looks like this: + +![jkqtplotter_simpletest_logaxes](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes.png) + +Without the logarithmic scaling we would have: + +![jkqtplotter_simpletest_logaxes_nolog](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_nolog.png) + +Switching the minor grid off results in a plot like this: + +![jkqtplotter_simpletest_logaxes_nominorgrid](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_logaxes_nominorgrid.png) + +These examples show the results for different typical values for `set_minorTicks()`: + +![logaxis_set_minorticks](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/logaxis_set_minorticks.png) + +These examples show the results for different typical values for `set_labelType()`: + +![logaxis_set_labelType](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/logaxis_set_labelType.png) + + +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) diff --git a/test/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp similarity index 97% rename from test/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp rename to examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp index b7e70df300..034209730e 100644 --- a/test/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp +++ b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp @@ -1,106 +1,106 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplotter/jkqtpgraphsgeometric.h" -#include "jkqtplottertools/jkqtptools.h" - -#define sqr(x) ((x)*(x)) - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data a vector of x-values for a simple plot (resonance curve with different damping value D) - // see https://en.wikipedia.org/wiki/Resonance - QVector X; - QVector D { 0.001, 0.1, 1, 10}; - const int Ndata=500; // number of plot points in each curve - for (int i=0; iaddCopiedColumn(X, "x"); - - // 3. now we make several plots for different values of D - QVector pens {Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; - for (int id=0; id Y; - for (auto& xx: X) { - Y<<1.0/sqrt(sqr(1-sqr(xx))+sqr(2*xx*D[id])); - } - - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); - - // copy data into datastore and immediately set the yColumn - graph->set_xColumn(columnX); - graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(id))); - - // don't use symbols - graph->set_symbol(JKQTPnoSymbol); - // use one of different pens - graph->set_style(pens[id%pens.size()]); - // set width of graph line - graph->set_lineWidth(1.5); - - // graph title is made from symbol+penstyle - graph->set_title(QString("$D=\\delta/\\omega_0=%1$").arg(D[id])); - - // add the graph to the plot, so it is actually displayed - plot.addGraph(graph); - } - - // 4. Also we add a text-element in the plot to show the plotted function - // This element (JKQTPgeoText) is taken from the set of geometric elements - // and is simply parametrized by a position (1.25/10) and the text to display. - // In addition you can also set the font size (here to 15) - // Use '$...$' around the actual math string to ensure rendering with a math font - // (the internal renderer uses XITS fonts by default, which are free and auto-distributed - // and loaded in the library). If you don't use the math-mode modifiers, the default - // font of the other rendering text is used, which might not be suitable for - // high-quality math rendering. - plot.addGraph(new JKQTPgeoText(&plot, 1.25, 10, "$\\frac{A}{A_{stat}}=\\frac{1}{\\sqrt{\\left(1-\\eta^2\\right)^2+\\left(2{\\eta}D\\right)^2}}$", 15)); - - // 5. set y-axis to logarithmic (x-axis would be analogous, but using `plot.get_xAxis()`) - plot.get_yAxis()->set_logAxis(true); - // now we set the number of label ticks to 9 (you give the count if minor between two majors, - // so if you want ticks for 1,2,3,...,10,20,30,...,100... you need to use 9: - plot.get_yAxis()->set_minorTicks(9); - // the minor grid is not shown by default. You can switch it on: - plot.get_yAxis()->set_drawMinorGrid(true); - // usually axis ticks are shown as numbers 0.01, 0.1, 1, 10, ... You can also force the scientific - // power-of-10 notation, using: - plot.get_yAxis()->set_labelType(JKQTPCALTexponent); - // the number of digits in JKQTPCALTexponent determines which labels are drawn in standard-notation, - // as compared to power-notation (e.g. if set to 1, the labels 0.1=10^{-1}, 1, 10 are shown in - // standard notation, the rest in power-notation. This tweak improves readability) - plot.get_yAxis()->set_labelDigits(0); - // minor tick labels are usually not displayed, but you can switch them on, using - //plot.get_yAxis()->set_minorTickLabelsEnabled(true); - // the axis font sizes can be set with: - plot.get_yAxis()->set_tickLabelFontSize(10); // axis tick labels - plot.get_yAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels - plot.get_yAxis()->set_labelFontSize(14); // axis label size - plot.get_xAxis()->set_tickLabelFontSize(10); // axis tick labels - plot.get_xAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels - plot.get_xAxis()->set_labelFontSize(14); // axis label size - // ... and finally set axis labels (using LaTeX notation and $...$ to improve rendering) - plot.get_yAxis()->set_axisLabel("Amplitude $A/A_{stat}$"); - plot.get_xAxis()->set_axisLabel("relative driving frequency $\\eta=\\omega/\\omega_0$"); - - - // 6. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // 7. show plotter and make it a decent size - plot.show(); - plot.resize(700,500); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplotter/jkqtpgraphsgeometric.h" +#include "jkqtplottertools/jkqtptools.h" + +#define sqr(x) ((x)*(x)) + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data a vector of x-values for a simple plot (resonance curve with different damping value D) + // see https://en.wikipedia.org/wiki/Resonance + QVector X; + QVector D { 0.001, 0.1, 1, 10}; + const int Ndata=500; // number of plot points in each curve + for (int i=0; iaddCopiedColumn(X, "x"); + + // 3. now we make several plots for different values of D + QVector pens {Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; + for (int id=0; id Y; + for (auto& xx: X) { + Y<<1.0/sqrt(sqr(1-sqr(xx))+sqr(2*xx*D[id])); + } + + JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); + + // copy data into datastore and immediately set the yColumn + graph->set_xColumn(columnX); + graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(id))); + + // don't use symbols + graph->set_symbol(JKQTPnoSymbol); + // use one of different pens + graph->set_style(pens[id%pens.size()]); + // set width of graph line + graph->set_lineWidth(1.5); + + // graph title is made from symbol+penstyle + graph->set_title(QString("$D=\\delta/\\omega_0=%1$").arg(D[id])); + + // add the graph to the plot, so it is actually displayed + plot.addGraph(graph); + } + + // 4. Also we add a text-element in the plot to show the plotted function + // This element (JKQTPgeoText) is taken from the set of geometric elements + // and is simply parametrized by a position (1.25/10) and the text to display. + // In addition you can also set the font size (here to 15) + // Use '$...$' around the actual math string to ensure rendering with a math font + // (the internal renderer uses XITS fonts by default, which are free and auto-distributed + // and loaded in the library). If you don't use the math-mode modifiers, the default + // font of the other rendering text is used, which might not be suitable for + // high-quality math rendering. + plot.addGraph(new JKQTPgeoText(&plot, 1.25, 10, "$\\frac{A}{A_{stat}}=\\frac{1}{\\sqrt{\\left(1-\\eta^2\\right)^2+\\left(2{\\eta}D\\right)^2}}$", 15)); + + // 5. set y-axis to logarithmic (x-axis would be analogous, but using `plot.get_xAxis()`) + plot.get_yAxis()->set_logAxis(true); + // now we set the number of label ticks to 9 (you give the count if minor between two majors, + // so if you want ticks for 1,2,3,...,10,20,30,...,100... you need to use 9: + plot.get_yAxis()->set_minorTicks(9); + // the minor grid is not shown by default. You can switch it on: + plot.get_yAxis()->set_drawMinorGrid(true); + // usually axis ticks are shown as numbers 0.01, 0.1, 1, 10, ... You can also force the scientific + // power-of-10 notation, using: + plot.get_yAxis()->set_labelType(JKQTPCALTexponent); + // the number of digits in JKQTPCALTexponent determines which labels are drawn in standard-notation, + // as compared to power-notation (e.g. if set to 1, the labels 0.1=10^{-1}, 1, 10 are shown in + // standard notation, the rest in power-notation. This tweak improves readability) + plot.get_yAxis()->set_labelDigits(0); + // minor tick labels are usually not displayed, but you can switch them on, using + //plot.get_yAxis()->set_minorTickLabelsEnabled(true); + // the axis font sizes can be set with: + plot.get_yAxis()->set_tickLabelFontSize(10); // axis tick labels + plot.get_yAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels + plot.get_yAxis()->set_labelFontSize(14); // axis label size + plot.get_xAxis()->set_tickLabelFontSize(10); // axis tick labels + plot.get_xAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels + plot.get_xAxis()->set_labelFontSize(14); // axis label size + // ... and finally set axis labels (using LaTeX notation and $...$ to improve rendering) + plot.get_yAxis()->set_axisLabel("Amplitude $A/A_{stat}$"); + plot.get_xAxis()->set_axisLabel("relative driving frequency $\\eta=\\omega/\\omega_0$"); + + + // 6. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // 7. show plotter and make it a decent size + plot.show(); + plot.resize(700,500); + + return app.exec(); +} diff --git a/test/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro similarity index 71% rename from test/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro rename to examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro index 612163f014..6c092b6135 100644 --- a/test/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro +++ b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro @@ -1,23 +1,27 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_logaxes.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_logaxes - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_logaxes.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_logaxes + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_logaxes/jkqtplotter_simpletest_logaxes_and_lib.pro b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes_and_lib.pro similarity index 97% rename from test/simpletest_logaxes/jkqtplotter_simpletest_logaxes_and_lib.pro rename to examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes_and_lib.pro index 201ce94671..372d8ab71a 100644 --- a/test/simpletest_logaxes/jkqtplotter_simpletest_logaxes_and_lib.pro +++ b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_logaxes - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_logaxes.file=$$PWD/jkqtplotter_simpletest_logaxes.pro -jkqtplotter_simpletest_logaxes.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_logaxes + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_logaxes.file=$$PWD/jkqtplotter_simpletest_logaxes.pro +jkqtplotter_simpletest_logaxes.depends = jkqtplotterlib diff --git a/test/simpletest_parametriccurve/README.md b/examples/simpletest_parametriccurve/README.md similarity index 75% rename from test/simpletest_parametriccurve/README.md rename to examples/simpletest_parametriccurve/README.md index 950f59f28d..4e9298ea18 100644 --- a/test/simpletest_parametriccurve/README.md +++ b/examples/simpletest_parametriccurve/README.md @@ -1,64 +1,64 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Plotting Parametric Curves -This project (see `./test/simpletest_parametriccurve/`) demonstrates how to draw parametric curves, using [`JKQTPxyLineGraph`}(https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest) and [`JKQTPxyParametrizedScatterGraph`](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_paramscatterplot). - -The source code of the main application can be found in [`jkqtplotter_simpletest_parametriccurve.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp). First, the parametric curve (here a [logarithic spiral](https://en.wikipedia.org/wiki/Logarithmic_spiral)) is sampled into two columns containing the x- and y-values along the curve. In addition the radial distance from x=y=0 is added into a third column: -```c++ - QVector X, Y, R; - const int Ndata=500; // number of plot points in each curve - const double phiMax=4.0*M_PI; - const double a=1; - const double k=0.2; - for (double phi=-phiMax; phi<=phiMax; phi+=phiMax/double(Ndata)) { - const double x=a*exp(k*phi)*cos(phi); - const double y=a*exp(k*phi)*sin(phi); - X<addCopiedColumn(X, "x"); - size_t columnY=ds->addCopiedColumn(Y, "y"); - size_t columnR=ds->addCopiedColumn(R, "r"); -``` - - -Then simples graph just uses the columns X and Y to plot the curve: -```c++ - JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY); - graph1->set_drawLine(true); - graph1->set_symbol(JKQTPnoSymbol); - graph1->set_title("one-colored spiral"); - plot.addGraph(graph1); -``` - -If you use `JKQTPxyParametrizedScatterGraph` instead of `JKQTPxyLineGraph`, you can also modify the color of the line-segments, connecting the datapoints: -```c++ - JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot2); - graph2->set_xColumn(columnX); - graph2->set_yColumn(columnY); - graph2->set_colorColumn(columnR); - graph2->set_palette(JKQTPMathImageMATLAB); - graph2->set_symbol(JKQTPnoSymbol); - graph2->set_drawLine(true); - graph2->set_title("colored spiral"); - graph2->get_colorBarRightAxis()->set_axisLabel("color scale radius $r(\\phi)$"); - plot2.addGraph(graph2); -``` - -The result looks like this: - -![jkqtplotter_simpletest_parametriccurve](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_parametriccurve1.png) - -... and with the line-color set by the radius: - -![jkqtplotter_simpletest_parametriccurve](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_parametriccurve2.png) - - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Plotting Parametric Curves +This project (see `./examples/simpletest_parametriccurve/`) demonstrates how to draw parametric curves, using [`JKQTPxyLineGraph`}(https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest) and [`JKQTPxyParametrizedScatterGraph`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_paramscatterplot). + +The source code of the main application can be found in [`jkqtplotter_simpletest_parametriccurve.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp). First, the parametric curve (here a [logarithic spiral](https://en.wikipedia.org/wiki/Logarithmic_spiral)) is sampled into two columns containing the x- and y-values along the curve. In addition the radial distance from x=y=0 is added into a third column: +```c++ + QVector X, Y, R; + const int Ndata=500; // number of plot points in each curve + const double phiMax=4.0*M_PI; + const double a=1; + const double k=0.2; + for (double phi=-phiMax; phi<=phiMax; phi+=phiMax/double(Ndata)) { + const double x=a*exp(k*phi)*cos(phi); + const double y=a*exp(k*phi)*sin(phi); + X<addCopiedColumn(X, "x"); + size_t columnY=ds->addCopiedColumn(Y, "y"); + size_t columnR=ds->addCopiedColumn(R, "r"); +``` + + +Then simples graph just uses the columns X and Y to plot the curve: +```c++ + JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY); + graph1->set_drawLine(true); + graph1->set_symbol(JKQTPnoSymbol); + graph1->set_title("one-colored spiral"); + plot.addGraph(graph1); +``` + +If you use `JKQTPxyParametrizedScatterGraph` instead of `JKQTPxyLineGraph`, you can also modify the color of the line-segments, connecting the datapoints: +```c++ + JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot2); + graph2->set_xColumn(columnX); + graph2->set_yColumn(columnY); + graph2->set_colorColumn(columnR); + graph2->set_palette(JKQTPMathImageMATLAB); + graph2->set_symbol(JKQTPnoSymbol); + graph2->set_drawLine(true); + graph2->set_title("colored spiral"); + graph2->get_colorBarRightAxis()->set_axisLabel("color scale radius $r(\\phi)$"); + plot2.addGraph(graph2); +``` + +The result looks like this: + +![jkqtplotter_simpletest_parametriccurve](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_parametriccurve1.png) + +... and with the line-color set by the radius: + +![jkqtplotter_simpletest_parametriccurve](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_parametriccurve2.png) + + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp similarity index 97% rename from test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp rename to examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp index 59170a1174..298e71beb5 100644 --- a/test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp +++ b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp @@ -1,87 +1,87 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create two plotter windows that share the same internal datastore (for convenience) - JKQtPlotter plot, plot2; - JKQTPdatastore* ds=plot.getDatastore(); - plot2.useExternalDatastore(ds); - - // 2. now we create a vector of x- and y-values of the logarithmic spiral - // in addition the radius is stored in column R - QVector X, Y, R; - const int Ndata=500; // number of plot points in each curve - const double phiMax=4.0*M_PI; - const double a=1; - const double k=0.2; - for (double phi=-phiMax; phi<=phiMax; phi+=phiMax/double(Ndata)) { - const double x=a*exp(k*phi)*cos(phi); - const double y=a*exp(k*phi)*sin(phi); - X<addCopiedColumn(X, "x"); - size_t columnY=ds->addCopiedColumn(Y, "y"); - size_t columnR=ds->addCopiedColumn(R, "r"); - - - // 3. now we make several graphs. In each one, another property of the graph is controlled by - // a datacolumn - - // 3.1 the basic graph - JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY); - graph1->set_drawLine(true); - graph1->set_symbol(JKQTPnoSymbol); - graph1->set_title("one-colored spiral"); - plot.addGraph(graph1); - - // 3.2 for graph2 is the same as graph 1, but in addition, the color of the lines - // is set, based on the contents of column R, via the color-palette JKQTPMathImageMATLAB - JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot2); - graph2->set_xColumn(columnX); - graph2->set_yColumn(columnY); - graph2->set_colorColumn(columnR); - graph2->set_palette(JKQTPMathImageMATLAB); - graph2->set_symbol(JKQTPnoSymbol); - graph2->set_drawLine(true); - graph2->set_title("colored spiral"); - graph2->get_colorBarRightAxis()->set_axisLabel("color scale radius $r(\\phi)$"); - plot2.addGraph(graph2); - - - // 4. set the axis scale aspect ratios to 1, - // autoscale the plot so the graph is contained - // and format the coordinate system and key - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(1); - plot.get_xAxis()->set_axisLabel("x-axis"); - plot.get_yAxis()->set_axisLabel("y-axis"); - plot.get_xAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawGrid(false); - plot.setXY(-15,15,-15,15); - plot2.get_plotter()->set_maintainAspectRatio(true); - plot2.get_plotter()->set_aspectRatio(1); - plot2.get_xAxis()->set_axisLabel("x-axis"); - plot2.get_yAxis()->set_axisLabel("y-axis"); - plot2.get_xAxis()->set_drawGrid(false); - plot2.get_yAxis()->set_drawGrid(false); - plot2.setXY(-15,15,-15,15); - - - // 5. show plotters and make them a decent size - plot.show(); - plot.resize(600,600); - plot2.show(); - plot2.resize(600,600); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create two plotter windows that share the same internal datastore (for convenience) + JKQtPlotter plot, plot2; + JKQTPdatastore* ds=plot.getDatastore(); + plot2.useExternalDatastore(ds); + + // 2. now we create a vector of x- and y-values of the logarithmic spiral + // in addition the radius is stored in column R + QVector X, Y, R; + const int Ndata=500; // number of plot points in each curve + const double phiMax=4.0*M_PI; + const double a=1; + const double k=0.2; + for (double phi=-phiMax; phi<=phiMax; phi+=phiMax/double(Ndata)) { + const double x=a*exp(k*phi)*cos(phi); + const double y=a*exp(k*phi)*sin(phi); + X<addCopiedColumn(X, "x"); + size_t columnY=ds->addCopiedColumn(Y, "y"); + size_t columnR=ds->addCopiedColumn(R, "r"); + + + // 3. now we make several graphs. In each one, another property of the graph is controlled by + // a datacolumn + + // 3.1 the basic graph + JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY); + graph1->set_drawLine(true); + graph1->set_symbol(JKQTPnoSymbol); + graph1->set_title("one-colored spiral"); + plot.addGraph(graph1); + + // 3.2 for graph2 is the same as graph 1, but in addition, the color of the lines + // is set, based on the contents of column R, via the color-palette JKQTPMathImageMATLAB + JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot2); + graph2->set_xColumn(columnX); + graph2->set_yColumn(columnY); + graph2->set_colorColumn(columnR); + graph2->set_palette(JKQTPMathImageMATLAB); + graph2->set_symbol(JKQTPnoSymbol); + graph2->set_drawLine(true); + graph2->set_title("colored spiral"); + graph2->get_colorBarRightAxis()->set_axisLabel("color scale radius $r(\\phi)$"); + plot2.addGraph(graph2); + + + // 4. set the axis scale aspect ratios to 1, + // autoscale the plot so the graph is contained + // and format the coordinate system and key + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_aspectRatio(1); + plot.get_xAxis()->set_axisLabel("x-axis"); + plot.get_yAxis()->set_axisLabel("y-axis"); + plot.get_xAxis()->set_drawGrid(false); + plot.get_yAxis()->set_drawGrid(false); + plot.setXY(-15,15,-15,15); + plot2.get_plotter()->set_maintainAspectRatio(true); + plot2.get_plotter()->set_aspectRatio(1); + plot2.get_xAxis()->set_axisLabel("x-axis"); + plot2.get_yAxis()->set_axisLabel("y-axis"); + plot2.get_xAxis()->set_drawGrid(false); + plot2.get_yAxis()->set_drawGrid(false); + plot2.setXY(-15,15,-15,15); + + + // 5. show plotters and make them a decent size + plot.show(); + plot.resize(600,600); + plot2.show(); + plot2.resize(600,600); + + return app.exec(); +} diff --git a/test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro similarity index 73% rename from test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro rename to examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro index 384b4fc4d5..73f33fc96c 100644 --- a/test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro +++ b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro @@ -1,23 +1,27 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_parametriccurve.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_parametriccurve - - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -win32-msvc*: DEFINES += _USE_MATH_DEFINES - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_parametriccurve.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_parametriccurve + + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +win32-msvc*: DEFINES += _USE_MATH_DEFINES + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve_and_lib.pro b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve_and_lib.pro similarity index 97% rename from test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve_and_lib.pro rename to examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve_and_lib.pro index a10bf215ba..59cdd53f98 100644 --- a/test/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve_and_lib.pro +++ b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_parametriccurve - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_parametriccurve.file=$$PWD/jkqtplotter_simpletest_parametriccurve.pro -jkqtplotter_simpletest_parametriccurve.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_parametriccurve + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_parametriccurve.file=$$PWD/jkqtplotter_simpletest_parametriccurve.pro +jkqtplotter_simpletest_parametriccurve.depends = jkqtplotterlib diff --git a/test/simpletest_paramscatterplot/README.md b/examples/simpletest_paramscatterplot/README.md similarity index 88% rename from test/simpletest_paramscatterplot/README.md rename to examples/simpletest_paramscatterplot/README.md index 0c1003a44f..1a0b506c79 100644 --- a/test/simpletest_paramscatterplot/README.md +++ b/examples/simpletest_paramscatterplot/README.md @@ -1,117 +1,117 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Scatter Graph with Parametrized Symbols/Colors -This project (see `./test/simpletest_paramscatterplot/`) demonstrates the capabilities of `JKQTPxyParametrizedScatterGraph`. This graph class plots symbol&line-graphs, juts like [`JKQTPxyLineGraph`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_symbols_and_styles/) and in addition modifies several properties of each plot point by data from an additional column. These properties can be modified: -- symbol size -- symbol type -- symbol/line color -- line width - -The source code of the main application can be found in [`jkqtplotter_simpletest_paramscatterplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp). First, several datasets are generated and added to the internal datastore. the resulting datatable looks like this: - -![jkqtplotter_simpletest_paramscatterplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_paramscatterplot_datatable.png) - -Then several plots are added that modify different properties. - -The simplest case is to modify the symbol type. Simply set the property `symbolColumn` with `graph1->set_symbolColumn(columnP)` to a data column. The values in the data column will be cast to an integer and then will be translated to `JKQTPgraphSymbols`. If the numbers are larger than the available symbol types in `JKQTPgraphSymbols`, the graph will cycle through the available symbols (via a modulo-operation with the max. symbol count!). -```c++ - JKQTPxyParametrizedScatterGraph* graph1=new JKQTPxyParametrizedScatterGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY1); - graph1->set_symbolColumn(columnP); - graph1->set_drawLine(true); - graph1->set_color(QColor("blueviolet")); - graph1->set_title("1: symbol type"); - plot.addGraph(graph1); -``` - - -The next two code snippets show how to modify the size of the symbols and the line width of the lines, connecting the symbols (ensure to set `graph6->set_drawLine(true)`, because otherwise no line will be drawn). The principle is the same as above, but here you need to set the properties `sizeColumn` for the symbol size and `linewidthColumn` for the line width. All values in the line width or symbol size columns are interpreted as sizes in dtp points (pt)! -```c++ - // symbol size - JKQTPxyParametrizedScatterGraph* graph3=new JKQTPxyParametrizedScatterGraph(&plot); - graph3->set_xColumn(columnX); - graph3->set_yColumn(columnY3); - graph3->set_sizeColumn(columnS); - graph3->set_symbol(JKQTPfilledCircle); - graph3->set_drawLine(true); - graph3->set_title("3: symbol size"); - plot.addGraph(graph3); - - // line width - JKQTPxyParametrizedScatterGraph* graph6=new JKQTPxyParametrizedScatterGraph(&plot); - graph6->set_xColumn(columnX); - graph6->set_yColumn(columnY6); - graph6->set_linewidthColumn(columnLW); - graph6->set_drawLine(true); - graph6->set_symbol(JKQTPnoSymbol); - graph6->set_title("6: line width"); - plot.addGraph(graph6); -``` - - -Finally you can set the color of each symbol, based on data in the column `colorColumn`. Here two possibilities exist: First you can store the RGB(A) value for each datapoint explicitly. For this, you first need to create the data in the column, using the Qt-function [`qRgb()`](http://doc.qt.io/qt-5/qcolor.html#qRgb) or [`qRgba()`}(http://doc.qt.io/qt-5/qcolor.html#qRgba): -```c++ - QVector RGB; - const int Ndata=10; // number of plot points in each curve - for (int i=0; iaddCopiedColumn(RGB, "rgb"); -```c++ -Basically the data points in a RGB(A)-column will be interpreted by castig them to [`QRgb`](http://doc.qt.io/qt-5/qcolor.html#QRgb-typedef). - -Now you can add the graph. In order to interpret the color column as RGB(A)-values, ensure to set `graph4->set_colorColumnContainsRGB(true)`: -```c++ - JKQTPxyParametrizedScatterGraph* graph4=new JKQTPxyParametrizedScatterGraph(&plot); - graph4->set_xColumn(columnX); - graph4->set_yColumn(columnY4); - graph4->set_colorColumn(columnRGB); - graph4->set_colorColumnContainsRGB(true); - graph4->set_drawLine(true); - graph4->set_symbol(JKQTPfilledDownTriangle); - graph4->set_title("4: RGB-color"); - plot.addGraph(graph4); -``` - -The second variant for setting the color of each datapoint is by mapping the values in the column to a color palette (`JKQTPMathImageRYGB` in this example). For this you simply need to define the color coumn and the palette to use. By default, the color palette spans the full range of values in `colorColumn`: -```c++ - JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot); - graph2->set_xColumn(columnX); - graph2->set_yColumn(columnY2); - graph2->set_colorColumn(columnC); - graph2->set_palette(JKQTPMathImageRYGB); - graph2->set_symbol(JKQTPfilledRect); - graph2->set_drawLine(true); - graph2->set_title("2: color"); - graph2->get_colorBarRightAxis()->set_axisLabel("color scale for graph2"); - plot.addGraph(graph2); -``` -Note: If you want to set the range manually, use `ste_imageMin()` and `set_imageMax()` after setting `set_autoImageRange(false)`. - - -Note also that it is possible to combine any of parametrizations above in a single graph, by setting two or more columns: -```c++ - JKQTPxyParametrizedScatterGraph* graph5=new JKQTPxyParametrizedScatterGraph(&plot); - graph5->set_xColumn(columnX); - graph5->set_yColumn(columnY5); - graph5->set_colorColumn(columnC); - graph5->set_sizeColumn(columnS); - graph5->set_palette(JKQTPMathImageBLUEYELLOW); - graph5->set_drawLine(true); - graph5->set_title("5: color+size"); - graph5->get_colorBarRightAxis()->set_axisLabel("color scale for graph5"); - plot.addGraph(graph5); -``` - - -The full test appication combines all these variants and the result looks like this: - -![jkqtplotter_simpletest_paramscatterplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_paramscatterplot.png) - - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Scatter Graph with Parametrized Symbols/Colors +This project (see `./examples/simpletest_paramscatterplot/`) demonstrates the capabilities of `JKQTPxyParametrizedScatterGraph`. This graph class plots symbol&line-graphs, juts like [`JKQTPxyLineGraph`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_symbols_and_styles/) and in addition modifies several properties of each plot point by data from an additional column. These properties can be modified: +- symbol size +- symbol type +- symbol/line color +- line width + +The source code of the main application can be found in [`jkqtplotter_simpletest_paramscatterplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp). First, several datasets are generated and added to the internal datastore. the resulting datatable looks like this: + +![jkqtplotter_simpletest_paramscatterplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_paramscatterplot_datatable.png) + +Then several plots are added that modify different properties. + +The simplest case is to modify the symbol type. Simply set the property `symbolColumn` with `graph1->set_symbolColumn(columnP)` to a data column. The values in the data column will be cast to an integer and then will be translated to `JKQTPgraphSymbols`. If the numbers are larger than the available symbol types in `JKQTPgraphSymbols`, the graph will cycle through the available symbols (via a modulo-operation with the max. symbol count!). +```c++ + JKQTPxyParametrizedScatterGraph* graph1=new JKQTPxyParametrizedScatterGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY1); + graph1->set_symbolColumn(columnP); + graph1->set_drawLine(true); + graph1->set_color(QColor("blueviolet")); + graph1->set_title("1: symbol type"); + plot.addGraph(graph1); +``` + + +The next two code snippets show how to modify the size of the symbols and the line width of the lines, connecting the symbols (ensure to set `graph6->set_drawLine(true)`, because otherwise no line will be drawn). The principle is the same as above, but here you need to set the properties `sizeColumn` for the symbol size and `linewidthColumn` for the line width. All values in the line width or symbol size columns are interpreted as sizes in dtp points (pt)! +```c++ + // symbol size + JKQTPxyParametrizedScatterGraph* graph3=new JKQTPxyParametrizedScatterGraph(&plot); + graph3->set_xColumn(columnX); + graph3->set_yColumn(columnY3); + graph3->set_sizeColumn(columnS); + graph3->set_symbol(JKQTPfilledCircle); + graph3->set_drawLine(true); + graph3->set_title("3: symbol size"); + plot.addGraph(graph3); + + // line width + JKQTPxyParametrizedScatterGraph* graph6=new JKQTPxyParametrizedScatterGraph(&plot); + graph6->set_xColumn(columnX); + graph6->set_yColumn(columnY6); + graph6->set_linewidthColumn(columnLW); + graph6->set_drawLine(true); + graph6->set_symbol(JKQTPnoSymbol); + graph6->set_title("6: line width"); + plot.addGraph(graph6); +``` + + +Finally you can set the color of each symbol, based on data in the column `colorColumn`. Here two possibilities exist: First you can store the RGB(A) value for each datapoint explicitly. For this, you first need to create the data in the column, using the Qt-function [`qRgb()`](http://doc.qt.io/qt-5/qcolor.html#qRgb) or [`qRgba()`}(http://doc.qt.io/qt-5/qcolor.html#qRgba): +```c++ + QVector RGB; + const int Ndata=10; // number of plot points in each curve + for (int i=0; iaddCopiedColumn(RGB, "rgb"); +```c++ +Basically the data points in a RGB(A)-column will be interpreted by castig them to [`QRgb`](http://doc.qt.io/qt-5/qcolor.html#QRgb-typedef). + +Now you can add the graph. In order to interpret the color column as RGB(A)-values, ensure to set `graph4->set_colorColumnContainsRGB(true)`: +```c++ + JKQTPxyParametrizedScatterGraph* graph4=new JKQTPxyParametrizedScatterGraph(&plot); + graph4->set_xColumn(columnX); + graph4->set_yColumn(columnY4); + graph4->set_colorColumn(columnRGB); + graph4->set_colorColumnContainsRGB(true); + graph4->set_drawLine(true); + graph4->set_symbol(JKQTPfilledDownTriangle); + graph4->set_title("4: RGB-color"); + plot.addGraph(graph4); +``` + +The second variant for setting the color of each datapoint is by mapping the values in the column to a color palette (`JKQTPMathImageRYGB` in this example). For this you simply need to define the color coumn and the palette to use. By default, the color palette spans the full range of values in `colorColumn`: +```c++ + JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot); + graph2->set_xColumn(columnX); + graph2->set_yColumn(columnY2); + graph2->set_colorColumn(columnC); + graph2->set_palette(JKQTPMathImageRYGB); + graph2->set_symbol(JKQTPfilledRect); + graph2->set_drawLine(true); + graph2->set_title("2: color"); + graph2->get_colorBarRightAxis()->set_axisLabel("color scale for graph2"); + plot.addGraph(graph2); +``` +Note: If you want to set the range manually, use `ste_imageMin()` and `set_imageMax()` after setting `set_autoImageRange(false)`. + + +Note also that it is possible to combine any of parametrizations above in a single graph, by setting two or more columns: +```c++ + JKQTPxyParametrizedScatterGraph* graph5=new JKQTPxyParametrizedScatterGraph(&plot); + graph5->set_xColumn(columnX); + graph5->set_yColumn(columnY5); + graph5->set_colorColumn(columnC); + graph5->set_sizeColumn(columnS); + graph5->set_palette(JKQTPMathImageBLUEYELLOW); + graph5->set_drawLine(true); + graph5->set_title("5: color+size"); + graph5->get_colorBarRightAxis()->set_axisLabel("color scale for graph5"); + plot.addGraph(graph5); +``` + + +The full test appication combines all these variants and the result looks like this: + +![jkqtplotter_simpletest_paramscatterplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_paramscatterplot.png) + + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp similarity index 97% rename from test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp rename to examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp index 747801993d..af9f861773 100644 --- a/test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp +++ b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp @@ -1,158 +1,158 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create a vector of x- and y-values for a simple plot (a sine curve) - // in addition, a vector P will hold values that will be mapped onto different plot styles - // and a vector C that will be mapped onto different colors - QVector X, Y1, Y2, Y3, Y4, Y5, Y6, Y7, P, C, S, RGB, LW; - const int Ndata=10; // number of plot points in each curve - for (int i=0; iaddCopiedColumn(X, "x"); - size_t columnY1=ds->addCopiedColumn(Y1, "y1"); - size_t columnY2=ds->addCopiedColumn(Y2, "y2"); - size_t columnY3=ds->addCopiedColumn(Y3, "y3"); - size_t columnY4=ds->addCopiedColumn(Y4, "y4"); - size_t columnY5=ds->addCopiedColumn(Y5, "y5"); - size_t columnY6=ds->addCopiedColumn(Y6, "y6"); - size_t columnY7=ds->addCopiedColumn(Y7, "y7"); - size_t columnP=ds->addCopiedColumn(P, "point_style"); - size_t columnC=ds->addCopiedColumn(C, "color_value"); - size_t columnS=ds->addCopiedColumn(S, "size"); - size_t columnLW=ds->addCopiedColumn(LW, "linewidth"); - size_t columnRGB=ds->addCopiedColumn(RGB, "rgb"); - - - // 3. now we make several graphs. In each one, another property of the graph is controlled by - // a datacolumn - - // 3.1 for graph1, we use dataset X/Y1 - // and the symbol type is choose according to the contents of column P: - JKQTPxyParametrizedScatterGraph* graph1=new JKQTPxyParametrizedScatterGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY1); - graph1->set_symbolColumn(columnP); - graph1->set_drawLine(true); - graph1->set_color(QColor("blueviolet")); - graph1->set_title("1: symbol type"); - plot.addGraph(graph1); - - // 3.2 for graph2, we use dataset X/Y2 - // and the symbol color is choose according to the contents of column C - // and the actual colors are chose from palette JKQTPMathImageRYGB: - JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot); - graph2->set_xColumn(columnX); - graph2->set_yColumn(columnY2); - graph2->set_colorColumn(columnC); - graph2->set_palette(JKQTPMathImageRYGB); - graph2->set_symbol(JKQTPfilledRect); - graph2->set_drawLine(true); - graph2->set_title("2: color"); - graph2->get_colorBarRightAxis()->set_axisLabel("color scale for graph2"); - plot.addGraph(graph2); - - // 3.3 for graph3, we use dataset X/Y3 - // and the symbol size is choose according to the contents of column S: - JKQTPxyParametrizedScatterGraph* graph3=new JKQTPxyParametrizedScatterGraph(&plot); - graph3->set_xColumn(columnX); - graph3->set_yColumn(columnY3); - graph3->set_sizeColumn(columnS); - graph3->set_symbol(JKQTPfilledCircle); - graph3->set_drawLine(true); - graph3->set_title("3: symbol size"); - plot.addGraph(graph3); - - // 3.4 for graph4, we use X/Y4 - // and the symbol color is choose according to the contents of column RGB, - // which directly contains the RGB values, as set with qRgb(): - JKQTPxyParametrizedScatterGraph* graph4=new JKQTPxyParametrizedScatterGraph(&plot); - graph4->set_xColumn(columnX); - graph4->set_yColumn(columnY4); - graph4->set_colorColumn(columnRGB); - graph4->set_colorColumnContainsRGB(true); - graph4->set_drawLine(true); - graph4->set_symbol(JKQTPfilledDownTriangle); - graph4->set_title("4: RGB-color"); - plot.addGraph(graph4); - - // 3.5 for graph2, we use dataset X/Y5 - // and the symbol color and size are choose according to the contents - // of columns C and S respectively. - // The actual colors are chose from palette JKQTPMathImageBLUEYELLOW: - JKQTPxyParametrizedScatterGraph* graph5=new JKQTPxyParametrizedScatterGraph(&plot); - graph5->set_xColumn(columnX); - graph5->set_yColumn(columnY5); - graph5->set_colorColumn(columnC); - graph5->set_sizeColumn(columnS); - graph5->set_palette(JKQTPMathImageBLUEYELLOW); - graph5->set_drawLine(true); - graph5->set_title("5: color+size"); - graph5->get_colorBarRightAxis()->set_axisLabel("color scale for graph5"); - plot.addGraph(graph5); - - // 3.6 for graph2, we use dataset X/Y6 - // and the line width is set by column LW: - JKQTPxyParametrizedScatterGraph* graph6=new JKQTPxyParametrizedScatterGraph(&plot); - graph6->set_xColumn(columnX); - graph6->set_yColumn(columnY6); - graph6->set_linewidthColumn(columnLW); - graph6->set_drawLine(true); - graph6->set_symbol(JKQTPnoSymbol); - graph6->set_title("6: line width"); - plot.addGraph(graph6); - - // 3.7 for graph2, we use dataset X/Y7 - // and the line width is set by column LW and the color from palette JKQTPMathImageBLUEYELLOW via column C: - JKQTPxyParametrizedScatterGraph* graph7=new JKQTPxyParametrizedScatterGraph(&plot); - graph7->set_xColumn(columnX); - graph7->set_yColumn(columnY7); - graph7->set_linewidthColumn(columnLW); - graph7->set_drawLine(true); - graph7->set_colorColumn(columnC); - graph7->set_palette(JKQTPMathImageBLUEYELLOW); - graph7->set_symbol(JKQTPnoSymbol); - graph7->set_colorBarRightVisible(false); - graph7->set_colorBarTopVisible(false); - graph7->set_title("7: color+line width"); - plot.addGraph(graph7); - - // 4. autoscale the plot so the graph is contained and format the coordinate system and key - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideBottomLeft); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); - plot.get_xAxis()->set_axisLabel("x-axis"); - plot.get_yAxis()->set_axisLabel("y-axis"); - plot.get_xAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawGrid(false); - plot.zoomToFit(); - - // 5. show plotter and make it a decent size - plot.show(); - plot.resize(800,600); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create a vector of x- and y-values for a simple plot (a sine curve) + // in addition, a vector P will hold values that will be mapped onto different plot styles + // and a vector C that will be mapped onto different colors + QVector X, Y1, Y2, Y3, Y4, Y5, Y6, Y7, P, C, S, RGB, LW; + const int Ndata=10; // number of plot points in each curve + for (int i=0; iaddCopiedColumn(X, "x"); + size_t columnY1=ds->addCopiedColumn(Y1, "y1"); + size_t columnY2=ds->addCopiedColumn(Y2, "y2"); + size_t columnY3=ds->addCopiedColumn(Y3, "y3"); + size_t columnY4=ds->addCopiedColumn(Y4, "y4"); + size_t columnY5=ds->addCopiedColumn(Y5, "y5"); + size_t columnY6=ds->addCopiedColumn(Y6, "y6"); + size_t columnY7=ds->addCopiedColumn(Y7, "y7"); + size_t columnP=ds->addCopiedColumn(P, "point_style"); + size_t columnC=ds->addCopiedColumn(C, "color_value"); + size_t columnS=ds->addCopiedColumn(S, "size"); + size_t columnLW=ds->addCopiedColumn(LW, "linewidth"); + size_t columnRGB=ds->addCopiedColumn(RGB, "rgb"); + + + // 3. now we make several graphs. In each one, another property of the graph is controlled by + // a datacolumn + + // 3.1 for graph1, we use dataset X/Y1 + // and the symbol type is choose according to the contents of column P: + JKQTPxyParametrizedScatterGraph* graph1=new JKQTPxyParametrizedScatterGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY1); + graph1->set_symbolColumn(columnP); + graph1->set_drawLine(true); + graph1->set_color(QColor("blueviolet")); + graph1->set_title("1: symbol type"); + plot.addGraph(graph1); + + // 3.2 for graph2, we use dataset X/Y2 + // and the symbol color is choose according to the contents of column C + // and the actual colors are chose from palette JKQTPMathImageRYGB: + JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot); + graph2->set_xColumn(columnX); + graph2->set_yColumn(columnY2); + graph2->set_colorColumn(columnC); + graph2->set_palette(JKQTPMathImageRYGB); + graph2->set_symbol(JKQTPfilledRect); + graph2->set_drawLine(true); + graph2->set_title("2: color"); + graph2->get_colorBarRightAxis()->set_axisLabel("color scale for graph2"); + plot.addGraph(graph2); + + // 3.3 for graph3, we use dataset X/Y3 + // and the symbol size is choose according to the contents of column S: + JKQTPxyParametrizedScatterGraph* graph3=new JKQTPxyParametrizedScatterGraph(&plot); + graph3->set_xColumn(columnX); + graph3->set_yColumn(columnY3); + graph3->set_sizeColumn(columnS); + graph3->set_symbol(JKQTPfilledCircle); + graph3->set_drawLine(true); + graph3->set_title("3: symbol size"); + plot.addGraph(graph3); + + // 3.4 for graph4, we use X/Y4 + // and the symbol color is choose according to the contents of column RGB, + // which directly contains the RGB values, as set with qRgb(): + JKQTPxyParametrizedScatterGraph* graph4=new JKQTPxyParametrizedScatterGraph(&plot); + graph4->set_xColumn(columnX); + graph4->set_yColumn(columnY4); + graph4->set_colorColumn(columnRGB); + graph4->set_colorColumnContainsRGB(true); + graph4->set_drawLine(true); + graph4->set_symbol(JKQTPfilledDownTriangle); + graph4->set_title("4: RGB-color"); + plot.addGraph(graph4); + + // 3.5 for graph2, we use dataset X/Y5 + // and the symbol color and size are choose according to the contents + // of columns C and S respectively. + // The actual colors are chose from palette JKQTPMathImageBLUEYELLOW: + JKQTPxyParametrizedScatterGraph* graph5=new JKQTPxyParametrizedScatterGraph(&plot); + graph5->set_xColumn(columnX); + graph5->set_yColumn(columnY5); + graph5->set_colorColumn(columnC); + graph5->set_sizeColumn(columnS); + graph5->set_palette(JKQTPMathImageBLUEYELLOW); + graph5->set_drawLine(true); + graph5->set_title("5: color+size"); + graph5->get_colorBarRightAxis()->set_axisLabel("color scale for graph5"); + plot.addGraph(graph5); + + // 3.6 for graph2, we use dataset X/Y6 + // and the line width is set by column LW: + JKQTPxyParametrizedScatterGraph* graph6=new JKQTPxyParametrizedScatterGraph(&plot); + graph6->set_xColumn(columnX); + graph6->set_yColumn(columnY6); + graph6->set_linewidthColumn(columnLW); + graph6->set_drawLine(true); + graph6->set_symbol(JKQTPnoSymbol); + graph6->set_title("6: line width"); + plot.addGraph(graph6); + + // 3.7 for graph2, we use dataset X/Y7 + // and the line width is set by column LW and the color from palette JKQTPMathImageBLUEYELLOW via column C: + JKQTPxyParametrizedScatterGraph* graph7=new JKQTPxyParametrizedScatterGraph(&plot); + graph7->set_xColumn(columnX); + graph7->set_yColumn(columnY7); + graph7->set_linewidthColumn(columnLW); + graph7->set_drawLine(true); + graph7->set_colorColumn(columnC); + graph7->set_palette(JKQTPMathImageBLUEYELLOW); + graph7->set_symbol(JKQTPnoSymbol); + graph7->set_colorBarRightVisible(false); + graph7->set_colorBarTopVisible(false); + graph7->set_title("7: color+line width"); + plot.addGraph(graph7); + + // 4. autoscale the plot so the graph is contained and format the coordinate system and key + plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideBottomLeft); + plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + plot.get_xAxis()->set_axisLabel("x-axis"); + plot.get_yAxis()->set_axisLabel("y-axis"); + plot.get_xAxis()->set_drawGrid(false); + plot.get_yAxis()->set_drawGrid(false); + plot.zoomToFit(); + + // 5. show plotter and make it a decent size + plot.show(); + plot.resize(800,600); + + return app.exec(); +} diff --git a/test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro similarity index 73% rename from test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro rename to examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro index 00d799b35a..e2ef8fcde4 100644 --- a/test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro +++ b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro @@ -1,23 +1,27 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_paramscatterplot.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_paramscatterplot - - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -win32-msvc*: DEFINES += _USE_MATH_DEFINES - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_paramscatterplot.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_paramscatterplot + + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +win32-msvc*: DEFINES += _USE_MATH_DEFINES + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot_and_lib.pro b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot_and_lib.pro similarity index 97% rename from test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot_and_lib.pro rename to examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot_and_lib.pro index ede0626178..5c3d3df02f 100644 --- a/test/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot_and_lib.pro +++ b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_paramscatterplot - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_paramscatterplot.file=$$PWD/jkqtplotter_simpletest_paramscatterplot.pro -jkqtplotter_simpletest_paramscatterplot.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_paramscatterplot + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_paramscatterplot.file=$$PWD/jkqtplotter_simpletest_paramscatterplot.pro +jkqtplotter_simpletest_paramscatterplot.depends = jkqtplotterlib diff --git a/test/simpletest_paramscatterplot_image/README.md b/examples/simpletest_paramscatterplot_image/README.md similarity index 91% rename from test/simpletest_paramscatterplot_image/README.md rename to examples/simpletest_paramscatterplot_image/README.md index 5ca0f703f0..bc86a04e63 100644 --- a/test/simpletest_paramscatterplot_image/README.md +++ b/examples/simpletest_paramscatterplot_image/README.md @@ -3,7 +3,7 @@ # JKQtPlotter ## Draw an Artistic Image with a Parametrized Scatter Graph -This project (see `./test/simpletest_paramscatterplot_image/`) demonstrates the capabilities of `JKQTPxyParametrizedScatterGraph` to display parametrized scatters in a rectangular arrangement. See the test program in [`test/simpletest_paramscatterplot`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_paramscatterplot) for a basic example of the capabilities of `JKQTPxyParametrizedScatterGraph`. +This project (see `./examples/simpletest_paramscatterplot_image/`) demonstrates the capabilities of `JKQTPxyParametrizedScatterGraph` to display parametrized scatters in a rectangular arrangement. See the test program in [`test/simpletest_paramscatterplot`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_paramscatterplot) for a basic example of the capabilities of `JKQTPxyParametrizedScatterGraph`. In this example, we load an image, convert it to greyscale and store it, together with x/y-coordinate-vectors in the datastore. Then a `JKQTPxyParametrizedScatterGraph` is used to draw the image as a pointilistic artwork, where each pixel is represented by a disk. The color of the disk is chosen from a color-palette, based on the grey-value. The size of each disk is chosen from the inverse grey value. diff --git a/test/simpletest_paramscatterplot_image/example.bmp b/examples/simpletest_paramscatterplot_image/example.bmp similarity index 100% rename from test/simpletest_paramscatterplot_image/example.bmp rename to examples/simpletest_paramscatterplot_image/example.bmp diff --git a/test/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp similarity index 100% rename from test/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp rename to examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp diff --git a/test/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro similarity index 76% rename from test/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro rename to examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro index 2f72073baf..06dc25c53e 100644 --- a/test/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro +++ b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro @@ -15,8 +15,12 @@ TARGET = jkqtplotter_simpletest_paramscatterplot_image # include JKQtPlotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") win32-msvc*: DEFINES += _USE_MATH_DEFINES diff --git a/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.qrc b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.qrc similarity index 94% rename from test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.qrc rename to examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.qrc index b9ddd376c1..77429e32a2 100644 --- a/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.qrc +++ b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.qrc @@ -1,5 +1,5 @@ - - - example.bmp - - + + + example.bmp + + diff --git a/test/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image_and_lib.pro b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image_and_lib.pro similarity index 100% rename from test/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image_and_lib.pro rename to examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image_and_lib.pro diff --git a/test/simpletest_parsedfunctionplot/README.md b/examples/simpletest_parsedfunctionplot/README.md similarity index 78% rename from test/simpletest_parsedfunctionplot/README.md rename to examples/simpletest_parsedfunctionplot/README.md index 19991c4141..6f65e6eb19 100644 --- a/test/simpletest_parsedfunctionplot/README.md +++ b/examples/simpletest_parsedfunctionplot/README.md @@ -4,9 +4,9 @@ ## Plotting Parsed Mathematical Functions as Line Graphs ### Plot Function f(x) -This project (see `./test/simpletest_parsedfunctionplot/`) demonstrates how to plot mathematical functions as line graphs. The functions are defined as strings that will be evaluated with the equation parser, integrated into JKQtPlotter. +This project (see `./examples/simpletest_parsedfunctionplot/`) demonstrates how to plot mathematical functions as line graphs. The functions are defined as strings that will be evaluated with the equation parser, integrated into JKQtPlotter. -Note: See the example [Plotting Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_functionplot) if you don't want to draw parsed functions, but want to provide a C function, or C++ functor! +Note: See the example [Plotting Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_functionplot) if you don't want to draw parsed functions, but want to provide a C function, or C++ functor! Adding an evaluated funtion to a graph is very simple: ```c++ @@ -16,7 +16,7 @@ Adding an evaluated funtion to a graph is very simple: ``` As you can see a graph of the type `JKQTPxParsedFunctionLineGraph` is used, which plots a function that depends on the variable `x`. The given function is parsed and evaluated (see [`lib/jkqtplottertools/jkqtpmathparser.h`](https://github.com/jkriege2/JKQtPlotter/blob/master/lib/jkqtplottertools/jkqtpmathparser.h) for details on the features of the math parser). An intelligent drawing algorithm chooses the number of control points for drawing a smooth graph, with sufficient amount of details, by evaluating locally the slope of the function. -In the example in [`test/simpletest_parsedfunctionplot/simpletest_parsedfunctionplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_parsedfunctionplot/simpletest_parsedfunctionplot.cpp) we do not simply set a fixed function, but add a `QLineEdit` which allows to edit the function and redraws it, once ENTER is pressed: +In the example in [`test/simpletest_parsedfunctionplot/simpletest_parsedfunctionplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_parsedfunctionplot/simpletest_parsedfunctionplot.cpp) we do not simply set a fixed function, but add a `QLineEdit` which allows to edit the function and redraws it, once ENTER is pressed: ```c++ JKQtPlotter* plot=new JKQtPlotter(&mainWin); QLineEdit* edit=new QLineEdit(&mainWin); @@ -49,7 +49,7 @@ This code snippet results in a plot like this: ![jkqtplotter_simpletest_parsedfunctionplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_parsedfunctionplot.png) ### Plotting with parameters -As shown in [Plotting Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_functionplot) you can also use externally set parameters in a plot function. These parameters can be double numbers and may be set with either as an internal parameter vector, or may be read from a parameter column (as shown in the [linked example](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_functionplot)). These parameters are available as variables `p1`, `p2`, ... in the function string. Here is a small example: +As shown in [Plotting Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_functionplot) you can also use externally set parameters in a plot function. These parameters can be double numbers and may be set with either as an internal parameter vector, or may be read from a parameter column (as shown in the [linked example](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_functionplot)). These parameters are available as variables `p1`, `p2`, ... in the function string. Here is a small example: ```c++ JKQTPxParsedFunctionLineGraph* parsedFunc=new JKQTPxParsedFunctionLineGraph(plot); diff --git a/test/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp similarity index 100% rename from test/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp rename to examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp diff --git a/test/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro similarity index 74% rename from test/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro rename to examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro index 89c16689ee..fa8a67c31c 100644 --- a/test/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro +++ b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro @@ -13,8 +13,12 @@ TARGET = jkqtplotter_simpletest_parsedfunctionplot # include JKQtPlotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") win32-msvc*: DEFINES += _USE_MATH_DEFINES diff --git a/test/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot_and_lib.pro b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot_and_lib.pro similarity index 100% rename from test/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot_and_lib.pro rename to examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot_and_lib.pro diff --git a/test/simpletest_rgbimageplot_opencv/.gitignore b/examples/simpletest_rgbimageplot_opencv/.gitignore similarity index 100% rename from test/simpletest_rgbimageplot_opencv/.gitignore rename to examples/simpletest_rgbimageplot_opencv/.gitignore diff --git a/test/simpletest_rgbimageplot_opencv/README.md b/examples/simpletest_rgbimageplot_opencv/README.md similarity index 87% rename from test/simpletest_rgbimageplot_opencv/README.md rename to examples/simpletest_rgbimageplot_opencv/README.md index 8581b224cc..39c5ee98d0 100644 --- a/test/simpletest_rgbimageplot_opencv/README.md +++ b/examples/simpletest_rgbimageplot_opencv/README.md @@ -1,106 +1,106 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple RGB image plot, showing a 3-channel OpenCV cv::Mat -This project (see `./test/simpletest_imageplot_opencv/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is generated as an OpenCV cv::Mat image and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). -To copy the data a special OpenCV Interface function `JKQTPcopyCvMatToColumn()` is used, that copies the data from a cv::Mat directly into a column. - -The function `JKQTPcopyCvMatToColumn()` is available from the (non-default) header-only extension from `jkqtplotter/jkqtpopencvinterface.h`. This header provides facilities to interface JKQtPlotter with OPenCV. - -The source code of the main application is (see [`jkqtplotter_simpletest_imageplot_opencv.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp): -```c++ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpopencvinterface.h" -#include -#include - - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - - // 2. now we open a BMP-file and load it into an OpenCV cv::Mat - cv::Mat picture = cv::imread("example.bmp"); - - - - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // In this step the contents of each channel of the openCV cv::Mat is copied into a column - // of the datastore in row-major order - size_t cPictureR=JKQTPcopyCvMatToColumn(ds, picture, "R-channel", 2); - size_t cPictureG=JKQTPcopyCvMatToColumn(ds, picture, "G-channel", 1); - size_t cPictureB=JKQTPcopyCvMatToColumn(ds, picture, "B-channel", 0); - - - // 4. create a graph (JKQTPColumnRGBMathImage) with the columns created above as data - JKQTPColumnRGBMathImage* graph=new JKQTPColumnRGBMathImage(&plot); - graph->set_title(""); - // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering - graph->set_Nx(picture.cols); - graph->set_Ny(picture.rows); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(0); - graph->set_y(0); - // width and height of the image in plot-axis-coordinates - graph->set_width(picture.cols); - graph->set_height(picture.rows); - // image column with the data - graph->set_imageRColumn(cPictureR); - graph->set_imageGColumn(cPictureG); - graph->set_imageBColumn(cPictureB); - // determine min/max of each channel manually - graph->set_imageMinR(0); - graph->set_imageMaxR(255); - graph->set_imageMinG(0); - graph->set_imageMaxG(255); - graph->set_imageMinB(0); - graph->set_imageMaxB(255); - - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [pixels]"); - plot.get_yAxis()->set_axisLabel("y [pixels]"); - - // 7. fix axis aspect ratio to width/height, so pixels are square - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(double(picture.cols)/double(picture.rows)); - - // 8. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(800,600); - plot.setWindowTitle("JKQTPColumnMathImage"); - - - return app.exec(); -} - -``` -The result looks like this: - -![jkqtplotter_simpletest_imageplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_opencv.png) - -The image is upside-down, because computer images use a coordinate system with 0 at the top-left (left-handed coordinate system) and the JKQtPlotter has its 0 at the bottom-left (right-handed coordinate system). - -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple RGB image plot, showing a 3-channel OpenCV cv::Mat +This project (see `./examples/simpletest_imageplot_opencv/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is generated as an OpenCV cv::Mat image and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). +To copy the data a special OpenCV Interface function `JKQTPcopyCvMatToColumn()` is used, that copies the data from a cv::Mat directly into a column. + +The function `JKQTPcopyCvMatToColumn()` is available from the (non-default) header-only extension from `jkqtplotter/jkqtpopencvinterface.h`. This header provides facilities to interface JKQtPlotter with OPenCV. + +The source code of the main application is (see [`jkqtplotter_simpletest_imageplot_opencv.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp): +```c++ +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpopencvinterface.h" +#include +#include + + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + + // 2. now we open a BMP-file and load it into an OpenCV cv::Mat + cv::Mat picture = cv::imread("example.bmp"); + + + + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // In this step the contents of each channel of the openCV cv::Mat is copied into a column + // of the datastore in row-major order + size_t cPictureR=JKQTPcopyCvMatToColumn(ds, picture, "R-channel", 2); + size_t cPictureG=JKQTPcopyCvMatToColumn(ds, picture, "G-channel", 1); + size_t cPictureB=JKQTPcopyCvMatToColumn(ds, picture, "B-channel", 0); + + + // 4. create a graph (JKQTPColumnRGBMathImage) with the columns created above as data + JKQTPColumnRGBMathImage* graph=new JKQTPColumnRGBMathImage(&plot); + graph->set_title(""); + // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering + graph->set_Nx(picture.cols); + graph->set_Ny(picture.rows); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(0); + graph->set_y(0); + // width and height of the image in plot-axis-coordinates + graph->set_width(picture.cols); + graph->set_height(picture.rows); + // image column with the data + graph->set_imageRColumn(cPictureR); + graph->set_imageGColumn(cPictureG); + graph->set_imageBColumn(cPictureB); + // determine min/max of each channel manually + graph->set_imageMinR(0); + graph->set_imageMaxR(255); + graph->set_imageMinG(0); + graph->set_imageMaxG(255); + graph->set_imageMinB(0); + graph->set_imageMaxB(255); + + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("x [pixels]"); + plot.get_yAxis()->set_axisLabel("y [pixels]"); + + // 7. fix axis aspect ratio to width/height, so pixels are square + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_aspectRatio(double(picture.cols)/double(picture.rows)); + + // 8. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(800,600); + plot.setWindowTitle("JKQTPColumnMathImage"); + + + return app.exec(); +} + +``` +The result looks like this: + +![jkqtplotter_simpletest_imageplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_opencv.png) + +The image is upside-down, because computer images use a coordinate system with 0 at the top-left (left-handed coordinate system) and the JKQtPlotter has its 0 at the bottom-left (right-handed coordinate system). + +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) diff --git a/test/simpletest_rgbimageplot_opencv/example.bmp b/examples/simpletest_rgbimageplot_opencv/example.bmp similarity index 100% rename from test/simpletest_rgbimageplot_opencv/example.bmp rename to examples/simpletest_rgbimageplot_opencv/example.bmp diff --git a/test/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp similarity index 97% rename from test/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp rename to examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp index 31f0beff80..d23c50a3a2 100644 --- a/test/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp +++ b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp @@ -1,85 +1,85 @@ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplotter/jkqtpgraphsimage.h" -#include "jkqtplotter/jkqtpopencvinterface.h" -#include - - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - - // 2. now we open a BMP-file and load it into an OpenCV cv::Mat - cv::Mat picture = cv::imread("example.bmp"); - - - - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // In this step the contents of each channel of the openCV cv::Mat is copied into a column - // of the datastore in row-major order - size_t cPictureR=JKQTPcopyCvMatToColumn(ds, picture, "R-channel", 2); - size_t cPictureG=JKQTPcopyCvMatToColumn(ds, picture, "G-channel", 1); - size_t cPictureB=JKQTPcopyCvMatToColumn(ds, picture, "B-channel", 0); - - - // 4. create a graph (JKQTPColumnRGBMathImage) with the columns created above as data - JKQTPColumnRGBMathImage* graph=new JKQTPColumnRGBMathImage(&plot); - graph->set_title(""); - // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering - graph->set_Nx(picture.cols); - graph->set_Ny(picture.rows); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(0); - graph->set_y(0); - // width and height of the image in plot-axis-coordinates - graph->set_width(picture.cols); - graph->set_height(picture.rows); - // image column with the data - graph->set_imageRColumn(cPictureR); - graph->set_imageGColumn(cPictureG); - graph->set_imageBColumn(cPictureB); - // determine min/max of each channel manually - graph->set_imageMinR(0); - graph->set_imageMaxR(255); - graph->set_imageMinG(0); - graph->set_imageMaxG(255); - graph->set_imageMinB(0); - graph->set_imageMaxB(255); - - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [pixels]"); - plot.get_yAxis()->set_axisLabel("y [pixels]"); - - // 7. fix axis aspect ratio to width/height, so pixels are square - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(double(picture.cols)/double(picture.rows)); - - // 8. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(800,600); - plot.setWindowTitle("JKQTPColumnMathImage"); - - - return app.exec(); -} +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplotter/jkqtpgraphsimage.h" +#include "jkqtplotter/jkqtpopencvinterface.h" +#include + + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + + // 2. now we open a BMP-file and load it into an OpenCV cv::Mat + cv::Mat picture = cv::imread("example.bmp"); + + + + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // In this step the contents of each channel of the openCV cv::Mat is copied into a column + // of the datastore in row-major order + size_t cPictureR=JKQTPcopyCvMatToColumn(ds, picture, "R-channel", 2); + size_t cPictureG=JKQTPcopyCvMatToColumn(ds, picture, "G-channel", 1); + size_t cPictureB=JKQTPcopyCvMatToColumn(ds, picture, "B-channel", 0); + + + // 4. create a graph (JKQTPColumnRGBMathImage) with the columns created above as data + JKQTPColumnRGBMathImage* graph=new JKQTPColumnRGBMathImage(&plot); + graph->set_title(""); + // set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering + graph->set_Nx(picture.cols); + graph->set_Ny(picture.rows); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(0); + graph->set_y(0); + // width and height of the image in plot-axis-coordinates + graph->set_width(picture.cols); + graph->set_height(picture.rows); + // image column with the data + graph->set_imageRColumn(cPictureR); + graph->set_imageGColumn(cPictureG); + graph->set_imageBColumn(cPictureB); + // determine min/max of each channel manually + graph->set_imageMinR(0); + graph->set_imageMaxR(255); + graph->set_imageMinG(0); + graph->set_imageMaxG(255); + graph->set_imageMinB(0); + graph->set_imageMaxB(255); + + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("x [pixels]"); + plot.get_yAxis()->set_axisLabel("y [pixels]"); + + // 7. fix axis aspect ratio to width/height, so pixels are square + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_aspectRatio(double(picture.cols)/double(picture.rows)); + + // 8. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(800,600); + plot.setWindowTitle("JKQTPColumnMathImage"); + + + return app.exec(); +} diff --git a/test/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro similarity index 77% rename from test/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro rename to examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro index 49943a6651..8ff29d874b 100644 --- a/test/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro +++ b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro @@ -1,26 +1,30 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_rgbimageplot_opencv.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_rgbimageplot_opencv - -# add OpenCV-interface to JKQTPdatastore -DEFINES += JKQTPLOTTER_OPENCV_INTERFACE - -# include JKQtPlotter source code -include(../../lib/jkqtplotter.pri) - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER - - -# link agains OpenCV-3.4.1 -INCLUDEPATH += $$PWD/OpenCV-3.4.1/include/ -LIBS += -L$$PWD/OpenCV-3.4.1/bin/ -llibopencv_core341 -llibopencv_imgcodecs341 +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_rgbimageplot_opencv.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_rgbimageplot_opencv + +# add OpenCV-interface to JKQTPdatastore +DEFINES += JKQTPLOTTER_OPENCV_INTERFACE + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER + + +# link agains OpenCV-3.4.1 +INCLUDEPATH += $$PWD/OpenCV-3.4.1/include/ +LIBS += -L$$PWD/OpenCV-3.4.1/bin/ -llibopencv_core341 -llibopencv_imgcodecs341 + +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") \ No newline at end of file diff --git a/test/simpletest_rgbimageplot_qt/README.md b/examples/simpletest_rgbimageplot_qt/README.md similarity index 79% rename from test/simpletest_rgbimageplot_qt/README.md rename to examples/simpletest_rgbimageplot_qt/README.md index 4a4ca4ab9a..5e39921ad0 100644 --- a/test/simpletest_rgbimageplot_qt/README.md +++ b/examples/simpletest_rgbimageplot_qt/README.md @@ -1,35 +1,35 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## `QImage` as a Graph -This project (see `./test/simpletest_rgbimageplot_qt/`) simply creates a JKQtPlotter widget (as a new window) and adds an image plot with an image taken from a [QImage](http://doc.qt.io/qt-5/qimage.html) object. - -The source code of the main application is (see [`jkqtplotter_simpletest_rgbimageplot_qt.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp). the main parts are: -```c++ - // 2. now we open a BMP-file and load it into an OpenCV cv::Mat - QImage image(":/example.bmp"); - - // 3. create a graph (JKQTPImage) with a pointer to the QImage-object, generated above - JKQTPImage* graph=new JKQTPImage(&plot); - graph->set_title(""); - // copy the image into the graph (optionally you could also give a pointer to a QImage, - // but then you need to ensure that the QImage is available as long as the JKQTPImage - // instace lives) - graph->set_image(image); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(0); - graph->set_y(0); - // width/height of the image in plot coordinates - graph->set_width(image.width()); - graph->set_height(image.height()); - - // 4. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); -``` -The result looks like this: - -![jkqtplotter_simpletest_imageplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_qt.png) - - -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## `QImage` as a Graph +This project (see `./examples/simpletest_rgbimageplot_qt/`) simply creates a JKQtPlotter widget (as a new window) and adds an image plot with an image taken from a [QImage](http://doc.qt.io/qt-5/qimage.html) object. + +The source code of the main application is (see [`jkqtplotter_simpletest_rgbimageplot_qt.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp). the main parts are: +```c++ + // 2. now we open a BMP-file and load it into an OpenCV cv::Mat + QImage image(":/example.bmp"); + + // 3. create a graph (JKQTPImage) with a pointer to the QImage-object, generated above + JKQTPImage* graph=new JKQTPImage(&plot); + graph->set_title(""); + // copy the image into the graph (optionally you could also give a pointer to a QImage, + // but then you need to ensure that the QImage is available as long as the JKQTPImage + // instace lives) + graph->set_image(image); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(0); + graph->set_y(0); + // width/height of the image in plot coordinates + graph->set_width(image.width()); + graph->set_height(image.height()); + + // 4. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); +``` +The result looks like this: + +![jkqtplotter_simpletest_imageplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_qt.png) + + +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) diff --git a/test/simpletest_rgbimageplot_qt/example.bmp b/examples/simpletest_rgbimageplot_qt/example.bmp similarity index 100% rename from test/simpletest_rgbimageplot_qt/example.bmp rename to examples/simpletest_rgbimageplot_qt/example.bmp diff --git a/test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp similarity index 97% rename from test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp rename to examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp index 935c08d7a2..23ddfce1c1 100644 --- a/test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp +++ b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp @@ -1,63 +1,63 @@ -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplotter/jkqtpgraphsimage.h" - - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plot; - - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - - - // 2. now we open a BMP-file and load it into an OpenCV cv::Mat - QImage image(":/example.bmp"); - - - // 3. create a graph (JKQTPImage) with a pointer to the QImage-object, generated above - JKQTPImage* graph=new JKQTPImage(&plot); - graph->set_title(""); - // copy the image into the graph (optionally you could also give a pointer to a QImage, - // but then you need to ensure that the QImage is available as long as the JKQTPImage - // instace lives) - graph->set_image(image); - // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) - graph->set_x(0); - graph->set_y(0); - // width/height of the image in plot coordinates - graph->set_width(image.width()); - graph->set_height(image.height()); - - - - // 4. add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - - // 5. set axis labels - plot.get_xAxis()->set_axisLabel("x [pixels]"); - plot.get_yAxis()->set_axisLabel("y [pixels]"); - - // 6. fix axis aspect ratio to width/height, so pixels are square - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(double(image.width())/double(image.height())); - - // 7. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // 8. show plotter and make it a decent size - plot.show(); - plot.resize(800,600); - plot.setWindowTitle("JKQTPImage"); - - - return app.exec(); -} +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplotter/jkqtpgraphsimage.h" + + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plot; + + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + + + // 2. now we open a BMP-file and load it into an OpenCV cv::Mat + QImage image(":/example.bmp"); + + + // 3. create a graph (JKQTPImage) with a pointer to the QImage-object, generated above + JKQTPImage* graph=new JKQTPImage(&plot); + graph->set_title(""); + // copy the image into the graph (optionally you could also give a pointer to a QImage, + // but then you need to ensure that the QImage is available as long as the JKQTPImage + // instace lives) + graph->set_image(image); + // where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner) + graph->set_x(0); + graph->set_y(0); + // width/height of the image in plot coordinates + graph->set_width(image.width()); + graph->set_height(image.height()); + + + + // 4. add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + + // 5. set axis labels + plot.get_xAxis()->set_axisLabel("x [pixels]"); + plot.get_yAxis()->set_axisLabel("y [pixels]"); + + // 6. fix axis aspect ratio to width/height, so pixels are square + plot.get_plotter()->set_maintainAspectRatio(true); + plot.get_plotter()->set_aspectRatio(double(image.width())/double(image.height())); + + // 7. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // 8. show plotter and make it a decent size + plot.show(); + plot.resize(800,600); + plot.setWindowTitle("JKQTPImage"); + + + return app.exec(); +} diff --git a/test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro similarity index 74% rename from test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro rename to examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro index 352cc4d8b8..9b74f1900d 100644 --- a/test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro +++ b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro @@ -1,23 +1,27 @@ -# source code for this simple demo -SOURCES += jkqtplotter_simpletest_rgbimageplot_qt.cpp - -RESOURCES += jkqtplotter_simpletest_rgbimageplot_qt.qrc - - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_rgbimageplot_qt - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES += jkqtplotter_simpletest_rgbimageplot_qt.cpp + +RESOURCES += jkqtplotter_simpletest_rgbimageplot_qt.qrc + + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_rgbimageplot_qt + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.qrc b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.qrc similarity index 94% rename from test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.qrc rename to examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.qrc index b9ddd376c1..77429e32a2 100644 --- a/test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.qrc +++ b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.qrc @@ -1,5 +1,5 @@ - - - example.bmp - - + + + example.bmp + + diff --git a/test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt_and_lib.pro b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt_and_lib.pro similarity index 97% rename from test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt_and_lib.pro rename to examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt_and_lib.pro index 9f56bb9f7e..179140e174 100644 --- a/test/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt_and_lib.pro +++ b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_rgbimageplot_qt - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_rgbimageplot_qt.file=$$PWD/jkqtplotter_simpletest_rgbimageplot_qt.pro -jkqtplotter_simpletest_rgbimageplot_qt.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_rgbimageplot_qt + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_rgbimageplot_qt.file=$$PWD/jkqtplotter_simpletest_rgbimageplot_qt.pro +jkqtplotter_simpletest_rgbimageplot_qt.depends = jkqtplotterlib diff --git a/test/simpletest_speed/README.md b/examples/simpletest_speed/README.md similarity index 95% rename from test/simpletest_speed/README.md rename to examples/simpletest_speed/README.md index 46ca6c7061..58e26bc736 100644 --- a/test/simpletest_speed/README.md +++ b/examples/simpletest_speed/README.md @@ -1,87 +1,87 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple line-graph with live-data (speed test) -This project (see `./test/simpletest_speed/`) simply creates a JKQtPlotter widget (as a new window) and adds two line-graph (a sine and a cosine wave). -Data is stored in two [`std::array`](https://en.cppreference.com/w/cpp/container/array) objects (`X`, `Y`, and `Y2`) and the data is added as external pointer to the datastore: -```c++ - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // Here the data from the std::array's is not copied, but only the pointer to - // the array is added to the datastore. therefore the datastore does not manage - // the memory, oly uses the data stored in it! - JKQTPdatastore* ds=getDatastore(); - size_t columnX=ds->addColumn(X.data(), X.size(), "x"); - size_t columnY=ds->addColumn(Y.data(), Y.size(), "y"); - size_t columnY2=ds->addColumn(Y2.data(), Y2.size(), "y2"); -``` -The datastore then uses the data from the `std::array` instances, but does not own their memory, i.e. also does not free it. This is useful, when data fro external sources should be used without copying. - -For this example we also don't use axis autoscaling, but set the axes explicitly: -```c++ - // 6. scale the plot so the graph is contained - setX(X[0], X[NDATA-1]); - setY(-2,2); -``` - -Finally a slot is started with a one-shot timer. In that slot, the data is shifted one place to the left and the graph is updated. The slot also calculated the current framerate and displays it in the window title. Finally a single-shot timer with 1ms delay is used to call the slot again (i.e. continuously): -```c++ -void SpeedTestPlot::plotNewData() -{ - // move old data to the left - for (size_t i=0; i(std::rand())/static_cast(RAND_MAX + 1u)-0.5; - Y2[NDATA-1]=cos(X[NDATA-1])+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; - - // set new x-range and replot - setX(X[0], X[NDATA-1]); - update_plot(); - - // calculate and update FPS-rate in window title - auto tlastalst=t_lastplot; - t_lastplot=std::chrono::system_clock::now(); - double delta_secs=static_cast(std::chrono::duration_cast(t_lastplot-tlastalst).count())/1000.0; - setWindowTitle(QString("Live Data Speed Test: %2 datapoint, %1 fps").arg(1/delta_secs).arg(NDATA)); - // enqueue call for next data value - QTimer::singleShot(1, this, SLOT(plotNewData())); -} -``` - -The result looks like this: - -![jkqtplotter_simpletest_speed1](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_speed.png) - -There are different facor affecting the replot speed: -1. *Anti-Aliasing:* If `JKQtPlotter` uses Anti-Aliasing for plotting, the plots are much nicer, but also about a factor of 3-4 slower. This is due to the increased amount of calculations, necessary in the drawing sub-system of Qt. - You can configrue anti-aliasing with these calls: - ```c++ - plot.get_plotter()->set_useAntiAliasingForGraphs(false); - plot.get_plotter()->set_useAntiAliasingForSystem(false); - plot.get_plotter()->set_useAntiAliasingForText(false); - ``` -2. *Number of Graphs:* The number of plots (and also ther type and complexity) is a major imapct factor in the plotting speed. You can switch off a plot with the context menu:
![contextmenu_graph_visibility](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/contextmenu_graph_visibility.png) -3. *Axis Scales and Plot Appearance:* Replotting is done in two steps: First the plot with the axes, labels etc. is drawn. Then the graphs are draw on top. Therefore a replot is faster, if only the graphs change, because the background (plot) does not have to be replotted. - - -the next table summarizes some results for plotting speed under different conditions, obatined with the test program in this directory (conditions: Qt 5.11, 32-bit, MinGW, Release, Phenom II X4 765, 500 data points): - -| Anti-Aliasing | X-Axis Redraw | # Graphs | frame rate [fps] | -| ---------------- | --------------- | ------------- | ---------------- | -| yes | yes | 2 | 4 | -| yes | yes | 1 | 7 | -| yes | no | 2 | 9 | -| yes | no | 1 | 16 | -| no | yes | 2 | 18 | -| no | yes | 1 | 24 | -| no | no | 2 | 32 | -| no | no | 1 | 48 | - - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple line-graph with live-data (speed test) +This project (see `./examples/simpletest_speed/`) simply creates a JKQtPlotter widget (as a new window) and adds two line-graph (a sine and a cosine wave). +Data is stored in two [`std::array`](https://en.cppreference.com/w/cpp/container/array) objects (`X`, `Y`, and `Y2`) and the data is added as external pointer to the datastore: +```c++ + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // Here the data from the std::array's is not copied, but only the pointer to + // the array is added to the datastore. therefore the datastore does not manage + // the memory, oly uses the data stored in it! + JKQTPdatastore* ds=getDatastore(); + size_t columnX=ds->addColumn(X.data(), X.size(), "x"); + size_t columnY=ds->addColumn(Y.data(), Y.size(), "y"); + size_t columnY2=ds->addColumn(Y2.data(), Y2.size(), "y2"); +``` +The datastore then uses the data from the `std::array` instances, but does not own their memory, i.e. also does not free it. This is useful, when data fro external sources should be used without copying. + +For this example we also don't use axis autoscaling, but set the axes explicitly: +```c++ + // 6. scale the plot so the graph is contained + setX(X[0], X[NDATA-1]); + setY(-2,2); +``` + +Finally a slot is started with a one-shot timer. In that slot, the data is shifted one place to the left and the graph is updated. The slot also calculated the current framerate and displays it in the window title. Finally a single-shot timer with 1ms delay is used to call the slot again (i.e. continuously): +```c++ +void SpeedTestPlot::plotNewData() +{ + // move old data to the left + for (size_t i=0; i(std::rand())/static_cast(RAND_MAX + 1u)-0.5; + Y2[NDATA-1]=cos(X[NDATA-1])+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; + + // set new x-range and replot + setX(X[0], X[NDATA-1]); + update_plot(); + + // calculate and update FPS-rate in window title + auto tlastalst=t_lastplot; + t_lastplot=std::chrono::system_clock::now(); + double delta_secs=static_cast(std::chrono::duration_cast(t_lastplot-tlastalst).count())/1000.0; + setWindowTitle(QString("Live Data Speed Test: %2 datapoint, %1 fps").arg(1/delta_secs).arg(NDATA)); + // enqueue call for next data value + QTimer::singleShot(1, this, SLOT(plotNewData())); +} +``` + +The result looks like this: + +![jkqtplotter_simpletest_speed1](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_speed.png) + +There are different facor affecting the replot speed: +1. *Anti-Aliasing:* If `JKQtPlotter` uses Anti-Aliasing for plotting, the plots are much nicer, but also about a factor of 3-4 slower. This is due to the increased amount of calculations, necessary in the drawing sub-system of Qt. + You can configrue anti-aliasing with these calls: + ```c++ + plot.get_plotter()->set_useAntiAliasingForGraphs(false); + plot.get_plotter()->set_useAntiAliasingForSystem(false); + plot.get_plotter()->set_useAntiAliasingForText(false); + ``` +2. *Number of Graphs:* The number of plots (and also ther type and complexity) is a major imapct factor in the plotting speed. You can switch off a plot with the context menu:
![contextmenu_graph_visibility](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/contextmenu_graph_visibility.png) +3. *Axis Scales and Plot Appearance:* Replotting is done in two steps: First the plot with the axes, labels etc. is drawn. Then the graphs are draw on top. Therefore a replot is faster, if only the graphs change, because the background (plot) does not have to be replotted. + + +the next table summarizes some results for plotting speed under different conditions, obatined with the test program in this directory (conditions: Qt 5.11, 32-bit, MinGW, Release, Phenom II X4 765, 500 data points): + +| Anti-Aliasing | X-Axis Redraw | # Graphs | frame rate [fps] | +| ---------------- | --------------- | ------------- | ---------------- | +| yes | yes | 2 | 4 | +| yes | yes | 1 | 7 | +| yes | no | 2 | 9 | +| yes | no | 1 | 16 | +| no | yes | 2 | 18 | +| no | yes | 1 | 24 | +| no | no | 2 | 32 | +| no | no | 1 | 48 | + + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_speed/jkqtplotter_simpletest_speed.cpp b/examples/simpletest_speed/jkqtplotter_simpletest_speed.cpp similarity index 96% rename from test/simpletest_speed/jkqtplotter_simpletest_speed.cpp rename to examples/simpletest_speed/jkqtplotter_simpletest_speed.cpp index 82ed3d89f2..938f78a7e1 100644 --- a/test/simpletest_speed/jkqtplotter_simpletest_speed.cpp +++ b/examples/simpletest_speed/jkqtplotter_simpletest_speed.cpp @@ -1,18 +1,18 @@ -#include -#include -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "speedtestplot.h" - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - SpeedTestPlot plot; - - QTimer::singleShot(500, &plot, SLOT(plotNewData())); - - return app.exec(); -} +#include +#include +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "speedtestplot.h" + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + SpeedTestPlot plot; + + QTimer::singleShot(500, &plot, SLOT(plotNewData())); + + return app.exec(); +} diff --git a/test/simpletest_speed/jkqtplotter_simpletest_speed.pro b/examples/simpletest_speed/jkqtplotter_simpletest_speed.pro similarity index 74% rename from test/simpletest_speed/jkqtplotter_simpletest_speed.pro rename to examples/simpletest_speed/jkqtplotter_simpletest_speed.pro index 695a4905ea..ef4e757862 100644 --- a/test/simpletest_speed/jkqtplotter_simpletest_speed.pro +++ b/examples/simpletest_speed/jkqtplotter_simpletest_speed.pro @@ -1,23 +1,27 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_speed.cpp speedtestplot.cpp -HEADERS = speedtestplot.h - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_speed - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -win32-msvc*: DEFINES += _USE_MATH_DEFINES - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_speed.cpp speedtestplot.cpp +HEADERS = speedtestplot.h + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_speed + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +win32-msvc*: DEFINES += _USE_MATH_DEFINES + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_speed/jkqtplotter_simpletest_speed_and_lib.pro b/examples/simpletest_speed/jkqtplotter_simpletest_speed_and_lib.pro similarity index 96% rename from test/simpletest_speed/jkqtplotter_simpletest_speed_and_lib.pro rename to examples/simpletest_speed/jkqtplotter_simpletest_speed_and_lib.pro index 68ca332d84..b2654ff9d5 100644 --- a/test/simpletest_speed/jkqtplotter_simpletest_speed_and_lib.pro +++ b/examples/simpletest_speed/jkqtplotter_simpletest_speed_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_speed - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_speed.file=$$PWD/jkqtplotter_simpletest_speed.pro -jkqtplotter_simpletest_speed.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_speed + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_speed.file=$$PWD/jkqtplotter_simpletest_speed.pro +jkqtplotter_simpletest_speed.depends = jkqtplotterlib diff --git a/test/simpletest_speed/speedtestplot.cpp b/examples/simpletest_speed/speedtestplot.cpp similarity index 97% rename from test/simpletest_speed/speedtestplot.cpp rename to examples/simpletest_speed/speedtestplot.cpp index daefa3ddc3..ae005d3b80 100644 --- a/test/simpletest_speed/speedtestplot.cpp +++ b/examples/simpletest_speed/speedtestplot.cpp @@ -1,98 +1,98 @@ -#include "speedtestplot.h" -#include "jkqtplotter/jkqtpgraphs.h" - - -SpeedTestPlot::SpeedTestPlot(): - JKQtPlotter(), dx(1.0/double(NDATA)*4.0*M_PI), x0(0) - -{ - // 1. optimize JKQtPlotter for speed (by switching off anti-aliasing) - get_plotter()->set_useAntiAliasingForGraphs(false); - get_plotter()->set_useAntiAliasingForSystem(false); - get_plotter()->set_useAntiAliasingForText(false); - - - // 2. now we create data for a simple plot (a sine curve + random[-0.5,0.5]) - for (size_t i=0; i(i)*dx; - X[i]=x0+x; - Y[i]=sin(x)+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; - Y2[i]=cos(x)+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; - } - - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // Here the data from the std::array's is not copied, but only the pointer to - // the array is added to the datastore. therefore the datastore does not manage - // the memory, oly uses the data stored in it! - JKQTPdatastore* ds=getDatastore(); - size_t columnX=ds->addColumn(X.data(), X.size(), "x"); - size_t columnY=ds->addColumn(Y.data(), Y.size(), "y"); - size_t columnY2=ds->addColumn(Y2.data(), Y2.size(), "y2"); - - // 4. create two graphs in the plot, which plots the dataset X/Y: - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(this); - graph->set_xColumn(columnX); - graph->set_yColumn(columnY); - graph->set_title(QObject::tr("live sin() graph")); - graph->set_lineWidth(1); - addGraph(graph); - - JKQTPxyLineGraph* graph2=new JKQTPxyLineGraph(this); - graph2->set_xColumn(columnX); - graph2->set_yColumn(columnY2); - graph2->set_title(QObject::tr("live cos() graph")); - graph2->set_lineWidth(1); - addGraph(graph2); - - // 6. scale the plot so the graph is contained - setX(X[0], X[NDATA-1]); - setY(-2,2); - - // show plotter and make it a decent size - show(); - resize(1000,500); -} - -SpeedTestPlot::~SpeedTestPlot() -{ - -} - -void SpeedTestPlot::plotNewData() -{ - // move old data to the left - for (size_t i=0; i(std::rand())/static_cast(RAND_MAX + 1u)-0.5; - Y2[NDATA-1]=cos(X[NDATA-1])+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; - - /* - // ALTERNATIVE: MOVE data, but keep x-axis range - x0+=dx; - for (size_t i=0; i(std::rand())/static_cast(RAND_MAX + 1u)-0.5; - Y2[NDATA-1]=cos(X[NDATA-1]+x0)+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; - */ - - - // set new x-range and replot - setX(X[0], X[NDATA-1]); - update_plot(); - - // calculate and update FPS-rate in window title - auto tlastalst=t_lastplot; - t_lastplot=std::chrono::system_clock::now(); - double delta_secs=static_cast(std::chrono::duration_cast(t_lastplot-tlastalst).count())/1000.0; - setWindowTitle(QString("Live Data Speed Test: %2 datapoint, %1 fps").arg(1/delta_secs).arg(NDATA)); - // enqueue call for next data value - QTimer::singleShot(1, this, SLOT(plotNewData())); -} +#include "speedtestplot.h" +#include "jkqtplotter/jkqtpgraphs.h" + + +SpeedTestPlot::SpeedTestPlot(): + JKQtPlotter(), dx(1.0/double(NDATA)*4.0*M_PI), x0(0) + +{ + // 1. optimize JKQtPlotter for speed (by switching off anti-aliasing) + get_plotter()->set_useAntiAliasingForGraphs(false); + get_plotter()->set_useAntiAliasingForSystem(false); + get_plotter()->set_useAntiAliasingForText(false); + + + // 2. now we create data for a simple plot (a sine curve + random[-0.5,0.5]) + for (size_t i=0; i(i)*dx; + X[i]=x0+x; + Y[i]=sin(x)+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; + Y2[i]=cos(x)+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; + } + + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // Here the data from the std::array's is not copied, but only the pointer to + // the array is added to the datastore. therefore the datastore does not manage + // the memory, oly uses the data stored in it! + JKQTPdatastore* ds=getDatastore(); + size_t columnX=ds->addColumn(X.data(), X.size(), "x"); + size_t columnY=ds->addColumn(Y.data(), Y.size(), "y"); + size_t columnY2=ds->addColumn(Y2.data(), Y2.size(), "y2"); + + // 4. create two graphs in the plot, which plots the dataset X/Y: + JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(this); + graph->set_xColumn(columnX); + graph->set_yColumn(columnY); + graph->set_title(QObject::tr("live sin() graph")); + graph->set_lineWidth(1); + addGraph(graph); + + JKQTPxyLineGraph* graph2=new JKQTPxyLineGraph(this); + graph2->set_xColumn(columnX); + graph2->set_yColumn(columnY2); + graph2->set_title(QObject::tr("live cos() graph")); + graph2->set_lineWidth(1); + addGraph(graph2); + + // 6. scale the plot so the graph is contained + setX(X[0], X[NDATA-1]); + setY(-2,2); + + // show plotter and make it a decent size + show(); + resize(1000,500); +} + +SpeedTestPlot::~SpeedTestPlot() +{ + +} + +void SpeedTestPlot::plotNewData() +{ + // move old data to the left + for (size_t i=0; i(std::rand())/static_cast(RAND_MAX + 1u)-0.5; + Y2[NDATA-1]=cos(X[NDATA-1])+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; + + /* + // ALTERNATIVE: MOVE data, but keep x-axis range + x0+=dx; + for (size_t i=0; i(std::rand())/static_cast(RAND_MAX + 1u)-0.5; + Y2[NDATA-1]=cos(X[NDATA-1]+x0)+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; + */ + + + // set new x-range and replot + setX(X[0], X[NDATA-1]); + update_plot(); + + // calculate and update FPS-rate in window title + auto tlastalst=t_lastplot; + t_lastplot=std::chrono::system_clock::now(); + double delta_secs=static_cast(std::chrono::duration_cast(t_lastplot-tlastalst).count())/1000.0; + setWindowTitle(QString("Live Data Speed Test: %2 datapoint, %1 fps").arg(1/delta_secs).arg(NDATA)); + // enqueue call for next data value + QTimer::singleShot(1, this, SLOT(plotNewData())); +} diff --git a/test/simpletest_speed/speedtestplot.h b/examples/simpletest_speed/speedtestplot.h similarity index 95% rename from test/simpletest_speed/speedtestplot.h rename to examples/simpletest_speed/speedtestplot.h index 2aabc0075b..ef8cb80de3 100644 --- a/test/simpletest_speed/speedtestplot.h +++ b/examples/simpletest_speed/speedtestplot.h @@ -1,24 +1,24 @@ -#pragma once -#include -#include -#include - -#include "jkqtplotter/jkqtplotter.h" - - -#define NDATA 500 - -class SpeedTestPlot: public JKQtPlotter { - Q_OBJECT - protected: - std::array X, Y, Y2; - const double dx; - double x0; - std::chrono::system_clock::time_point t_lastplot; - public: - SpeedTestPlot(); - - virtual ~SpeedTestPlot(); - public slots: - void plotNewData(); -}; +#pragma once +#include +#include +#include + +#include "jkqtplotter/jkqtplotter.h" + + +#define NDATA 500 + +class SpeedTestPlot: public JKQtPlotter { + Q_OBJECT + protected: + std::array X, Y, Y2; + const double dx; + double x0; + std::chrono::system_clock::time_point t_lastplot; + public: + SpeedTestPlot(); + + virtual ~SpeedTestPlot(); + public slots: + void plotNewData(); +}; diff --git a/test/simpletest_stackedbars/README.md b/examples/simpletest_stackedbars/README.md similarity index 94% rename from test/simpletest_stackedbars/README.md rename to examples/simpletest_stackedbars/README.md index 48b9da5fcd..42c9eef3eb 100644 --- a/test/simpletest_stackedbars/README.md +++ b/examples/simpletest_stackedbars/README.md @@ -1,116 +1,116 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple stacked barchart -This project (see `./test/simpletest_stackedbars/`) simply creates a JKQtPlotter widget (as a new window) and adds several stacked barcharts. - -The soruce code of the main application is (see [`jkqtplotter_simpletest_stackedbars.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp): -```c++ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphsbarchart.h" - -#define Ndata 5 -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - QVector year, percentage_other, percentage_coaloil, percentage_gas, percentage_nuclear, percentage_green; - year << 1990 << 1995 << 2000 << 2005 << 2010 << 2015; - percentage_other << 3.5 << 3.5 << 4.4 << 4.4 << 5 << 5 ; - percentage_coaloil << 58.7 << 55.7 << 51.5 << 48.2 << 42.9 << 43.1; - percentage_gas << 6.5 << 7.7 << 8.5 << 11.7 << 14.1 << 9.6 ; - percentage_nuclear << 27.7 << 28.7 << 29.4 << 26.2 << 22.2 << 14.2; - percentage_green << 3.6 << 4.4 << 6.2 << 9.5 << 15.8 << 28.1; - - - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // Note: In this step the data is copied (of not specified otherwise) - // the variables cYear, cOther ... will contain the internal column ID of the - // newly created columns with names "year" and "other" ... and the (copied) data - size_t cYear=ds->addCopiedColumn(year, "year"); - size_t cOther=ds->addCopiedColumn(percentage_other, "other"); - size_t cCoalOil=ds->addCopiedColumn(percentage_coaloil, "coal & oil"); - size_t cGas=ds->addCopiedColumn(percentage_gas, "natural gas"); - size_t cNuclear=ds->addCopiedColumn(percentage_nuclear, "nuclear energy"); - size_t cGreen=ds->addCopiedColumn(percentage_green, "green energy"); - - // 4. create graphs in the plot, which plots the dataset year/other, year/coal, ... - // The color of the graphs is set by calling set_fillColor_and_darkenedColor(), which sets the - // fillColor to the given color and makes the outline of the bars (i.e. their "color") a darker - // shade of the given color. - QVector graphs; - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); - graphs.back()->set_xColumn(cYear); - graphs.back()->set_yColumn(cOther); - graphs.back()->set_title(QObject::tr("other sources")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("red")); - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); - graphs.back()->set_xColumn(cYear); - graphs.back()->set_yColumn(cCoalOil); - graphs.back()->set_title(QObject::tr("coal & oil")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("darkgrey")); - graphs.back()->stackUpon(graphs[graphs.size()-2]); - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); - graphs.back()->set_xColumn(cYear); - graphs.back()->set_yColumn(cGas); - graphs.back()->set_title(QObject::tr("natural gas")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("blue")); - graphs.back()->stackUpon(graphs[graphs.size()-2]); - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); - graphs.back()->set_xColumn(cYear); - graphs.back()->set_yColumn(cNuclear); - graphs.back()->set_title(QObject::tr("nuclear energy")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("gold")); - graphs.back()->stackUpon(graphs[graphs.size()-2]); - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); - graphs.back()->set_xColumn(cYear); - graphs.back()->set_yColumn(cGreen); - graphs.back()->set_title(QObject::tr("green energy")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("darkgreen")); - graphs.back()->stackUpon(graphs[graphs.size()-2]); - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraphs(graphs); - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("year"); - plot.get_yAxis()->set_axisLabel("fraction of energy production in Germany [%]"); - - // 7. finally we move the plot key/legend to the outside, top-right - // and lay it out as a single row - // NOTE: plot is a descendent of QWidget, which uses an internal object of - // type JKQTBasePlotter, which does the actual plotting. - // So many properties of the plot are only available in this internal - // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); - - // 8 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - - return app.exec(); -} -``` -The result looks like this: - -![JKQTPbarVerticalGraphStacked](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/JKQTPbarVerticalGraphStacked.png) - -If you use `JKQTPbarHorizontalGraphStacked` instead of `JKQTPbarVerticalStackableGraph`, you'll get a result like this: -![JKQTPbarHorizontalGraphStacked](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/JKQTPbarHorizontalGraphStacked.png) - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple stacked barchart +This project (see `./examples/simpletest_stackedbars/`) simply creates a JKQtPlotter widget (as a new window) and adds several stacked barcharts. + +The soruce code of the main application is (see [`jkqtplotter_simpletest_stackedbars.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp): +```c++ +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphsbarchart.h" + +#define Ndata 5 +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + QVector year, percentage_other, percentage_coaloil, percentage_gas, percentage_nuclear, percentage_green; + year << 1990 << 1995 << 2000 << 2005 << 2010 << 2015; + percentage_other << 3.5 << 3.5 << 4.4 << 4.4 << 5 << 5 ; + percentage_coaloil << 58.7 << 55.7 << 51.5 << 48.2 << 42.9 << 43.1; + percentage_gas << 6.5 << 7.7 << 8.5 << 11.7 << 14.1 << 9.6 ; + percentage_nuclear << 27.7 << 28.7 << 29.4 << 26.2 << 22.2 << 14.2; + percentage_green << 3.6 << 4.4 << 6.2 << 9.5 << 15.8 << 28.1; + + + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // Note: In this step the data is copied (of not specified otherwise) + // the variables cYear, cOther ... will contain the internal column ID of the + // newly created columns with names "year" and "other" ... and the (copied) data + size_t cYear=ds->addCopiedColumn(year, "year"); + size_t cOther=ds->addCopiedColumn(percentage_other, "other"); + size_t cCoalOil=ds->addCopiedColumn(percentage_coaloil, "coal & oil"); + size_t cGas=ds->addCopiedColumn(percentage_gas, "natural gas"); + size_t cNuclear=ds->addCopiedColumn(percentage_nuclear, "nuclear energy"); + size_t cGreen=ds->addCopiedColumn(percentage_green, "green energy"); + + // 4. create graphs in the plot, which plots the dataset year/other, year/coal, ... + // The color of the graphs is set by calling set_fillColor_and_darkenedColor(), which sets the + // fillColor to the given color and makes the outline of the bars (i.e. their "color") a darker + // shade of the given color. + QVector graphs; + graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + graphs.back()->set_xColumn(cYear); + graphs.back()->set_yColumn(cOther); + graphs.back()->set_title(QObject::tr("other sources")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("red")); + graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + graphs.back()->set_xColumn(cYear); + graphs.back()->set_yColumn(cCoalOil); + graphs.back()->set_title(QObject::tr("coal & oil")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("darkgrey")); + graphs.back()->stackUpon(graphs[graphs.size()-2]); + graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + graphs.back()->set_xColumn(cYear); + graphs.back()->set_yColumn(cGas); + graphs.back()->set_title(QObject::tr("natural gas")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("blue")); + graphs.back()->stackUpon(graphs[graphs.size()-2]); + graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + graphs.back()->set_xColumn(cYear); + graphs.back()->set_yColumn(cNuclear); + graphs.back()->set_title(QObject::tr("nuclear energy")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("gold")); + graphs.back()->stackUpon(graphs[graphs.size()-2]); + graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + graphs.back()->set_xColumn(cYear); + graphs.back()->set_yColumn(cGreen); + graphs.back()->set_title(QObject::tr("green energy")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("darkgreen")); + graphs.back()->stackUpon(graphs[graphs.size()-2]); + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraphs(graphs); + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("year"); + plot.get_yAxis()->set_axisLabel("fraction of energy production in Germany [%]"); + + // 7. finally we move the plot key/legend to the outside, top-right + // and lay it out as a single row + // NOTE: plot is a descendent of QWidget, which uses an internal object of + // type JKQTBasePlotter, which does the actual plotting. + // So many properties of the plot are only available in this internal + // object, which you can access by plot.get_plotter(). + plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); + plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + + // 8 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + + return app.exec(); +} +``` +The result looks like this: + +![JKQTPbarVerticalGraphStacked](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/JKQTPbarVerticalGraphStacked.png) + +If you use `JKQTPbarHorizontalGraphStacked` instead of `JKQTPbarVerticalStackableGraph`, you'll get a result like this: +![JKQTPbarHorizontalGraphStacked](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/JKQTPbarHorizontalGraphStacked.png) + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp similarity index 98% rename from test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp rename to examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp index 6334b963a6..d0bc1b02cf 100644 --- a/test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp +++ b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp @@ -1,113 +1,113 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplotter/jkqtpgraphsbarchart.h" - - -template -void addGraph(JKQtPlotter& plot, bool swapXY) { - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) - QVector year, percentage_other, percentage_coaloil, percentage_gas, percentage_nuclear, percentage_green; - year << 1990 << 1995 << 2000 << 2005 << 2010 << 2015; - percentage_other << 3.5 << 3.5 << 4.4 << 4.4 << 5 << 5 ; - percentage_coaloil << 58.7 << 55.7 << 51.5 << 48.2 << 42.9 << 43.1; - percentage_gas << 6.5 << 7.7 << 8.5 << 11.7 << 14.1 << 9.6 ; - percentage_nuclear << 27.7 << 28.7 << 29.4 << 26.2 << 22.2 << 14.2; - percentage_green << 3.6 << 4.4 << 6.2 << 9.5 << 15.8 << 28.1; - - - // 3. make data available to JKQtPlotter by adding it to the internal datastore. - // Note: In this step the data is copied (of not specified otherwise) - // the variables cYear, cOther ... will contain the internal column ID of the - // newly created columns with names "year" and "other" ... and the (copied) data - size_t cYear=ds->addCopiedColumn(year, "year"); - size_t cOther=ds->addCopiedColumn(percentage_other, "other"); - size_t cCoalOil=ds->addCopiedColumn(percentage_coaloil, "coal & oil"); - size_t cGas=ds->addCopiedColumn(percentage_gas, "natural gas"); - size_t cNuclear=ds->addCopiedColumn(percentage_nuclear, "nuclear energy"); - size_t cGreen=ds->addCopiedColumn(percentage_green, "green energy"); - - // 4. create graphs in the plot, which plots the dataset year/other, year/coal, ... - // The color of the graphs is set by calling set_fillColor_and_darkenedColor(), which sets the - // fillColor to the given color and makes the outline of the bars (i.e. their "color") a darker - // shade of the given color. - QVector graphs; - graphs.push_back(new TGRAPH(&plot)); - graphs.back()->set_xColumn((!swapXY)?cYear:cOther); - graphs.back()->set_yColumn((!swapXY)?cOther:cYear); - graphs.back()->set_title(QObject::tr("other sources")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("red")); - graphs.push_back(new TGRAPH(&plot)); - graphs.back()->set_xColumn((!swapXY)?cYear:cCoalOil); - graphs.back()->set_yColumn((!swapXY)?cCoalOil:cYear); - graphs.back()->set_title(QObject::tr("coal & oil")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("darkgrey")); - graphs.back()->stackUpon(graphs[graphs.size()-2]); - graphs.push_back(new TGRAPH(&plot)); - graphs.back()->set_xColumn((!swapXY)?cYear:cGas); - graphs.back()->set_yColumn((!swapXY)?cGas:cYear); - graphs.back()->set_title(QObject::tr("natural gas")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("blue")); - graphs.back()->stackUpon(graphs[graphs.size()-2]); - graphs.push_back(new TGRAPH(&plot)); - graphs.back()->set_xColumn((!swapXY)?cYear:cNuclear); - graphs.back()->set_yColumn((!swapXY)?cNuclear:cYear); - graphs.back()->set_title(QObject::tr("nuclear energy")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("gold")); - graphs.back()->stackUpon(graphs[graphs.size()-2]); - graphs.push_back(new TGRAPH(&plot)); - graphs.back()->set_xColumn((!swapXY)?cYear:cGreen); - graphs.back()->set_yColumn((!swapXY)?cGreen:cYear); - graphs.back()->set_title(QObject::tr("green energy")); - graphs.back()->set_fillColor_and_darkenedColor(QColor("darkgreen")); - graphs.back()->stackUpon(graphs[graphs.size()-2]); - - - // 5. add the graphs to the plot, so it is actually displayed - plot.addGraphs(graphs); - - // 6. set axis labels - plot.get_xAxis()->set_axisLabel("year"); - plot.get_yAxis()->set_axisLabel("fraction of energy production in Germany [%]"); - - // 7. finally we move the plot key/legend to the outside, top-right - // and lay it out as a single row - // NOTE: plot is a descendent of QWidget, which uses an internal object of - // type JKQTBasePlotter, which does the actual plotting. - // So many properties of the plot are only available in this internal - // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); - - // 8 autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,400); -} - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - JKQtPlotter plotV; - addGraph(plotV, false); - plotV.setWindowTitle("JKQTPbarVerticalStackableGraph"); - - JKQtPlotter plotH; - addGraph(plotH, true); - plotH.setWindowTitle("JKQTPbarHorizontalStackableGraph"); - - plotV.move(100,100); - plotH.move(750,100); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplotter/jkqtpgraphsbarchart.h" + + +template +void addGraph(JKQtPlotter& plot, bool swapXY) { + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting + plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) + QVector year, percentage_other, percentage_coaloil, percentage_gas, percentage_nuclear, percentage_green; + year << 1990 << 1995 << 2000 << 2005 << 2010 << 2015; + percentage_other << 3.5 << 3.5 << 4.4 << 4.4 << 5 << 5 ; + percentage_coaloil << 58.7 << 55.7 << 51.5 << 48.2 << 42.9 << 43.1; + percentage_gas << 6.5 << 7.7 << 8.5 << 11.7 << 14.1 << 9.6 ; + percentage_nuclear << 27.7 << 28.7 << 29.4 << 26.2 << 22.2 << 14.2; + percentage_green << 3.6 << 4.4 << 6.2 << 9.5 << 15.8 << 28.1; + + + // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // Note: In this step the data is copied (of not specified otherwise) + // the variables cYear, cOther ... will contain the internal column ID of the + // newly created columns with names "year" and "other" ... and the (copied) data + size_t cYear=ds->addCopiedColumn(year, "year"); + size_t cOther=ds->addCopiedColumn(percentage_other, "other"); + size_t cCoalOil=ds->addCopiedColumn(percentage_coaloil, "coal & oil"); + size_t cGas=ds->addCopiedColumn(percentage_gas, "natural gas"); + size_t cNuclear=ds->addCopiedColumn(percentage_nuclear, "nuclear energy"); + size_t cGreen=ds->addCopiedColumn(percentage_green, "green energy"); + + // 4. create graphs in the plot, which plots the dataset year/other, year/coal, ... + // The color of the graphs is set by calling set_fillColor_and_darkenedColor(), which sets the + // fillColor to the given color and makes the outline of the bars (i.e. their "color") a darker + // shade of the given color. + QVector graphs; + graphs.push_back(new TGRAPH(&plot)); + graphs.back()->set_xColumn((!swapXY)?cYear:cOther); + graphs.back()->set_yColumn((!swapXY)?cOther:cYear); + graphs.back()->set_title(QObject::tr("other sources")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("red")); + graphs.push_back(new TGRAPH(&plot)); + graphs.back()->set_xColumn((!swapXY)?cYear:cCoalOil); + graphs.back()->set_yColumn((!swapXY)?cCoalOil:cYear); + graphs.back()->set_title(QObject::tr("coal & oil")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("darkgrey")); + graphs.back()->stackUpon(graphs[graphs.size()-2]); + graphs.push_back(new TGRAPH(&plot)); + graphs.back()->set_xColumn((!swapXY)?cYear:cGas); + graphs.back()->set_yColumn((!swapXY)?cGas:cYear); + graphs.back()->set_title(QObject::tr("natural gas")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("blue")); + graphs.back()->stackUpon(graphs[graphs.size()-2]); + graphs.push_back(new TGRAPH(&plot)); + graphs.back()->set_xColumn((!swapXY)?cYear:cNuclear); + graphs.back()->set_yColumn((!swapXY)?cNuclear:cYear); + graphs.back()->set_title(QObject::tr("nuclear energy")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("gold")); + graphs.back()->stackUpon(graphs[graphs.size()-2]); + graphs.push_back(new TGRAPH(&plot)); + graphs.back()->set_xColumn((!swapXY)?cYear:cGreen); + graphs.back()->set_yColumn((!swapXY)?cGreen:cYear); + graphs.back()->set_title(QObject::tr("green energy")); + graphs.back()->set_fillColor_and_darkenedColor(QColor("darkgreen")); + graphs.back()->stackUpon(graphs[graphs.size()-2]); + + + // 5. add the graphs to the plot, so it is actually displayed + plot.addGraphs(graphs); + + // 6. set axis labels + plot.get_xAxis()->set_axisLabel("year"); + plot.get_yAxis()->set_axisLabel("fraction of energy production in Germany [%]"); + + // 7. finally we move the plot key/legend to the outside, top-right + // and lay it out as a single row + // NOTE: plot is a descendent of QWidget, which uses an internal object of + // type JKQTBasePlotter, which does the actual plotting. + // So many properties of the plot are only available in this internal + // object, which you can access by plot.get_plotter(). + plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); + plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + + // 8 autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,400); +} + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + JKQtPlotter plotV; + addGraph(plotV, false); + plotV.setWindowTitle("JKQTPbarVerticalStackableGraph"); + + JKQtPlotter plotH; + addGraph(plotH, true); + plotH.setWindowTitle("JKQTPbarHorizontalStackableGraph"); + + plotV.move(100,100); + plotH.move(750,100); + + return app.exec(); +} diff --git a/test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro similarity index 71% rename from test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro rename to examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro index 618b07ff38..9e80bfa333 100644 --- a/test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro +++ b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro @@ -1,22 +1,26 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_stackedbars.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_stackedbars - - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_stackedbars.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_stackedbars + + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars_and_lib.pro b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars_and_lib.pro similarity index 97% rename from test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars_and_lib.pro rename to examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars_and_lib.pro index 697e60441c..90da78e67f 100644 --- a/test/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars_and_lib.pro +++ b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_stackedbars - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_stackedbars.file=$$PWD/jkqtplotter_simpletest_stackedbars.pro -jkqtplotter_simpletest_stackedbars.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_stackedbars + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_stackedbars.file=$$PWD/jkqtplotter_simpletest_stackedbars.pro +jkqtplotter_simpletest_stackedbars.depends = jkqtplotterlib diff --git a/test/simpletest_stepplots/README.md b/examples/simpletest_stepplots/README.md similarity index 79% rename from test/simpletest_stepplots/README.md rename to examples/simpletest_stepplots/README.md index 56ac0c0285..fb8ca925d3 100644 --- a/test/simpletest_stepplots/README.md +++ b/examples/simpletest_stepplots/README.md @@ -1,58 +1,58 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Step Line Plots in Different Styles -This project (see `./test/simpletest_stepplots/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. - -The source code of the main application can be found in [`jkqtplotter_simpletest_stepplots.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp). For the most part, several datasets of cosine-curves are generated. then thrre tuples of graphs are added: One of type `JKQTPxyLineGraph`, which simply indicates the location of the actual datapoints. the second is of type `JKQTPstepHorizontalGraph`, which adds the step-graph to the plot: - -```c++ - // 3 now we make several plots with different step styles, each one also contains a - // symbol plot indicating the location of the datapoints themselves - JKQTPstepHorizontalGraph* graph; - JKQTPxyLineGraph* graphL; - - //-- JKQTPstepLeft ---------------------------------------------------------------------------------------- - graph=new JKQTPstepHorizontalGraph(&plot); - graphL=new JKQTPxyLineGraph(&plot); - - // set data for both graphs - graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); - graph->set_yColumn(columnY1); graphL->set_yColumn(graph->get_yColumn()); - - // set step style - graph->set_stepType(JKQTPstepLeft); - graph->set_lineWidth(1); - graph->set_fillCurve(true); - graph->set_drawLine(true); - graph->set_title("JKQTPstepLeft, filled"); -``` -Note that you can configure the step type (left/center/right by `graph->set_stepType(JKQTPstepLeft)`. With `graph->set_fillCurve(true)` you can draw the curve filled until the y=0-axis and with `graph->set_drawLine(true)` you can switch the line along the values on and off (e.g. to only have the filled area, but no line). - -Finally the `JKQTPxyLineGraph` is configured: -```c++ - // set symbol + pen style and color for the added circles, copy color - graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); - graphL->set_drawLine(false); - graphL->set_symbolSize(9); - graphL->set_symbolWidth(1); - graphL->set_color(graph->get_color()); -``` - -... and all graphs are added to the plot: -```c++ - // add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - plot.addGraph(graphL); -``` - -In addition to the symbol type and line style, you can also alter the size of the symbols (`graph->set_symbolSize(14)`), the line-width used to draw them (`graph->set_symbolWidth(1.5)`) and the line width of the graph line (`graph->set_lineWidth(1)`). If you want to switch off the line altogether, use `graph->set_drawLine(false`. - -The result looks like this: - -![jkqtplotter_simpletest_stepplots](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_stepplots.png) - - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Step Line Plots in Different Styles +This project (see `./examples/simpletest_stepplots/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. + +The source code of the main application can be found in [`jkqtplotter_simpletest_stepplots.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp). For the most part, several datasets of cosine-curves are generated. then thrre tuples of graphs are added: One of type `JKQTPxyLineGraph`, which simply indicates the location of the actual datapoints. the second is of type `JKQTPstepHorizontalGraph`, which adds the step-graph to the plot: + +```c++ + // 3 now we make several plots with different step styles, each one also contains a + // symbol plot indicating the location of the datapoints themselves + JKQTPstepHorizontalGraph* graph; + JKQTPxyLineGraph* graphL; + + //-- JKQTPstepLeft ---------------------------------------------------------------------------------------- + graph=new JKQTPstepHorizontalGraph(&plot); + graphL=new JKQTPxyLineGraph(&plot); + + // set data for both graphs + graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); + graph->set_yColumn(columnY1); graphL->set_yColumn(graph->get_yColumn()); + + // set step style + graph->set_stepType(JKQTPstepLeft); + graph->set_lineWidth(1); + graph->set_fillCurve(true); + graph->set_drawLine(true); + graph->set_title("JKQTPstepLeft, filled"); +``` +Note that you can configure the step type (left/center/right by `graph->set_stepType(JKQTPstepLeft)`. With `graph->set_fillCurve(true)` you can draw the curve filled until the y=0-axis and with `graph->set_drawLine(true)` you can switch the line along the values on and off (e.g. to only have the filled area, but no line). + +Finally the `JKQTPxyLineGraph` is configured: +```c++ + // set symbol + pen style and color for the added circles, copy color + graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); + graphL->set_drawLine(false); + graphL->set_symbolSize(9); + graphL->set_symbolWidth(1); + graphL->set_color(graph->get_color()); +``` + +... and all graphs are added to the plot: +```c++ + // add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + plot.addGraph(graphL); +``` + +In addition to the symbol type and line style, you can also alter the size of the symbols (`graph->set_symbolSize(14)`), the line-width used to draw them (`graph->set_symbolWidth(1.5)`) and the line width of the graph line (`graph->set_lineWidth(1)`). If you want to switch off the line altogether, use `graph->set_drawLine(false`. + +The result looks like this: + +![jkqtplotter_simpletest_stepplots](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_stepplots.png) + + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp similarity index 97% rename from test/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp rename to examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp index 7d7c5795c4..632e67fae2 100644 --- a/test/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp +++ b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp @@ -1,127 +1,127 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplottertools/jkqtptools.h" - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data a vector of x-values for a simple plot and several sets of y-values for - // cosine curves stacked above each other - QVector X, Y1, Y2, Y3; - const int Ndata=10; // number of plot points in each curve - for (int i=0; iaddCopiedColumn(X, "x"); - size_t columnY1=ds->addCopiedColumn(Y1, "y1"); - size_t columnY2=ds->addCopiedColumn(Y2, "y2"); - size_t columnY3=ds->addCopiedColumn(Y3, "y3"); - - // 3 now we make several plots with different step styles, each one also contains a - // symbol plot indicating the location of the datapoints themselves - JKQTPstepHorizontalGraph* graph; - JKQTPxyLineGraph* graphL; - - //-- JKQTPstepLeft ---------------------------------------------------------------------------------------- - graph=new JKQTPstepHorizontalGraph(&plot); - graphL=new JKQTPxyLineGraph(&plot); - - // set data for both graphs - graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); - graph->set_yColumn(columnY1); graphL->set_yColumn(graph->get_yColumn()); - - // set step style - graph->set_stepType(JKQTPstepLeft); - graph->set_lineWidth(1); - graph->set_fillCurve(true); - graph->set_drawLine(true); - graph->set_title("JKQTPstepLeft, filled"); - - // set symbol + pen style and color for the added circles, copy color - graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); - graphL->set_drawLine(false); - graphL->set_symbolSize(9); - graphL->set_symbolWidth(1); - graphL->set_color(graph->get_color()); - - // add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - plot.addGraph(graphL); - - - //-- JKQTPstepCenter ---------------------------------------------------------------------------------------- - graph=new JKQTPstepHorizontalGraph(&plot); - graphL=new JKQTPxyLineGraph(&plot); - - // set data for both graphs - graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); - graph->set_yColumn(columnY2); graphL->set_yColumn(graph->get_yColumn()); - - // set step style - graph->set_stepType(JKQTPstepCenter); - graph->set_lineWidth(1); - graph->set_fillCurve(false); - graph->set_drawLine(true); - graph->set_title("JKQTPstepCenter"); - - // set symbol + pen style and color for the added circles, copy color - graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); - graphL->set_drawLine(false); - graphL->set_symbolSize(9); - graphL->set_symbolWidth(1); - graphL->set_color(graph->get_color()); - - // add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - plot.addGraph(graphL); - - - //-- JKQTPstepRight ---------------------------------------------------------------------------------------- - graph=new JKQTPstepHorizontalGraph(&plot); - graphL=new JKQTPxyLineGraph(&plot); - - // set data for both graphs - graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); - graph->set_yColumn(columnY3); graphL->set_yColumn(graph->get_yColumn()); - - // set step style - graph->set_stepType(JKQTPstepRight); - graph->set_lineWidth(1); - graph->set_fillCurve(false); - graph->set_drawLine(true); - graph->set_title("JKQTPstepRight"); - - // set symbol + pen style and color for the added circles, copy color - graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); - graphL->set_drawLine(false); - graphL->set_symbolSize(9); - graphL->set_symbolWidth(1); - graphL->set_color(graph->get_color()); - - // add the graphs to the plot, so it is actually displayed - plot.addGraph(graph); - plot.addGraph(graphL); - - - - - // 4. scale plot manually - plot.setXY(-0.5, X.last()+0.5, -0.5, 7); - - // 5. show plotter and make it a decent size - plot.show(); - plot.resize(800,600); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplottertools/jkqtptools.h" + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data a vector of x-values for a simple plot and several sets of y-values for + // cosine curves stacked above each other + QVector X, Y1, Y2, Y3; + const int Ndata=10; // number of plot points in each curve + for (int i=0; iaddCopiedColumn(X, "x"); + size_t columnY1=ds->addCopiedColumn(Y1, "y1"); + size_t columnY2=ds->addCopiedColumn(Y2, "y2"); + size_t columnY3=ds->addCopiedColumn(Y3, "y3"); + + // 3 now we make several plots with different step styles, each one also contains a + // symbol plot indicating the location of the datapoints themselves + JKQTPstepHorizontalGraph* graph; + JKQTPxyLineGraph* graphL; + + //-- JKQTPstepLeft ---------------------------------------------------------------------------------------- + graph=new JKQTPstepHorizontalGraph(&plot); + graphL=new JKQTPxyLineGraph(&plot); + + // set data for both graphs + graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); + graph->set_yColumn(columnY1); graphL->set_yColumn(graph->get_yColumn()); + + // set step style + graph->set_stepType(JKQTPstepLeft); + graph->set_lineWidth(1); + graph->set_fillCurve(true); + graph->set_drawLine(true); + graph->set_title("JKQTPstepLeft, filled"); + + // set symbol + pen style and color for the added circles, copy color + graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); + graphL->set_drawLine(false); + graphL->set_symbolSize(9); + graphL->set_symbolWidth(1); + graphL->set_color(graph->get_color()); + + // add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + plot.addGraph(graphL); + + + //-- JKQTPstepCenter ---------------------------------------------------------------------------------------- + graph=new JKQTPstepHorizontalGraph(&plot); + graphL=new JKQTPxyLineGraph(&plot); + + // set data for both graphs + graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); + graph->set_yColumn(columnY2); graphL->set_yColumn(graph->get_yColumn()); + + // set step style + graph->set_stepType(JKQTPstepCenter); + graph->set_lineWidth(1); + graph->set_fillCurve(false); + graph->set_drawLine(true); + graph->set_title("JKQTPstepCenter"); + + // set symbol + pen style and color for the added circles, copy color + graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); + graphL->set_drawLine(false); + graphL->set_symbolSize(9); + graphL->set_symbolWidth(1); + graphL->set_color(graph->get_color()); + + // add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + plot.addGraph(graphL); + + + //-- JKQTPstepRight ---------------------------------------------------------------------------------------- + graph=new JKQTPstepHorizontalGraph(&plot); + graphL=new JKQTPxyLineGraph(&plot); + + // set data for both graphs + graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); + graph->set_yColumn(columnY3); graphL->set_yColumn(graph->get_yColumn()); + + // set step style + graph->set_stepType(JKQTPstepRight); + graph->set_lineWidth(1); + graph->set_fillCurve(false); + graph->set_drawLine(true); + graph->set_title("JKQTPstepRight"); + + // set symbol + pen style and color for the added circles, copy color + graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); + graphL->set_drawLine(false); + graphL->set_symbolSize(9); + graphL->set_symbolWidth(1); + graphL->set_color(graph->get_color()); + + // add the graphs to the plot, so it is actually displayed + plot.addGraph(graph); + plot.addGraph(graphL); + + + + + // 4. scale plot manually + plot.setXY(-0.5, X.last()+0.5, -0.5, 7); + + // 5. show plotter and make it a decent size + plot.show(); + plot.resize(800,600); + + return app.exec(); +} diff --git a/test/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro similarity index 71% rename from test/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro rename to examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro index 39848e2c23..ac0f41f8b2 100644 --- a/test/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro +++ b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro @@ -1,22 +1,26 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_stepplots.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_stepplots - - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_stepplots.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_stepplots + + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_stepplots/jkqtplotter_simpletest_stepplots_and_lib.pro b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots_and_lib.pro similarity index 97% rename from test/simpletest_stepplots/jkqtplotter_simpletest_stepplots_and_lib.pro rename to examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots_and_lib.pro index c59dc31c9e..82c171ca1b 100644 --- a/test/simpletest_stepplots/jkqtplotter_simpletest_stepplots_and_lib.pro +++ b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_stepplots - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_stepplots.file=$$PWD/jkqtplotter_simpletest_stepplots.pro -jkqtplotter_simpletest_stepplots.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_stepplots + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_stepplots.file=$$PWD/jkqtplotter_simpletest_stepplots.pro +jkqtplotter_simpletest_stepplots.depends = jkqtplotterlib diff --git a/test/simpletest_symbols_and_errors/README.md b/examples/simpletest_symbols_and_errors/README.md similarity index 82% rename from test/simpletest_symbols_and_errors/README.md rename to examples/simpletest_symbols_and_errors/README.md index 33e07ec9b5..02025c5811 100644 --- a/test/simpletest_symbols_and_errors/README.md +++ b/examples/simpletest_symbols_and_errors/README.md @@ -1,82 +1,82 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Simple line-graph with error bars -This project (see `./test/simpletest_symbols_and_errors/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave) that has y-errorbars. In addition, this example shows how to change some of the axis properties and how to use LaTeX markup to format axis labels (can actually be used for all labels in JKQtPlotter). Also, in comparison to the last example, here we initialize the data from C-type arrays (double*), instead of QVector objects. - -The soruce code of the main application is (see [`jkqtplotter_simpletest_symbols_and_errors.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp): -```c++ -#include -#include "jkqtplotter/jkqtplotter.h" - -// number of datapoints: -#define Ndata 10 - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for a simple plot (a sine curve with lin. increasing errors) - double X[Ndata], Y[Ndata], YERROR[Ndata]; - for (int i=0; iaddCopiedColumn(X, Ndata, "x"); - size_t columnY=ds->addCopiedColumn(Y, Ndata, "y"); - size_t columnYE=ds->addCopiedColumn(YERROR, Ndata, "y-error"); - - // 4. create a graph in the plot, which plots the dataset X/Y: - JKQTPxyLineErrorGraph* graph1=new JKQTPxyLineErrorGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY); - graph1->set_yErrorColumn(columnYE); - graph1->set_symbol(JKQTPfilledStar); // set symbol style - graph1->set_yErrorStyle(JKQTPerrorBars); // set error indicator type - graph1->set_drawLine(false); // don't draw a line - graph1->set_title(QObject::tr("sine graph")); - - // 5. add the graph to the plot, so it is actually displayed - plot.addGraph(graph1); - - // 6. hide 0-lines - plot.get_xAxis()->set_showZeroAxis(false); - plot.get_yAxis()->set_showZeroAxis(false); - - // 7. set some axis properties (we use LaTeX for nice equation rendering) - plot.get_xAxis()->set_axisLabel(QObject::tr("x-axis $x$ [mm]")); - plot.get_yAxis()->set_axisLabel(QObject::tr("\\textbf{\\color{red}{y-axis} $\\left(y=\\sin(x)\\pm(0.2+0.25\\cdot x)\\right)$ [A.U.]}")); - plot.get_xAxis()->set_labelFont("Arial"); - plot.get_yAxis()->set_labelFont("Times New Roman"); - plot.get_yAxis()->set_labelFontSize(12); // large x-axis label - plot.get_yAxis()->set_tickLabelFontSize(10); // and larger y-axis tick labels - - // 8. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - - return app.exec(); -} - -``` -The result looks like this: - -![jkqtplotter_simpletest_symbols_and_errors](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_symbols_and_errors.png) - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Simple line-graph with error bars +This project (see `./examples/simpletest_symbols_and_errors/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave) that has y-errorbars. In addition, this example shows how to change some of the axis properties and how to use LaTeX markup to format axis labels (can actually be used for all labels in JKQtPlotter). Also, in comparison to the last example, here we initialize the data from C-type arrays (double*), instead of QVector objects. + +The soruce code of the main application is (see [`jkqtplotter_simpletest_symbols_and_errors.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp): +```c++ +#include +#include "jkqtplotter/jkqtplotter.h" + +// number of datapoints: +#define Ndata 10 + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for a simple plot (a sine curve with lin. increasing errors) + double X[Ndata], Y[Ndata], YERROR[Ndata]; + for (int i=0; iaddCopiedColumn(X, Ndata, "x"); + size_t columnY=ds->addCopiedColumn(Y, Ndata, "y"); + size_t columnYE=ds->addCopiedColumn(YERROR, Ndata, "y-error"); + + // 4. create a graph in the plot, which plots the dataset X/Y: + JKQTPxyLineErrorGraph* graph1=new JKQTPxyLineErrorGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY); + graph1->set_yErrorColumn(columnYE); + graph1->set_symbol(JKQTPfilledStar); // set symbol style + graph1->set_yErrorStyle(JKQTPerrorBars); // set error indicator type + graph1->set_drawLine(false); // don't draw a line + graph1->set_title(QObject::tr("sine graph")); + + // 5. add the graph to the plot, so it is actually displayed + plot.addGraph(graph1); + + // 6. hide 0-lines + plot.get_xAxis()->set_showZeroAxis(false); + plot.get_yAxis()->set_showZeroAxis(false); + + // 7. set some axis properties (we use LaTeX for nice equation rendering) + plot.get_xAxis()->set_axisLabel(QObject::tr("x-axis $x$ [mm]")); + plot.get_yAxis()->set_axisLabel(QObject::tr("\\textbf{\\color{red}{y-axis} $\\left(y=\\sin(x)\\pm(0.2+0.25\\cdot x)\\right)$ [A.U.]}")); + plot.get_xAxis()->set_labelFont("Arial"); + plot.get_yAxis()->set_labelFont("Times New Roman"); + plot.get_yAxis()->set_labelFontSize(12); // large x-axis label + plot.get_yAxis()->set_tickLabelFontSize(10); // and larger y-axis tick labels + + // 8. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + + return app.exec(); +} + +``` +The result looks like this: + +![jkqtplotter_simpletest_symbols_and_errors](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_symbols_and_errors.png) + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp similarity index 97% rename from test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp rename to examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp index 8c6e204ff5..ce7c70b1dc 100644 --- a/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp +++ b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp @@ -1,66 +1,66 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" - -// number of datapoints: -#define Ndata 10 - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data for a simple plot (a sine curve with lin. increasing errors) - double X[Ndata], Y[Ndata], YERROR[Ndata]; - for (int i=0; iaddCopiedColumn(X, Ndata, "x"); - size_t columnY=ds->addCopiedColumn(Y, Ndata, "y"); - size_t columnYE=ds->addCopiedColumn(YERROR, Ndata, "y-error"); - - // 4. create a graph in the plot, which plots the dataset X/Y: - JKQTPxyLineErrorGraph* graph1=new JKQTPxyLineErrorGraph(&plot); - graph1->set_xColumn(columnX); - graph1->set_yColumn(columnY); - graph1->set_yErrorColumn(columnYE); - graph1->set_symbol(JKQTPfilledStar); // set symbol style - graph1->set_yErrorStyle(JKQTPerrorBars); // set error indicator type - graph1->set_drawLine(false); // don't draw a line - graph1->set_title(QObject::tr("sine graph")); - - // 5. add the graph to the plot, so it is actually displayed - plot.addGraph(graph1); - - // 6. hide 0-lines - plot.get_xAxis()->set_showZeroAxis(false); - plot.get_yAxis()->set_showZeroAxis(false); - - // 7. set some axis properties (we use LaTeX for nice equation rendering) - plot.get_xAxis()->set_axisLabel(QObject::tr("x-axis $x$ [mm]")); - plot.get_yAxis()->set_axisLabel(QObject::tr("\\textbf{\\color{red}{y-axis} $\\left(y=\\sin(x)\\pm(0.2+0.25\\cdot x)\\right)$ [A.U.]}")); - plot.get_xAxis()->set_labelFont("Arial"); - plot.get_yAxis()->set_labelFont("Times New Roman"); - plot.get_yAxis()->set_labelFontSize(12); // large x-axis label - plot.get_yAxis()->set_tickLabelFontSize(10); // and larger y-axis tick labels - - // 8. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // show plotter and make it a decent size - plot.show(); - plot.resize(600,400); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" + +// number of datapoints: +#define Ndata 10 + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data for a simple plot (a sine curve with lin. increasing errors) + double X[Ndata], Y[Ndata], YERROR[Ndata]; + for (int i=0; iaddCopiedColumn(X, Ndata, "x"); + size_t columnY=ds->addCopiedColumn(Y, Ndata, "y"); + size_t columnYE=ds->addCopiedColumn(YERROR, Ndata, "y-error"); + + // 4. create a graph in the plot, which plots the dataset X/Y: + JKQTPxyLineErrorGraph* graph1=new JKQTPxyLineErrorGraph(&plot); + graph1->set_xColumn(columnX); + graph1->set_yColumn(columnY); + graph1->set_yErrorColumn(columnYE); + graph1->set_symbol(JKQTPfilledStar); // set symbol style + graph1->set_yErrorStyle(JKQTPerrorBars); // set error indicator type + graph1->set_drawLine(false); // don't draw a line + graph1->set_title(QObject::tr("sine graph")); + + // 5. add the graph to the plot, so it is actually displayed + plot.addGraph(graph1); + + // 6. hide 0-lines + plot.get_xAxis()->set_showZeroAxis(false); + plot.get_yAxis()->set_showZeroAxis(false); + + // 7. set some axis properties (we use LaTeX for nice equation rendering) + plot.get_xAxis()->set_axisLabel(QObject::tr("x-axis $x$ [mm]")); + plot.get_yAxis()->set_axisLabel(QObject::tr("\\textbf{\\color{red}{y-axis} $\\left(y=\\sin(x)\\pm(0.2+0.25\\cdot x)\\right)$ [A.U.]}")); + plot.get_xAxis()->set_labelFont("Arial"); + plot.get_yAxis()->set_labelFont("Times New Roman"); + plot.get_yAxis()->set_labelFontSize(12); // large x-axis label + plot.get_yAxis()->set_tickLabelFontSize(10); // and larger y-axis tick labels + + // 8. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // show plotter and make it a decent size + plot.show(); + plot.resize(600,400); + + return app.exec(); +} diff --git a/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro similarity index 74% rename from test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro rename to examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro index 031fbbdf17..92c64b2275 100644 --- a/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro +++ b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro @@ -1,23 +1,27 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_symbols_and_errors.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_symbols_and_errors - - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -win32-msvc*: DEFINES += _USE_MATH_DEFINES - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_symbols_and_errors.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_symbols_and_errors + + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +win32-msvc*: DEFINES += _USE_MATH_DEFINES + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors_and_lib.pro b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors_and_lib.pro similarity index 97% rename from test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors_and_lib.pro rename to examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors_and_lib.pro index 6bcb96e59b..250af28de2 100644 --- a/test/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors_and_lib.pro +++ b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_symbols_and_errors - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_symbols_and_errors.file=$$PWD/jkqtplotter_simpletest_symbols_and_errors.pro -jkqtplotter_simpletest_symbols_and_errors.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_symbols_and_errors + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_symbols_and_errors.file=$$PWD/jkqtplotter_simpletest_symbols_and_errors.pro +jkqtplotter_simpletest_symbols_and_errors.depends = jkqtplotterlib diff --git a/test/simpletest_symbols_and_styles/README.md b/examples/simpletest_symbols_and_styles/README.md similarity index 76% rename from test/simpletest_symbols_and_styles/README.md rename to examples/simpletest_symbols_and_styles/README.md index 9aa933bd8c..dae3741a6e 100644 --- a/test/simpletest_symbols_and_styles/README.md +++ b/examples/simpletest_symbols_and_styles/README.md @@ -1,55 +1,55 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Line Graph with Different Symbols and Line Styles -This project (see `./test/simpletest_symbols_and_styles/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. - -The source code of the main application can be found in [`jkqtplotter_simpletest_symbols_and_styles.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp). Mainly several graphs are generated in a loop and then different symbol and line styles are applied to the graph (set by `graph->set_symbol()` for the symbol and `graph->set_style()` for the line style). The colors are set automtically from an internal default palette. The main loop looks like this: - -```c++ - QVector pens {Qt::NoPen, Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; - int ipen=0; - for (int symbolID=0; symbolID<=JKQTPmaxSymbolID; symbolID++) { - // generate some plot data - QVector Y; - for (auto& xx: X) { - Y<(symbolID)*1.5; - } - - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); - - // copy data into datastore and immediately set the yColumn - graph->set_xColumn(columnX); - graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(symbolID))); - - // set symbol + pen style and color - graph->set_symbol(static_cast(symbolID)); - graph->set_style(pens[ipen]); - // set symbol size - graph->set_symbolSize(14); - // set width of symbol lines - graph->set_symbolWidth(1.5); - // set width of graph line - graph->set_lineWidth(1); - - // graph title is made from symbol+penstyle - graph->set_title(JKQTPgraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+JKQTP_QPenStyle2String(graph->get_style())); - - // add the graph to the plot, so it is actually displayed - plot.addGraph(graph); - - ipen++; - if (ipen>=pens.size()) ipen=0; - } -``` - -In addition to the symbol type and line style, you can also alter the size of the symbols (`graph->set_symbolSize(14)`), the line-width used to draw them (`graph->set_symbolWidth(1.5)`) and the line width of the graph line (`graph->set_lineWidth(1)`). If you want to switch off the line altogether, use `graph->set_drawLine(false`. - -The result looks like this: - -![jkqtplotter_simpletest_symbols_and_styles](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_symbols_and_styles.png) - - - +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Line Graph with Different Symbols and Line Styles +This project (see `./examples/simpletest_symbols_and_styles/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. + +The source code of the main application can be found in [`jkqtplotter_simpletest_symbols_and_styles.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp). Mainly several graphs are generated in a loop and then different symbol and line styles are applied to the graph (set by `graph->set_symbol()` for the symbol and `graph->set_style()` for the line style). The colors are set automtically from an internal default palette. The main loop looks like this: + +```c++ + QVector pens {Qt::NoPen, Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; + int ipen=0; + for (int symbolID=0; symbolID<=JKQTPmaxSymbolID; symbolID++) { + // generate some plot data + QVector Y; + for (auto& xx: X) { + Y<(symbolID)*1.5; + } + + JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); + + // copy data into datastore and immediately set the yColumn + graph->set_xColumn(columnX); + graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(symbolID))); + + // set symbol + pen style and color + graph->set_symbol(static_cast(symbolID)); + graph->set_style(pens[ipen]); + // set symbol size + graph->set_symbolSize(14); + // set width of symbol lines + graph->set_symbolWidth(1.5); + // set width of graph line + graph->set_lineWidth(1); + + // graph title is made from symbol+penstyle + graph->set_title(JKQTPgraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+JKQTP_QPenStyle2String(graph->get_style())); + + // add the graph to the plot, so it is actually displayed + plot.addGraph(graph); + + ipen++; + if (ipen>=pens.size()) ipen=0; + } +``` + +In addition to the symbol type and line style, you can also alter the size of the symbols (`graph->set_symbolSize(14)`), the line-width used to draw them (`graph->set_symbolWidth(1.5)`) and the line width of the graph line (`graph->set_lineWidth(1)`). If you want to switch off the line altogether, use `graph->set_drawLine(false`. + +The result looks like this: + +![jkqtplotter_simpletest_symbols_and_styles](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_symbols_and_styles.png) + + + [Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) \ No newline at end of file diff --git a/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp similarity index 97% rename from test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp rename to examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp index d10baccb8f..05659f31da 100644 --- a/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp +++ b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp @@ -1,75 +1,75 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplottertools/jkqtptools.h" - - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); - - // 2. now we create data a vector of x-values for a simple plot (a sine curve) - QVector X; - const int Ndata=10; // number of plot points in each curve - for (int i=0; iaddCopiedColumn(X, "x"); - - - // 3. now we make several plots with different symbol styles and line-styles - // for that we iterate over every symbol style and at the same time over - // pen styles from the vector pens - QVector pens {Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; - int ipen=0; - for (int symbolID=0; symbolID<=JKQTPmaxSymbolID; symbolID++) { - // generate some plot data - QVector Y; - for (auto& xx: X) { - Y<(symbolID)*1.5; - } - - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); - - // copy data into datastore and immediately set the yColumn - graph->set_xColumn(columnX); - graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(symbolID))); - - // set symbol + pen style and color - graph->set_symbol(static_cast(symbolID)); - graph->set_style(pens[ipen]); - QString lname=JKQTP_QPenStyle2String(graph->get_style()); - graph->set_drawLine(static_cast(symbolID)!=JKQTPdot); - if (!graph->get_drawLine()) lname=""; - // set symbol size - graph->set_symbolSize(14); - // set width of symbol lines - graph->set_symbolWidth(1.5); - // set width of graph line - graph->set_lineWidth(1); - - // graph title is made from symbol+penstyle - graph->set_title(JKQTPgraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+lname); - - // add the graph to the plot, so it is actually displayed - plot.addGraph(graph); - - ipen++; - if (ipen>=pens.size()) ipen=0; - } - - // 4. autoscale the plot so the graph is contained - plot.zoomToFit(); - - // 5. show plotter and make it a decent size - plot.show(); - plot.resize(800,600); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplottertools/jkqtptools.h" + + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) + JKQtPlotter plot; + JKQTPdatastore* ds=plot.getDatastore(); + + // 2. now we create data a vector of x-values for a simple plot (a sine curve) + QVector X; + const int Ndata=10; // number of plot points in each curve + for (int i=0; iaddCopiedColumn(X, "x"); + + + // 3. now we make several plots with different symbol styles and line-styles + // for that we iterate over every symbol style and at the same time over + // pen styles from the vector pens + QVector pens {Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; + int ipen=0; + for (int symbolID=0; symbolID<=JKQTPmaxSymbolID; symbolID++) { + // generate some plot data + QVector Y; + for (auto& xx: X) { + Y<(symbolID)*1.5; + } + + JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); + + // copy data into datastore and immediately set the yColumn + graph->set_xColumn(columnX); + graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(symbolID))); + + // set symbol + pen style and color + graph->set_symbol(static_cast(symbolID)); + graph->set_style(pens[ipen]); + QString lname=JKQTP_QPenStyle2String(graph->get_style()); + graph->set_drawLine(static_cast(symbolID)!=JKQTPdot); + if (!graph->get_drawLine()) lname=""; + // set symbol size + graph->set_symbolSize(14); + // set width of symbol lines + graph->set_symbolWidth(1.5); + // set width of graph line + graph->set_lineWidth(1); + + // graph title is made from symbol+penstyle + graph->set_title(JKQTPgraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+lname); + + // add the graph to the plot, so it is actually displayed + plot.addGraph(graph); + + ipen++; + if (ipen>=pens.size()) ipen=0; + } + + // 4. autoscale the plot so the graph is contained + plot.zoomToFit(); + + // 5. show plotter and make it a decent size + plot.show(); + plot.resize(800,600); + + return app.exec(); +} diff --git a/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro similarity index 74% rename from test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro rename to examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro index c65c02f88d..c58c47de10 100644 --- a/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro +++ b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro @@ -1,23 +1,27 @@ -# source code for this simple demo -SOURCES = jkqtplotter_simpletest_symbols_and_styles.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = jkqtplotter_simpletest_symbols_and_styles - - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -win32-msvc*: DEFINES += _USE_MATH_DEFINES - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = jkqtplotter_simpletest_symbols_and_styles.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = jkqtplotter_simpletest_symbols_and_styles + + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +win32-msvc*: DEFINES += _USE_MATH_DEFINES + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles_and_lib.pro b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles_and_lib.pro similarity index 97% rename from test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles_and_lib.pro rename to examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles_and_lib.pro index ac08c14443..b1b2981bcf 100644 --- a/test/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles_and_lib.pro +++ b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_symbols_and_styles - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -jkqtplotter_simpletest_symbols_and_styles.file=$$PWD/jkqtplotter_simpletest_symbols_and_styles.pro -jkqtplotter_simpletest_symbols_and_styles.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_symbols_and_styles + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +jkqtplotter_simpletest_symbols_and_styles.file=$$PWD/jkqtplotter_simpletest_symbols_and_styles.pro +jkqtplotter_simpletest_symbols_and_styles.depends = jkqtplotterlib diff --git a/test/test_multiplot/README.md b/examples/test_multiplot/README.md similarity index 91% rename from test/test_multiplot/README.md rename to examples/test_multiplot/README.md index 4e341b81e8..d670005e7e 100644 --- a/test/test_multiplot/README.md +++ b/examples/test_multiplot/README.md @@ -1,108 +1,108 @@ -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) - -# JKQtPlotter - -## Layouting Several Plots -This project (see `./test/test_multiplot/`) shows how several JKQtPlotter widgets can be combined to in a layout (based on the [Qt layouting system](http://doc.qt.io/qt-5/layout.html)). It also shows how axes in such a layout can be linked to improve user experience. - -The source code of the main application can be found in [`test_multiplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/test_multiplot/test_multiplot.cpp). - -First three plots are generated and put into a [QGridLayout](http://doc.qt.io/qt-5/qgridlayout.html): - -```c++ -// 1. create a widget - QWidget mainWidget; - mainWidget.setWindowTitle("JKQtPlotter(s) in a QGridLayout"); - - // 2. Create a QGridLayout for the plots and add it to the widget. - QGridLayout* layout=new QGridLayout(); - mainWidget.setLayout(layout); - - // 3.1 create a main plotter widget and add it to the layout - JKQtPlotter* plotMain=new JKQtPlotter(&mainWidget); - layout->addWidget(plotMain, 0,0); - JKQTPdatastore* ds=plotMain->getDatastore(); - - // 3.2 create a second and third plotter widget and add them to the - // layout below and at the bottom right of the plotMain. - // Also configure it to use the same datastore as plotMain - JKQtPlotter* plotResid=new JKQtPlotter(false, &mainWidget, ds); - layout->addWidget(plotResid, 1,0); - JKQtPlotter* plotResidHist=new JKQtPlotter(false, &mainWidget, ds); - layout->addWidget(plotResidHist, 1,1); - - // 3.3 set relative sizes of the plots via the layout (small plots have 1/3 the width and height of the large plot - layout->setRowStretch(0,3); - layout->setRowStretch(1,1); - layout->setColumnStretch(0,3); - layout->setColumnStretch(1,1); -``` - -With this simple setup, all three plots would be arranged by the QLayout, but they were all independent. This example could be part of a data fitting application, where the main plot shows data and a fit curve. A plot below that will display the residulas (errors) of the fit. Now if a user zooms one of the plots, he would expect that athe x-axes of the two plots are synchronized. The same for a third plot on the rhs of the residuals, which will show a residual histogram. This linking of the axes can be achieved by the following code: - -```c++ - // 3.4 synchronize width/x-axis of plotResid to width/x-axis of plotMain - plotResid->get_plotter()->synchronizeToMaster(plotMain->get_plotter(), true, false, true, true); - - // 3.5 synchronize y-axis of width/plotResidHist to y-axis of width/plotResid - plotResidHist->get_plotter()->synchronizeToMaster(plotResid->get_plotter(), false, true, true, true); -``` - -Finally: When printing or saving an image of the plots, the plotter will no know anything about the arrangement of the plots and the plots cannot be printed/drawn in the same arrangement as in the window. If you want to arrange the plots in the same layout in a printout, as in the window, you will have to tell the main plot, in which arrangement to print the plots: - -```c++ - // 3.6 ensure that the plot are printed/exported in whole, when printing in plotMain - plotMain->get_plotter()->set_gridPrinting(true); - plotMain->get_plotter()->addGridPrintingPlotter(0,1,plotResid->get_plotter()); - plotMain->get_plotter()->addGridPrintingPlotter(1,1,plotResidHist->get_plotter()); -``` - -In the first line, grid-printing (i.e. the layouted printing of several graphs) is activated. Then the arrangement of the two slave plots `plotResid` and `plotResidHist` is defined as (`x,y`)-shifts with respect to the master plot `plotMain`. - -Now some data is generated and several curves are added to the graphs. See [`test_multiplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/test_multiplot/test_multiplot.cpp) for the full source code. - -Finally the axes and plots need a bit of formatting to make them look nicer: - -```c++ - // 6.1 axis labels, distributed over the several plots - plotMain->get_yAxis()->set_axisLabel("y axis"); - plotResid->get_xAxis()->set_axisLabel("x axis"); - plotResid->get_yAxis()->set_axisLabel("residuals"); - plotResidHist->get_xAxis()->set_axisLabel("frequency"); - // 6.2 switch off the tick labels on the axes that directly face another plot - plotMain->get_xAxis()->set_drawMode1(JKQTPCADMticks); - plotResidHist->get_yAxis()->set_drawMode1(JKQTPCADMticks); - // 6.3 show tick labels on the rhs y-axis of the residual histogram plot - plotResidHist->get_yAxis()->set_drawMode2(JKQTPCADMticksAndLabels); - // 6.4 hide keys in all plots but the main plot - plotResid->get_plotter()->set_showKey(false); - plotResidHist->get_plotter()->set_showKey(false); - // 6.5 hide position label and toolbars in the plots except main plot - plotResid->set_displayToolbar(false); - plotResid->set_displayMousePosition(false); - plotResidHist->set_displayToolbar(false); - plotResidHist->set_displayMousePosition(false); - plotMain->set_toolbarAlwaysOn(true); -``` - -As a last step, the axes are scaled automatically, so the data fills the plots: - -```c++ - // 7. scale plots automatically to data - plotResid->zoomToFit(); - plotResidHist->zoomToFit(); - plotMain->zoomToFit(); -``` - -The result looks like this: - -![test_multiplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/test_multiplot.png) - -You push the print button (![test_multiplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/lib/jkqtplotterressources/images/jkqtp_24_print.png)) to open a print preview dialog, which will give an impression of how the three plots will be arranged in a printout: - -![test_multiplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/test_multiplot_printpreview.png) - - - - -[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) + +# JKQtPlotter + +## Layouting Several Plots +This project (see `./examples/test_multiplot/`) shows how several JKQtPlotter widgets can be combined to in a layout (based on the [Qt layouting system](http://doc.qt.io/qt-5/layout.html)). It also shows how axes in such a layout can be linked to improve user experience. + +The source code of the main application can be found in [`test_multiplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/test_multiplot/test_multiplot.cpp). + +First three plots are generated and put into a [QGridLayout](http://doc.qt.io/qt-5/qgridlayout.html): + +```c++ +// 1. create a widget + QWidget mainWidget; + mainWidget.setWindowTitle("JKQtPlotter(s) in a QGridLayout"); + + // 2. Create a QGridLayout for the plots and add it to the widget. + QGridLayout* layout=new QGridLayout(); + mainWidget.setLayout(layout); + + // 3.1 create a main plotter widget and add it to the layout + JKQtPlotter* plotMain=new JKQtPlotter(&mainWidget); + layout->addWidget(plotMain, 0,0); + JKQTPdatastore* ds=plotMain->getDatastore(); + + // 3.2 create a second and third plotter widget and add them to the + // layout below and at the bottom right of the plotMain. + // Also configure it to use the same datastore as plotMain + JKQtPlotter* plotResid=new JKQtPlotter(false, &mainWidget, ds); + layout->addWidget(plotResid, 1,0); + JKQtPlotter* plotResidHist=new JKQtPlotter(false, &mainWidget, ds); + layout->addWidget(plotResidHist, 1,1); + + // 3.3 set relative sizes of the plots via the layout (small plots have 1/3 the width and height of the large plot + layout->setRowStretch(0,3); + layout->setRowStretch(1,1); + layout->setColumnStretch(0,3); + layout->setColumnStretch(1,1); +``` + +With this simple setup, all three plots would be arranged by the QLayout, but they were all independent. This example could be part of a data fitting application, where the main plot shows data and a fit curve. A plot below that will display the residulas (errors) of the fit. Now if a user zooms one of the plots, he would expect that athe x-axes of the two plots are synchronized. The same for a third plot on the rhs of the residuals, which will show a residual histogram. This linking of the axes can be achieved by the following code: + +```c++ + // 3.4 synchronize width/x-axis of plotResid to width/x-axis of plotMain + plotResid->get_plotter()->synchronizeToMaster(plotMain->get_plotter(), true, false, true, true); + + // 3.5 synchronize y-axis of width/plotResidHist to y-axis of width/plotResid + plotResidHist->get_plotter()->synchronizeToMaster(plotResid->get_plotter(), false, true, true, true); +``` + +Finally: When printing or saving an image of the plots, the plotter will no know anything about the arrangement of the plots and the plots cannot be printed/drawn in the same arrangement as in the window. If you want to arrange the plots in the same layout in a printout, as in the window, you will have to tell the main plot, in which arrangement to print the plots: + +```c++ + // 3.6 ensure that the plot are printed/exported in whole, when printing in plotMain + plotMain->get_plotter()->set_gridPrinting(true); + plotMain->get_plotter()->addGridPrintingPlotter(0,1,plotResid->get_plotter()); + plotMain->get_plotter()->addGridPrintingPlotter(1,1,plotResidHist->get_plotter()); +``` + +In the first line, grid-printing (i.e. the layouted printing of several graphs) is activated. Then the arrangement of the two slave plots `plotResid` and `plotResidHist` is defined as (`x,y`)-shifts with respect to the master plot `plotMain`. + +Now some data is generated and several curves are added to the graphs. See [`test_multiplot.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/examples/test_multiplot/test_multiplot.cpp) for the full source code. + +Finally the axes and plots need a bit of formatting to make them look nicer: + +```c++ + // 6.1 axis labels, distributed over the several plots + plotMain->get_yAxis()->set_axisLabel("y axis"); + plotResid->get_xAxis()->set_axisLabel("x axis"); + plotResid->get_yAxis()->set_axisLabel("residuals"); + plotResidHist->get_xAxis()->set_axisLabel("frequency"); + // 6.2 switch off the tick labels on the axes that directly face another plot + plotMain->get_xAxis()->set_drawMode1(JKQTPCADMticks); + plotResidHist->get_yAxis()->set_drawMode1(JKQTPCADMticks); + // 6.3 show tick labels on the rhs y-axis of the residual histogram plot + plotResidHist->get_yAxis()->set_drawMode2(JKQTPCADMticksAndLabels); + // 6.4 hide keys in all plots but the main plot + plotResid->get_plotter()->set_showKey(false); + plotResidHist->get_plotter()->set_showKey(false); + // 6.5 hide position label and toolbars in the plots except main plot + plotResid->set_displayToolbar(false); + plotResid->set_displayMousePosition(false); + plotResidHist->set_displayToolbar(false); + plotResidHist->set_displayMousePosition(false); + plotMain->set_toolbarAlwaysOn(true); +``` + +As a last step, the axes are scaled automatically, so the data fills the plots: + +```c++ + // 7. scale plots automatically to data + plotResid->zoomToFit(); + plotResidHist->zoomToFit(); + plotMain->zoomToFit(); +``` + +The result looks like this: + +![test_multiplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/test_multiplot.png) + +You push the print button (![test_multiplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/lib/jkqtplotterressources/images/jkqtp_24_print.png)) to open a print preview dialog, which will give an impression of how the three plots will be arranged in a printout: + +![test_multiplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/test_multiplot_printpreview.png) + + + + +[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/) diff --git a/test/test_multiplot/test_multiplot.cpp b/examples/test_multiplot/test_multiplot.cpp similarity index 97% rename from test/test_multiplot/test_multiplot.cpp rename to examples/test_multiplot/test_multiplot.cpp index 0fe158b0d1..0cd9456822 100644 --- a/test/test_multiplot/test_multiplot.cpp +++ b/examples/test_multiplot/test_multiplot.cpp @@ -1,153 +1,153 @@ -#include -#include "jkqtplotter/jkqtplotter.h" -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplotter/jkqtpgraphsparsedfunction.h" -#include "jkqtplotter/jkqtpgraphsbarchart.h" -#include -#include - -int main(int argc, char* argv[]) -{ - QApplication app(argc, argv); - - // 1. create a widget - QWidget mainWidget; - mainWidget.setWindowTitle("JKQtPlotter(s) in a QGridLayout"); - - // 2. Create a QGridLayout for the plots and add it to the widget. - QGridLayout* layout=new QGridLayout(); - mainWidget.setLayout(layout); - - // 3.1 create a main plotter widget and add it to the layout - JKQtPlotter* plotMain=new JKQtPlotter(&mainWidget); - layout->addWidget(plotMain, 0,0); - JKQTPdatastore* ds=plotMain->getDatastore(); - - // 3.2 create a second and third plotter widget and add them to the - // layout below and at the bottom right of the plotMain. - // Also configure it to use the same datastore as plotMain - JKQtPlotter* plotResid=new JKQtPlotter(false, &mainWidget, ds); - layout->addWidget(plotResid, 1,0); - JKQtPlotter* plotResidHist=new JKQtPlotter(false, &mainWidget, ds); - layout->addWidget(plotResidHist, 1,1); - - // 3.3 synchronize width/x-axis of plotResid to width/x-axis of plotMain - plotResid->get_plotter()->synchronizeToMaster(plotMain->get_plotter(), true, false, true, true); - - // 3.4 synchronize y-axis of width/plotResidHist to y-axis of width/plotResid - plotResidHist->get_plotter()->synchronizeToMaster(plotResid->get_plotter(), false, true, true, true); - - // 3.5 ensure that the plot are printed/exported in whole, when printing in plotMain - plotMain->get_plotter()->set_gridPrinting(true); - plotMain->get_plotter()->addGridPrintingPlotter(0,1,plotResid->get_plotter()); - plotMain->get_plotter()->addGridPrintingPlotter(1,1,plotResidHist->get_plotter()); - - // 3.6 set relative sizes of the plots via the layout (small plots have 1/3 the width and height of the large plot - layout->setRowStretch(0,3); - layout->setRowStretch(1,1); - layout->setColumnStretch(0,3); - layout->setColumnStretch(1,1); - - - - // 4. now we create some (artificial) data: - // - in plotMain we show an exponential curve and and some datapoints - // - in plotResid we show the residuals, i.e. the difference between the curve and the datapoints - // - in plotResidHist we will show a histogram of the residuals (calculated in histogram) - std::random_device rd; - std::mt19937 gen(rd()); - std::normal_distribution<> d(0,0.5); - - std::vector dataX, dataY, dataRY; - std::map histogram; - const int Ndata=60; - for(int n=0; n(Ndata)*static_cast(n)-0.5; - const double y=2.0*(1.0+cos(x)); - const double yd=y+d(gen); - dataX.push_back(x); - dataY.push_back(yd); - dataRY.push_back(y-yd); - // calculate a simple type of histogram in a std:map, bins are 1/4=0.25 wide - const double hbin=std::round((y-yd)*4.0)/4.0; - if (histogram.find(hbin)==histogram.end()) { - histogram[hbin]=0; - } else { - histogram[hbin]++; - } - } - - // 5. and add the data to the datastore - size_t cX=ds->addCopiedColumn(dataX, "dataX"); - size_t cY=ds->addCopiedColumn(dataY, "dataY"); - size_t cRY=ds->addCopiedColumn(dataRY, "residY"); - std::pair cH=ds->addCopiedMap(histogram, "histX", "histY"); - - // 5.1 plot of the data - JKQTPxyLineGraph* graphD=new JKQTPxyLineGraph(plotMain); - graphD->set_xColumn(cX); - graphD->set_yColumn(cY); - graphD->set_drawLine(false); - graphD->set_symbol(JKQTPcross); - graphD->set_symbolSize(10); - graphD->set_title("measurement data"); - plotMain->addGraph(graphD); - - // 5.2 plot of the graph as an interpreted function, set as string "2*(1+cos(x))" - JKQTPxParsedFunctionLineGraph* graphFit=new JKQTPxParsedFunctionLineGraph(plotMain); - graphFit->set_function("2*(1+cos(x))"); - graphFit->set_title("fit"); - plotMain->addGraph(graphFit); - - // 5.3 residuals plot - JKQTPxyLineGraph* graphResid=new JKQTPxyLineGraph(plotResid); - graphResid->set_xColumn(cX); - graphResid->set_yColumn(cRY); - graphResid->set_drawLine(false); - graphResid->set_symbol(JKQTPplus); - graphResid->set_symbolSize(10); - graphResid->set_drawLine(true); - graphResid->set_lineWidth(0.5); - graphResid->set_title("residuals"); - plotResid->addGraph(graphResid); - - // 5.3 residual histogram plot - JKQTPbarHorizontalGraph* graphResidHist=new JKQTPbarHorizontalGraph(plotResidHist); - graphResidHist->set_xColumn(cH.second); - graphResidHist->set_yColumn(cH.first); - graphResidHist->set_title("histogram"); - plotResidHist->addGraph(graphResidHist); - - // 6.1 axis labels, distributed over the several plots - plotMain->get_yAxis()->set_axisLabel("y axis"); - plotResid->get_xAxis()->set_axisLabel("x axis"); - plotResid->get_yAxis()->set_axisLabel("residuals"); - plotResidHist->get_xAxis()->set_axisLabel("frequency"); - // 6.2 switch off the tick labels on the axes that directly face another plot - plotMain->get_xAxis()->set_drawMode1(JKQTPCADMticks); - plotResidHist->get_yAxis()->set_drawMode1(JKQTPCADMticks); - // 6.3 show tick labels on the rhs y-axis of the residual histogram plot - plotResidHist->get_yAxis()->set_drawMode2(JKQTPCADMticksAndLabels); - // 6.4 hide keys in all plots but the main plot - plotResid->get_plotter()->set_showKey(false); - plotResidHist->get_plotter()->set_showKey(false); - // 6.5 hide position label and toolbars in the plots except main plot - plotResid->set_displayToolbar(false); - plotResid->set_displayMousePosition(false); - plotResidHist->set_displayToolbar(false); - plotResidHist->set_displayMousePosition(false); - plotMain->set_toolbarAlwaysOn(true); - - - // 7. scale plots automatically to data - plotResid->zoomToFit(); - plotResidHist->zoomToFit(); - plotMain->zoomToFit(); - - // 8. show plotter and make it a decent size - mainWidget.show(); - mainWidget.move(32,32); - mainWidget.resize(800,600); - - return app.exec(); -} +#include +#include "jkqtplotter/jkqtplotter.h" +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplotter/jkqtpgraphsparsedfunction.h" +#include "jkqtplotter/jkqtpgraphsbarchart.h" +#include +#include + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + + // 1. create a widget + QWidget mainWidget; + mainWidget.setWindowTitle("JKQtPlotter(s) in a QGridLayout"); + + // 2. Create a QGridLayout for the plots and add it to the widget. + QGridLayout* layout=new QGridLayout(); + mainWidget.setLayout(layout); + + // 3.1 create a main plotter widget and add it to the layout + JKQtPlotter* plotMain=new JKQtPlotter(&mainWidget); + layout->addWidget(plotMain, 0,0); + JKQTPdatastore* ds=plotMain->getDatastore(); + + // 3.2 create a second and third plotter widget and add them to the + // layout below and at the bottom right of the plotMain. + // Also configure it to use the same datastore as plotMain + JKQtPlotter* plotResid=new JKQtPlotter(false, &mainWidget, ds); + layout->addWidget(plotResid, 1,0); + JKQtPlotter* plotResidHist=new JKQtPlotter(false, &mainWidget, ds); + layout->addWidget(plotResidHist, 1,1); + + // 3.3 synchronize width/x-axis of plotResid to width/x-axis of plotMain + plotResid->get_plotter()->synchronizeToMaster(plotMain->get_plotter(), true, false, true, true); + + // 3.4 synchronize y-axis of width/plotResidHist to y-axis of width/plotResid + plotResidHist->get_plotter()->synchronizeToMaster(plotResid->get_plotter(), false, true, true, true); + + // 3.5 ensure that the plot are printed/exported in whole, when printing in plotMain + plotMain->get_plotter()->set_gridPrinting(true); + plotMain->get_plotter()->addGridPrintingPlotter(0,1,plotResid->get_plotter()); + plotMain->get_plotter()->addGridPrintingPlotter(1,1,plotResidHist->get_plotter()); + + // 3.6 set relative sizes of the plots via the layout (small plots have 1/3 the width and height of the large plot + layout->setRowStretch(0,3); + layout->setRowStretch(1,1); + layout->setColumnStretch(0,3); + layout->setColumnStretch(1,1); + + + + // 4. now we create some (artificial) data: + // - in plotMain we show an exponential curve and and some datapoints + // - in plotResid we show the residuals, i.e. the difference between the curve and the datapoints + // - in plotResidHist we will show a histogram of the residuals (calculated in histogram) + std::random_device rd; + std::mt19937 gen(rd()); + std::normal_distribution<> d(0,0.5); + + std::vector dataX, dataY, dataRY; + std::map histogram; + const int Ndata=60; + for(int n=0; n(Ndata)*static_cast(n)-0.5; + const double y=2.0*(1.0+cos(x)); + const double yd=y+d(gen); + dataX.push_back(x); + dataY.push_back(yd); + dataRY.push_back(y-yd); + // calculate a simple type of histogram in a std:map, bins are 1/4=0.25 wide + const double hbin=std::round((y-yd)*4.0)/4.0; + if (histogram.find(hbin)==histogram.end()) { + histogram[hbin]=0; + } else { + histogram[hbin]++; + } + } + + // 5. and add the data to the datastore + size_t cX=ds->addCopiedColumn(dataX, "dataX"); + size_t cY=ds->addCopiedColumn(dataY, "dataY"); + size_t cRY=ds->addCopiedColumn(dataRY, "residY"); + std::pair cH=ds->addCopiedMap(histogram, "histX", "histY"); + + // 5.1 plot of the data + JKQTPxyLineGraph* graphD=new JKQTPxyLineGraph(plotMain); + graphD->set_xColumn(cX); + graphD->set_yColumn(cY); + graphD->set_drawLine(false); + graphD->set_symbol(JKQTPcross); + graphD->set_symbolSize(10); + graphD->set_title("measurement data"); + plotMain->addGraph(graphD); + + // 5.2 plot of the graph as an interpreted function, set as string "2*(1+cos(x))" + JKQTPxParsedFunctionLineGraph* graphFit=new JKQTPxParsedFunctionLineGraph(plotMain); + graphFit->set_function("2*(1+cos(x))"); + graphFit->set_title("fit"); + plotMain->addGraph(graphFit); + + // 5.3 residuals plot + JKQTPxyLineGraph* graphResid=new JKQTPxyLineGraph(plotResid); + graphResid->set_xColumn(cX); + graphResid->set_yColumn(cRY); + graphResid->set_drawLine(false); + graphResid->set_symbol(JKQTPplus); + graphResid->set_symbolSize(10); + graphResid->set_drawLine(true); + graphResid->set_lineWidth(0.5); + graphResid->set_title("residuals"); + plotResid->addGraph(graphResid); + + // 5.3 residual histogram plot + JKQTPbarHorizontalGraph* graphResidHist=new JKQTPbarHorizontalGraph(plotResidHist); + graphResidHist->set_xColumn(cH.second); + graphResidHist->set_yColumn(cH.first); + graphResidHist->set_title("histogram"); + plotResidHist->addGraph(graphResidHist); + + // 6.1 axis labels, distributed over the several plots + plotMain->get_yAxis()->set_axisLabel("y axis"); + plotResid->get_xAxis()->set_axisLabel("x axis"); + plotResid->get_yAxis()->set_axisLabel("residuals"); + plotResidHist->get_xAxis()->set_axisLabel("frequency"); + // 6.2 switch off the tick labels on the axes that directly face another plot + plotMain->get_xAxis()->set_drawMode1(JKQTPCADMticks); + plotResidHist->get_yAxis()->set_drawMode1(JKQTPCADMticks); + // 6.3 show tick labels on the rhs y-axis of the residual histogram plot + plotResidHist->get_yAxis()->set_drawMode2(JKQTPCADMticksAndLabels); + // 6.4 hide keys in all plots but the main plot + plotResid->get_plotter()->set_showKey(false); + plotResidHist->get_plotter()->set_showKey(false); + // 6.5 hide position label and toolbars in the plots except main plot + plotResid->set_displayToolbar(false); + plotResid->set_displayMousePosition(false); + plotResidHist->set_displayToolbar(false); + plotResidHist->set_displayMousePosition(false); + plotMain->set_toolbarAlwaysOn(true); + + + // 7. scale plots automatically to data + plotResid->zoomToFit(); + plotResidHist->zoomToFit(); + plotMain->zoomToFit(); + + // 8. show plotter and make it a decent size + mainWidget.show(); + mainWidget.move(32,32); + mainWidget.resize(800,600); + + return app.exec(); +} diff --git a/test/test_multiplot/test_multiplot.pro b/examples/test_multiplot/test_multiplot.pro similarity index 71% rename from test/test_multiplot/test_multiplot.pro rename to examples/test_multiplot/test_multiplot.pro index 2598064980..445bb1fa07 100644 --- a/test/test_multiplot/test_multiplot.pro +++ b/examples/test_multiplot/test_multiplot.pro @@ -1,23 +1,27 @@ -# source code for this simple demo -SOURCES = test_multiplot.cpp - -# configure Qt -CONFIG += qt -QT += core gui xml svg -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - -# output executable name -TARGET = test_multiplot - - -# include JKQtPlotter source code -DEPENDPATH += . ../../lib -INCLUDEPATH += ../../lib -CONFIG (debug, debug|release):LIBS += -L../../lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L../../lib/release -ljkqtplotterlib - -win32-msvc*: DEFINES += _USE_MATH_DEFINES - -# here you can activate some debug options -#DEFINES += SHOW_JKQTPLOTTER_DEBUG -#DEFINES += JKQTBP_AUTOTIMER +# source code for this simple demo +SOURCES = test_multiplot.cpp + +# configure Qt +CONFIG += qt +QT += core gui xml svg +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport + +# output executable name +TARGET = test_multiplot + + +# include JKQtPlotter source code +DEPENDPATH += . ../../lib +INCLUDEPATH += ../../lib +CONFIG (debug, debug|release) { + LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L../../staticlib/release -ljkqtplotterlib +} +message("LIBS = $$LIBS") + +win32-msvc*: DEFINES += _USE_MATH_DEFINES + +# here you can activate some debug options +#DEFINES += SHOW_JKQTPLOTTER_DEBUG +#DEFINES += JKQTBP_AUTOTIMER diff --git a/test/test_multiplot/test_multiplot_and_lib.pro b/examples/test_multiplot/test_multiplot_and_lib.pro similarity index 96% rename from test/test_multiplot/test_multiplot_and_lib.pro rename to examples/test_multiplot/test_multiplot_and_lib.pro index 83fc904dae..7eca887344 100644 --- a/test/test_multiplot/test_multiplot_and_lib.pro +++ b/examples/test_multiplot/test_multiplot_and_lib.pro @@ -1,8 +1,8 @@ -TEMPLATE = subdirs - -SUBDIRS += jkqtplotterlib test_multiplot - -jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro - -test_multiplot.file=$$PWD/test_multiplot.pro -test_multiplot.depends = jkqtplotterlib +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib test_multiplot + +jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro + +test_multiplot.file=$$PWD/test_multiplot.pro +test_multiplot.depends = jkqtplotterlib diff --git a/lib/README.md b/lib/README.md index 711f609f78..dc453b1014 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,24 +1,16 @@ # JKQtPlotter ## LIB subdirectory -This directory contains all files necessary to build a library with the JKQtPlotter and JKQtFastPlotter classes inside. There are several ways to add these to your program: +This directory contains all files that belong to the JKQtPlotter library (including the files of the JKQtFastPlotter and JKMathText). There are several ways to add these to your program: -### QMake -#### simply include all necessary files +### simply include all necessary files If you use QMake and simply want to include all necessary files into your project, include one of these `PRI`-files into your QMake Project: - `jkqtplotter.pri` contains all files in this library, including `JKQtFastPlotter` and `JKQtMathText` - `jkqtfastplotter.pri` contains only those files from this directory which are necessary to build `JKQtFastPlotter` - `jkqtmathtext.pri` contains only those files from this directory which are necessary to build `JKQtMathText` -#### Build (static) libraries -There are also `.PRO`-files with the same names as the `.PRI`-files above, that can be used to build the full library, or a limited subset. They will produce a static link library that you can include into your projects, e.g. with the following QMake-snippet: +### Build static libraries +In the directory [`../staticlib`](https://github.com/jkriege2/JKQtPlotter/tree/master/staticlib) you will find several Project files that build a static library of the full JKQtPlotter (including JKQtFastPlotter and JKMathText), or of subsets of this library. You can then link against these libs in your project. -```qmake -# include JKQtPlotter library -DEPENDPATH += . /lib -INCLUDEPATH += /lib -CONFIG (debug, debug|release):LIBS += -L/lib/debug -ljkqtplotterlib -CONFIG (release):LIBS += -L/lib/release -ljkqtplotterlib -``` - -This snippet assumes that you built the libraries with the provided `.PRO`-files. \ No newline at end of file +### Build shared libraries (DLLs, SOs, ...) +In the directory [`../sharedlib`](https://github.com/jkriege2/JKQtPlotter/tree/master/sharedlib) you will find several Project files that build a dynamic shared library of the full JKQtPlotter (including JKQtFastPlotter and JKMathText), or of subsets of this library. You can then link against these libs in your project. diff --git a/lib/jkqtfastplotterlib.pro b/lib/jkqtfastplotterlib.pro deleted file mode 100644 index 03aa4f4d89..0000000000 --- a/lib/jkqtfastplotterlib.pro +++ /dev/null @@ -1,6 +0,0 @@ -TARGET = jkqtfastplotterlib - -TEMPLATE = lib -CONFIG+=staticlib - -include(jkqtfastplotter.pri) diff --git a/lib/jkqtplotter.pri b/lib/jkqtplotter.pri index 403baf9df8..ba14c39fba 100644 --- a/lib/jkqtplotter.pri +++ b/lib/jkqtplotter.pri @@ -82,12 +82,8 @@ RESOURCES += $$PWD/jkqtplotterressources/jkqtpbaseplotter.qrc INCLUDEPATH += $$PWD QT += core gui xml svg opengl -#win32:LIBS += -lgdi32 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport include($$PWD/jkqtplotterressources/math_fonts/xits.pri) DEFINES += AUTOLOAD_XITS_FONTS DEFINES += USE_XITS_FONTS - -# for support of palettes stored as XML, use: -QT += xml diff --git a/lib/jkqtplotterlib.pro b/lib/jkqtplotterlib.pro deleted file mode 100644 index a8288a22f1..0000000000 --- a/lib/jkqtplotterlib.pro +++ /dev/null @@ -1,6 +0,0 @@ -TARGET = jkqtplotterlib - -TEMPLATE = lib -CONFIG+=staticlib - -include(jkqtplotter.pri) diff --git a/sharedlib/README.md b/sharedlib/README.md new file mode 100644 index 0000000000..6c01938523 --- /dev/null +++ b/sharedlib/README.md @@ -0,0 +1,22 @@ +# JKQtPlotter +## SHAREDLIB subdirectory + +This directory contains Projects that can be used to build a shared library of JKQtPlotter (i.e. the contents of the directory [`../lib`](https://github.com/jkriege2/JKQtPlotter/tree/master/lib) + +### QMake + +#### Build shared libraries +There are several `.PRO`-files, that can be used to build the full library, or a limited subsets. They will produce a dynamic link library that you can include into your projects, e.g. with the following QMake-snippet: + +```qmake +# include JKQtPlotter library +DEPENDPATH += . /lib +INCLUDEPATH += /lib +CONFIG (debug, debug|release) { + LIBS += -L/staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L/staticlib/release -ljkqtplotterlib +} +``` + +This snippet assumes that you built the libraries with the provided `.PRO`-files. \ No newline at end of file diff --git a/sharedlib/jkqtfastplotterlib_sharedlib.pro b/sharedlib/jkqtfastplotterlib_sharedlib.pro new file mode 100644 index 0000000000..cffd1d78a8 --- /dev/null +++ b/sharedlib/jkqtfastplotterlib_sharedlib.pro @@ -0,0 +1,7 @@ +TARGET = jkqtfastplotterlib +CONFIG (debug, debug|release): TARGET = jkqtfastplotterlib_debug + +TEMPLATE = lib +CONFIG+=dll + +include(../lib/jkqtfastplotter.pri) diff --git a/sharedlib/jkqtmathtextlib_sharedlib.pro b/sharedlib/jkqtmathtextlib_sharedlib.pro new file mode 100644 index 0000000000..aefe7001ab --- /dev/null +++ b/sharedlib/jkqtmathtextlib_sharedlib.pro @@ -0,0 +1,7 @@ +TARGET = jkqtmathtextlib +CONFIG (debug, debug|release): TARGET = jkqtmathtextlib_debug + +TEMPLATE = lib +CONFIG+=dll + +include(../lib/jkqtmathtext.pri) diff --git a/sharedlib/jkqtplotterlib_sharedlib.pro b/sharedlib/jkqtplotterlib_sharedlib.pro new file mode 100644 index 0000000000..c47edb64a1 --- /dev/null +++ b/sharedlib/jkqtplotterlib_sharedlib.pro @@ -0,0 +1,7 @@ +TARGET = jkqtplotterlib +CONFIG (debug, debug|release): TARGET = jkqtplotterlib_debug + +TEMPLATE = lib +CONFIG += dll + +include(../lib/jkqtplotter.pri) diff --git a/staticlib/README.md b/staticlib/README.md new file mode 100644 index 0000000000..e2d374af73 --- /dev/null +++ b/staticlib/README.md @@ -0,0 +1,22 @@ +# JKQtPlotter +## STATICLIB subdirectory + +This directory contains Projects that can be used to build a static library of JKQtPlotter (i.e. the contents of the directory [`../lib`](https://github.com/jkriege2/JKQtPlotter/tree/master/lib) + +### QMake + +#### Build shared libraries +There are several `.PRO`-files, that can be used to build the full library, or a limited subsets. They will produce a static link libraries that you can include into your projects, e.g. with the following QMake-snippet: + +```qmake +# include JKQtPlotter library +DEPENDPATH += . /lib +INCLUDEPATH += /lib +CONFIG (debug, debug|release) { + LIBS += -L/staticlib/debug -ljkqtplotterlib_debug +} else { + LIBS += -L/staticlib/release -ljkqtplotterlib +} +``` + +This snippet assumes that you built the libraries with the provided `.PRO`-files. \ No newline at end of file diff --git a/staticlib/jkqtfastplotterlib.pro b/staticlib/jkqtfastplotterlib.pro new file mode 100644 index 0000000000..cffd1d78a8 --- /dev/null +++ b/staticlib/jkqtfastplotterlib.pro @@ -0,0 +1,7 @@ +TARGET = jkqtfastplotterlib +CONFIG (debug, debug|release): TARGET = jkqtfastplotterlib_debug + +TEMPLATE = lib +CONFIG+=dll + +include(../lib/jkqtfastplotter.pri) diff --git a/staticlib/jkqtmathtextlib.pro b/staticlib/jkqtmathtextlib.pro new file mode 100644 index 0000000000..aefe7001ab --- /dev/null +++ b/staticlib/jkqtmathtextlib.pro @@ -0,0 +1,7 @@ +TARGET = jkqtmathtextlib +CONFIG (debug, debug|release): TARGET = jkqtmathtextlib_debug + +TEMPLATE = lib +CONFIG+=dll + +include(../lib/jkqtmathtext.pri) diff --git a/staticlib/jkqtplotterlib.pro b/staticlib/jkqtplotterlib.pro new file mode 100644 index 0000000000..c47edb64a1 --- /dev/null +++ b/staticlib/jkqtplotterlib.pro @@ -0,0 +1,7 @@ +TARGET = jkqtplotterlib +CONFIG (debug, debug|release): TARGET = jkqtplotterlib_debug + +TEMPLATE = lib +CONFIG += dll + +include(../lib/jkqtplotter.pri)