From 6cc08c2041aff26d97d0a7b267345f2c11cf924c Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Sat, 10 Sep 2022 22:35:30 +0200 Subject: [PATCH] JKQTPlotter: NEW: added new error indicator styles JKQTPErrorHalfBarsOutwards, JKQTPErrorHalfBarsInwards, JKQTPErrorHalfBarsAbove, JKQTPErrorHalfBarsBelow which are especially useful for barcharts JKQTPlotter: added example for barcharts with errorbars --- doc/dox/examples_and_tutorials.dox | 8 +- doc/dox/whatsnew.dox | 1 + doc/images/JKQTPBarHorizontalErrorGraph.png | Bin 0 -> 16502 bytes .../JKQTPBarHorizontalErrorGraph_small.png | Bin 0 -> 11305 bytes doc/images/JKQTPBarVerticalErrorGraph.png | Bin 0 -> 17455 bytes .../JKQTPBarVerticalErrorGraph_small.png | Bin 0 -> 11303 bytes doc/images/plot_bargraphhorploterr.png | Bin 14603 -> 0 bytes doc/images/plot_bargraphverploterr.png | Bin 22480 -> 0 bytes examples/CMakeLists.txt | 2 + examples/barchart_errorbars/CMakeLists.txt | 34 ++++ examples/barchart_errorbars/README.md | 62 +++++++ .../barchart_errorbars/barchart_errorbars.cpp | 77 +++++++++ lib/jkqtplotter/graphs/jkqtpbarchart.cpp | 109 ++++++++++-- lib/jkqtplotter/graphs/jkqtpbarchart.h | 22 ++- lib/jkqtplotter/jkqtpgraphsbaseerrors.cpp | 155 ++++++++++++------ lib/jkqtplotter/jkqtptools.cpp | 8 + lib/jkqtplotter/jkqtptools.h | 4 + screenshots/barchart_errorbars.png | Bin 0 -> 26843 bytes screenshots/barchart_errorbars_hor.png | Bin 0 -> 25383 bytes screenshots/barchart_errorbars_hor_small.png | Bin 0 -> 11305 bytes screenshots/barchart_errorbars_small.png | Bin 0 -> 11303 bytes 21 files changed, 418 insertions(+), 64 deletions(-) create mode 100644 doc/images/JKQTPBarHorizontalErrorGraph.png create mode 100644 doc/images/JKQTPBarHorizontalErrorGraph_small.png create mode 100644 doc/images/JKQTPBarVerticalErrorGraph.png create mode 100644 doc/images/JKQTPBarVerticalErrorGraph_small.png delete mode 100644 doc/images/plot_bargraphhorploterr.png delete mode 100644 doc/images/plot_bargraphverploterr.png create mode 100644 examples/barchart_errorbars/CMakeLists.txt create mode 100644 examples/barchart_errorbars/README.md create mode 100644 examples/barchart_errorbars/barchart_errorbars.cpp create mode 100644 screenshots/barchart_errorbars.png create mode 100644 screenshots/barchart_errorbars_hor.png create mode 100644 screenshots/barchart_errorbars_hor_small.png create mode 100644 screenshots/barchart_errorbars_small.png diff --git a/doc/dox/examples_and_tutorials.dox b/doc/dox/examples_and_tutorials.dox index 8f860e4c07..099a8fdb88 100644 --- a/doc/dox/examples_and_tutorials.dox +++ b/doc/dox/examples_and_tutorials.dox @@ -40,9 +40,12 @@ All test-projects are Qt-projects that use qmake to build. You can load them int \image html barchart_small.png \subpage JKQTPlotterBarcharts `JKQTPBarVerticalGraph`
C-style arrays of data + \image html barchart_errorbars_small.png + \subpage JKQTPlotterBarchartsErrorBars + `JKQTPBarVerticalErrorGraph`
JKQTPDatastore::addColumnCalculatedFromColumn() \image html barchart_twocolor_small.png \subpage JKQTPlotterBarchartsTwoColorFilling - `JKQTPBarVerticalGraph`
+ `JKQTPBarVerticalGraph`
JKQTPDatastore::addColumnCalculatedFromColumn() \image html stackedbars_small.png \subpage JKQTPlotterStackedBarChart `JKQTPBarVerticalStackableGraph`, `JKQTPBarHorizontalStackableGraph`
C++-style vectors of data @@ -52,6 +55,9 @@ All test-projects are Qt-projects that use qmake to build. You can load them int \image html wiggleplots_small.png \subpage JKQTPlotterWigglePlots `JKQTPFilledCurveXGraph`/`JKQTPFilledCurveYGraph`
setting/altering data in `JKQTPDatstore` directly
data-depentend coloring
random-walks
seismographic data + \image html filledgraphs_errors_small.png + \subpage JKQTPlotterFilledGraphsErrorBars + `JKQTPFilledCurveXErrorGraph`/`JKQTPFilledCurveYErrorGraph` \image html impulsesplot_small.png \subpage JKQTPlotterImpulsePlots `JKQTPImpulsesVerticalGraph` and `JKQTPImpulsesHorizontalGraph`
C++-style QVector as plot data diff --git a/doc/dox/whatsnew.dox b/doc/dox/whatsnew.dox index 7661e8505f..332e2b52b0 100644 --- a/doc/dox/whatsnew.dox +++ b/doc/dox/whatsnew.dox @@ -48,6 +48,7 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
  • NEW: added property drawLineInForeground to JKQTPXYLineGraph and JKQTPXYParametrizedScatterGraph
  • NEW: added JKQTPXYGraph::setKeyColumn()/JKQTPXYGraph::getKeyColumn() and JKQTPXYGraph::setValueColumn()/JKQTPXYGraph::getValueColumn() and corresponding functions in other classes. In most graph classes they point to xColumn for key and yColumn for values. These functions are virtual and overwritten in derived classes with horizontally oriented graphs, where they point to yColumn for key and yColumn for value. This way you can write generic code with classes for both orientations.
  • NEW: barcharts (derived from JKQTPBarGraphBase) can be configured to use different fill styles above and below the baseline, see JKQTPBarGraphBase::FillMode
  • +
  • NEW: added new error indicator styles JKQTPErrorHalfBarsOutwards, JKQTPErrorHalfBarsInwards, JKQTPErrorHalfBarsAbove, JKQTPErrorHalfBarsBelow which are especially useful for barcharts
  • JKQTMathText: