From d2c2185f9ce7be910aa3b9c71db559db97f7977f Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Fri, 23 Sep 2022 20:43:53 +0200 Subject: [PATCH] IMPROVED/REWORKED: reworked JKQTPCADrawMode and coordinate axis drawing so the draw mide can be specified as ORed combination of flags from JKQTPCADrawModeElements, added flags to draw arrows at the end of the axis line IMPROVED/REWORKED: coordinate axis code was refactored NEW: all elements of a coordinate axis may have their own color now --- doc/CMakeLists.txt | 8 +- doc/dox/whatsnew.dox | 3 + doc/images/JKQTPBarHorizontalErrorGraph.png | Bin 16502 -> 15938 bytes .../JKQTPBarHorizontalErrorGraph_small.png | Bin 11305 -> 11280 bytes doc/images/JKQTPBarHorizontalGraph.png | Bin 14132 -> 13974 bytes ...JKQTPBarHorizontalGraphTwoColorFilling.png | Bin 13531 -> 12718 bytes ...arHorizontalGraphTwoColorFilling_small.png | Bin 9732 -> 9213 bytes doc/images/JKQTPBarHorizontalGraph_small.png | Bin 4655 -> 4528 bytes doc/images/JKQTPBarVerticalErrorGraph.png | Bin 17455 -> 16121 bytes .../JKQTPBarVerticalErrorGraph_small.png | Bin 11303 -> 10478 bytes doc/images/JKQTPBarVerticalGraph.png | Bin 14460 -> 15058 bytes .../JKQTPBarVerticalGraphTwoColorFilling.png | Bin 13910 -> 12841 bytes ...PBarVerticalGraphTwoColorFilling_small.png | Bin 9668 -> 9618 bytes doc/images/JKQTPBarVerticalGraph_small.png | Bin 4762 -> 4821 bytes doc/images/JKQTPCALTdate.png | Bin 3005 -> 0 bytes doc/images/JKQTPCALTdatetime.png | Bin 3238 -> 0 bytes doc/images/JKQTPCALTdefault.png | Bin 2085 -> 0 bytes doc/images/JKQTPCALTexponent.png | Bin 2267 -> 0 bytes doc/images/JKQTPCALTexponentCharacter.png | Bin 3538 -> 0 bytes doc/images/JKQTPCALTfrac.png | Bin 2040 -> 0 bytes doc/images/JKQTPCALTintfrac.png | Bin 2131 -> 0 bytes doc/images/JKQTPCALTintsfrac.png | Bin 2471 -> 0 bytes doc/images/JKQTPCALTintslashfrac.png | Bin 2328 -> 0 bytes doc/images/JKQTPCALTscientific.png | Bin 1936 -> 0 bytes doc/images/JKQTPCALTsfrac.png | Bin 2458 -> 0 bytes doc/images/JKQTPCALTslashfrac.png | Bin 2278 -> 0 bytes doc/images/JKQTPCALTtime.png | Bin 1893 -> 0 bytes doc/images/JKQTPColumnContourPlot.png | Bin 93938 -> 91254 bytes doc/images/JKQTPColumnContourPlot_small.png | Bin 23054 -> 22785 bytes doc/images/JKQTPFilledCurveXErrorGraph.png | Bin 34509 -> 33743 bytes .../JKQTPFilledCurveXErrorGraph_small.png | Bin 15371 -> 14885 bytes doc/images/JKQTPFilledCurveXGraph.png | Bin 23696 -> 23861 bytes doc/images/JKQTPFilledCurveXGraph_small.png | Bin 9625 -> 10481 bytes doc/images/JKQTPFilledCurveXGraph_wiggle.png | Bin 30138 -> 29341 bytes doc/images/JKQTPFilledCurveYErrorGraph.png | Bin 32248 -> 33949 bytes .../JKQTPFilledCurveYErrorGraph_small.png | Bin 14991 -> 14906 bytes doc/images/JKQTPFilledCurveYGraph.png | Bin 24525 -> 24075 bytes doc/images/JKQTPFilledCurveYGraph_small.png | Bin 12120 -> 11544 bytes doc/images/JKQTPFilledCurveYGraph_wiggle.png | Bin 46326 -> 45498 bytes doc/images/JKQTPXYFunctionLineGraph.png | Bin 159060 -> 155104 bytes doc/images/JKQTPXYFunctionLineGraph_small.png | Bin 17759 -> 17234 bytes doc/images/JKQTPXYLineGraph.png | Bin 30395 -> 30525 bytes doc/images/JKQTPXYLineGraph_small.png | Bin 14270 -> 13957 bytes doc/images/JKQTPXYScatterErrorGraph.png | Bin 25591 -> 25590 bytes doc/images/JKQTPXYScatterErrorGraph_small.png | Bin 10932 -> 10587 bytes doc/images/JKQTPXYScatterGraph.png | Bin 21509 -> 22009 bytes doc/images/JKQTPXYScatterGraph_small.png | Bin 11797 -> 11296 bytes doc/images/JKQTPbarHorizontalGraphStacked.png | Bin 18410 -> 18148 bytes .../JKQTPbarHorizontalGraphStacked_small.png | Bin 6156 -> 5992 bytes doc/images/JKQTPbarVerticalGraphStacked.png | Bin 18474 -> 17799 bytes .../JKQTPbarVerticalGraphStacked_small.png | Bin 6202 -> 6160 bytes doc/images/axisstyle/JKQTPCADMAxisLabel.png | Bin 0 -> 996 bytes doc/images/axisstyle/JKQTPCADMLine.png | Bin 0 -> 397 bytes doc/images/axisstyle/JKQTPCADMLineTicks.png | Bin 0 -> 436 bytes .../JKQTPCADMLineTicksTickLabels.png | Bin 0 -> 1118 bytes doc/images/axisstyle/JKQTPCADMMaxArrow.png | Bin 0 -> 894 bytes .../axisstyle/JKQTPCADMMaxFilledArrow.png | Bin 0 -> 778 bytes doc/images/axisstyle/JKQTPCADMMinArrow.png | Bin 0 -> 894 bytes .../axisstyle/JKQTPCADMMinFilledArrow.png | Bin 0 -> 773 bytes doc/images/axisstyle/JKQTPCADMTickLabels.png | Bin 0 -> 1067 bytes .../JKQTPCADMTickLabelsAxisLabel.png | Bin 0 -> 1551 bytes doc/images/axisstyle/JKQTPCADMTicks.png | Bin 0 -> 429 bytes .../axisstyle/JKQTPCADMTicksTickLabels.png | Bin 0 -> 1112 bytes .../JKQTPCADMTicksTickLabelsAxisLabel.png | Bin 0 -> 1611 bytes doc/images/axisstyle/JKQTPCADMcomplete.png | Bin 0 -> 1616 bytes .../axisstyle/JKQTPCADMcompleteMaxArrow.png | Bin 0 -> 1889 bytes .../JKQTPCADMcompleteMinMaxArrow.png | Bin 0 -> 2216 bytes doc/images/axisstyle/JKQTPCADMnone.png | Bin 0 -> 393 bytes doc/images/axisstyle/JKQTPCALTdate.png | Bin 0 -> 2789 bytes doc/images/axisstyle/JKQTPCALTdatetime.png | Bin 0 -> 2697 bytes doc/images/axisstyle/JKQTPCALTdefault.png | Bin 0 -> 2197 bytes doc/images/axisstyle/JKQTPCALTexponent.png | Bin 0 -> 2270 bytes .../axisstyle/JKQTPCALTexponentCharacter.png | Bin 0 -> 3218 bytes doc/images/axisstyle/JKQTPCALTfrac.png | Bin 0 -> 2020 bytes doc/images/axisstyle/JKQTPCALTintfrac.png | Bin 0 -> 2244 bytes doc/images/axisstyle/JKQTPCALTintsfrac.png | Bin 0 -> 2392 bytes .../axisstyle/JKQTPCALTintslashfrac.png | Bin 0 -> 2395 bytes doc/images/axisstyle/JKQTPCALTscientific.png | Bin 0 -> 2550 bytes doc/images/axisstyle/JKQTPCALTsfrac.png | Bin 0 -> 2484 bytes doc/images/axisstyle/JKQTPCALTslashfrac.png | Bin 0 -> 2479 bytes doc/images/axisstyle/JKQTPCALTtime.png | Bin 0 -> 1846 bytes examples/dateaxes/dateaxes.cpp | 4 +- .../jkqtplot_test/TestWidgetBarcharts.cpp | 2 +- examples/logaxes/logaxes.cpp | 2 +- examples/styling/jkqtpstyleplaintextedit.cpp | 3 +- lib/jkqtcommon/jkqtpdrawingtools.h | 19 +- lib/jkqtplotter/gui/jkqtpcomboboxes.cpp | 2 + lib/jkqtplotter/jkqtpcoordinateaxes.cpp | 934 ++++++++++-------- lib/jkqtplotter/jkqtpcoordinateaxes.h | 95 +- lib/jkqtplotter/jkqtpcoordinateaxesstyle.cpp | 65 +- lib/jkqtplotter/jkqtpcoordinateaxesstyle.h | 26 +- lib/jkqtplotter/jkqtpimagetools.cpp | 8 +- lib/jkqtplotter/jkqtptools.cpp | 77 +- lib/jkqtplotter/jkqtptools.h | 93 +- screenshots/advancedlineandfillstyling.png | Bin 186321 -> 182376 bytes .../advancedlineandfillstyling_small.png | Bin 22824 -> 22886 bytes screenshots/barchart.png | Bin 23283 -> 23264 bytes screenshots/barchart_errorbars.png | Bin 26843 -> 25231 bytes screenshots/barchart_errorbars_hor.png | Bin 25383 -> 24142 bytes screenshots/barchart_errorbars_hor_small.png | Bin 11305 -> 11280 bytes screenshots/barchart_errorbars_small.png | Bin 11303 -> 10478 bytes screenshots/barchart_hor.png | Bin 20445 -> 20253 bytes screenshots/barchart_hor_small.png | Bin 4655 -> 4528 bytes screenshots/barchart_small.png | Bin 4762 -> 4821 bytes screenshots/barchart_twocolor.png | Bin 22468 -> 20011 bytes screenshots/barchart_twocolor_hor.png | Bin 21754 -> 20285 bytes screenshots/barchart_twocolor_hor_small.png | Bin 9732 -> 9213 bytes screenshots/barchart_twocolor_small.png | Bin 9668 -> 9618 bytes screenshots/boxplot.png | Bin 42275 -> 39171 bytes screenshots/boxplot_small.png | Bin 8039 -> 7518 bytes screenshots/contourplot.png | Bin 135912 -> 134543 bytes screenshots/contourplot_small.png | Bin 23054 -> 22785 bytes screenshots/dateaxes.png | Bin 67570 -> 66471 bytes screenshots/dateaxes_small.png | Bin 11224 -> 11147 bytes screenshots/dateaxes_timeaxis.png | Bin 44540 -> 44273 bytes screenshots/dateaxes_timeaxis_small.png | Bin 11235 -> 11000 bytes screenshots/errorbarstyles.png | Bin 142724 -> 143900 bytes screenshots/errorbarstyles_small.png | Bin 12643 -> 12606 bytes screenshots/evalcurve.png | Bin 159060 -> 155104 bytes screenshots/evalcurve_small.png | Bin 17759 -> 17234 bytes screenshots/filledgraphs.png | Bin 36213 -> 37749 bytes screenshots/filledgraphs_errors.png | Bin 51472 -> 49417 bytes screenshots/filledgraphs_errors_small.png | Bin 15371 -> 14885 bytes screenshots/filledgraphs_errors_y.png | Bin 48455 -> 48032 bytes screenshots/filledgraphs_errors_y_small.png | Bin 14991 -> 14906 bytes screenshots/filledgraphs_small.png | Bin 9625 -> 10481 bytes screenshots/filledgraphs_y.png | Bin 38854 -> 38358 bytes screenshots/filledgraphs_y_small.png | Bin 12120 -> 11544 bytes screenshots/functionplot.png | Bin 89984 -> 89421 bytes screenshots/functionplot_fy.png | Bin 90544 -> 90905 bytes screenshots/functionplot_fy_small.png | Bin 15054 -> 14937 bytes screenshots/functionplot_small.png | Bin 14817 -> 14155 bytes screenshots/geometric.png | Bin 179941 -> 176893 bytes screenshots/geometric_small.png | Bin 17310 -> 16955 bytes screenshots/imageplot.png | Bin 23238 -> 23114 bytes screenshots/imageplot_modifier.png | Bin 78627 -> 76401 bytes screenshots/imageplot_modifier_small.png | Bin 13889 -> 13811 bytes screenshots/imageplot_nodatastore.png | Bin 26503 -> 26661 bytes screenshots/imageplot_nodatastore_small.png | Bin 15807 -> 15006 bytes screenshots/imageplot_small.png | Bin 12115 -> 11624 bytes screenshots/imageplot_userpal_program.png | Bin 18421 -> 18824 bytes .../imageplot_userpal_program_small.png | Bin 9879 -> 9720 bytes screenshots/impulsesplot.png | Bin 16576 -> 15785 bytes screenshots/impulsesplot_small.png | Bin 6140 -> 5399 bytes screenshots/mandelbrot.png | Bin 92550 -> 91563 bytes screenshots/mandelbrot_small.png | Bin 10527 -> 10327 bytes screenshots/multiplot.png | Bin 77298 -> 76921 bytes screenshots/multiplot_controlwindow.png | Bin 37707 -> 37720 bytes screenshots/multiplot_controlwindow_small.png | Bin 6027 -> 6046 bytes screenshots/multiplot_small.png | Bin 12964 -> 12301 bytes screenshots/parametriccurve1.png | Bin 24088 -> 22784 bytes screenshots/parametriccurve1_small.png | Bin 6861 -> 5791 bytes screenshots/parametriccurve2.png | Bin 28517 -> 28042 bytes screenshots/parametriccurve2_small.png | Bin 7577 -> 7978 bytes screenshots/paramscatterplot.png | Bin 100128 -> 94494 bytes screenshots/paramscatterplot_customsymbol.png | Bin 25777 -> 25972 bytes .../paramscatterplot_customsymbol_small.png | Bin 10234 -> 9688 bytes screenshots/paramscatterplot_small.png | Bin 13886 -> 13409 bytes screenshots/parsedfunctionplot.png | Bin 30730 -> 29344 bytes screenshots/parsedfunctionplot_small.png | Bin 8973 -> 8371 bytes screenshots/rgbimageplot.png | Bin 34725 -> 34519 bytes screenshots/rgbimageplot_qt.png | Bin 238404 -> 239517 bytes screenshots/rgbimageplot_qt_small.png | Bin 20775 -> 20750 bytes screenshots/rgbimageplot_small.png | Bin 15314 -> 14481 bytes screenshots/scatter.png | Bin 30243 -> 30103 bytes screenshots/scatter_customsymbol.png | Bin 55492 -> 55618 bytes screenshots/scatter_customsymbol_small.png | Bin 16337 -> 15843 bytes screenshots/scatter_error.png | Bin 36572 -> 35672 bytes screenshots/scatter_error_small.png | Bin 10932 -> 10587 bytes screenshots/scatter_small.png | Bin 11797 -> 11296 bytes screenshots/simpletest.png | Bin 44342 -> 43240 bytes screenshots/simpletest_small.png | Bin 14270 -> 13957 bytes screenshots/stackedbars.png | Bin 25907 -> 25638 bytes screenshots/stackedbars_hor.png | Bin 26893 -> 26749 bytes screenshots/stackedbars_hor_small.png | Bin 6156 -> 5992 bytes screenshots/stackedbars_small.png | Bin 6202 -> 6160 bytes screenshots/stepplots.png | Bin 52768 -> 52965 bytes screenshots/stepplots_small.png | Bin 9115 -> 8890 bytes screenshots/symbols_and_errors.png | Bin 26716 -> 27464 bytes screenshots/symbols_and_errors_small.png | Bin 8300 -> 8331 bytes screenshots/test_distributionplot.png | Bin 99312 -> 95614 bytes screenshots/test_distributionplot_small.png | Bin 10598 -> 10645 bytes screenshots/test_styledboxplot.png | Bin 21215 -> 21480 bytes screenshots/test_styledboxplot_small.png | Bin 8058 -> 8435 bytes screenshots/violinplot_hor.png | Bin 43368 -> 39692 bytes screenshots/violinplot_hor_small.png | Bin 10728 -> 10778 bytes screenshots/violinplot_vert.png | Bin 44155 -> 43210 bytes screenshots/violinplot_vert_small.png | Bin 10813 -> 10664 bytes screenshots/wiggleplot_x.png | Bin 42986 -> 40673 bytes screenshots/wiggleplot_x_small.png | Bin 10067 -> 10108 bytes screenshots/wiggleplot_y.png | Bin 66756 -> 66671 bytes screenshots/wiggleplot_y_small.png | Bin 13174 -> 13115 bytes .../jkqtplotter_doc_imagegenerator.cpp | 119 ++- 193 files changed, 871 insertions(+), 589 deletions(-) delete mode 100644 doc/images/JKQTPCALTdate.png delete mode 100644 doc/images/JKQTPCALTdatetime.png delete mode 100644 doc/images/JKQTPCALTdefault.png delete mode 100644 doc/images/JKQTPCALTexponent.png delete mode 100644 doc/images/JKQTPCALTexponentCharacter.png delete mode 100644 doc/images/JKQTPCALTfrac.png delete mode 100644 doc/images/JKQTPCALTintfrac.png delete mode 100644 doc/images/JKQTPCALTintsfrac.png delete mode 100644 doc/images/JKQTPCALTintslashfrac.png delete mode 100644 doc/images/JKQTPCALTscientific.png delete mode 100644 doc/images/JKQTPCALTsfrac.png delete mode 100644 doc/images/JKQTPCALTslashfrac.png delete mode 100644 doc/images/JKQTPCALTtime.png create mode 100644 doc/images/axisstyle/JKQTPCADMAxisLabel.png create mode 100644 doc/images/axisstyle/JKQTPCADMLine.png create mode 100644 doc/images/axisstyle/JKQTPCADMLineTicks.png create mode 100644 doc/images/axisstyle/JKQTPCADMLineTicksTickLabels.png create mode 100644 doc/images/axisstyle/JKQTPCADMMaxArrow.png create mode 100644 doc/images/axisstyle/JKQTPCADMMaxFilledArrow.png create mode 100644 doc/images/axisstyle/JKQTPCADMMinArrow.png create mode 100644 doc/images/axisstyle/JKQTPCADMMinFilledArrow.png create mode 100644 doc/images/axisstyle/JKQTPCADMTickLabels.png create mode 100644 doc/images/axisstyle/JKQTPCADMTickLabelsAxisLabel.png create mode 100644 doc/images/axisstyle/JKQTPCADMTicks.png create mode 100644 doc/images/axisstyle/JKQTPCADMTicksTickLabels.png create mode 100644 doc/images/axisstyle/JKQTPCADMTicksTickLabelsAxisLabel.png create mode 100644 doc/images/axisstyle/JKQTPCADMcomplete.png create mode 100644 doc/images/axisstyle/JKQTPCADMcompleteMaxArrow.png create mode 100644 doc/images/axisstyle/JKQTPCADMcompleteMinMaxArrow.png create mode 100644 doc/images/axisstyle/JKQTPCADMnone.png create mode 100644 doc/images/axisstyle/JKQTPCALTdate.png create mode 100644 doc/images/axisstyle/JKQTPCALTdatetime.png create mode 100644 doc/images/axisstyle/JKQTPCALTdefault.png create mode 100644 doc/images/axisstyle/JKQTPCALTexponent.png create mode 100644 doc/images/axisstyle/JKQTPCALTexponentCharacter.png create mode 100644 doc/images/axisstyle/JKQTPCALTfrac.png create mode 100644 doc/images/axisstyle/JKQTPCALTintfrac.png create mode 100644 doc/images/axisstyle/JKQTPCALTintsfrac.png create mode 100644 doc/images/axisstyle/JKQTPCALTintslashfrac.png create mode 100644 doc/images/axisstyle/JKQTPCALTscientific.png create mode 100644 doc/images/axisstyle/JKQTPCALTsfrac.png create mode 100644 doc/images/axisstyle/JKQTPCALTslashfrac.png create mode 100644 doc/images/axisstyle/JKQTPCALTtime.png diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 94cf7e8eb3..70dc30b1e6 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -114,13 +114,13 @@ if(JKQtPlotter_BUILD_TOOLS) ) add_dependencies(JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocImages_listerrorindicators) - add_custom_target(JKQTPlotter_GenerateDocImages_listaxislabeltype - COMMENT "Building JKQTPlotter Documentation Images: listaxislabeltype" - COMMAND ${JKQTPlotter_GenerateDocImages_COMMAND} --listaxislabeltype --background=lightgrey --iconsize=50 --outputdir="${JKQTPlotter_GenerateDocImages_OutputDir}/" + add_custom_target(JKQTPlotter_GenerateDocImages_listaxisstyleprops + COMMENT "Building JKQTPlotter Documentation Images: listaxisstyleprops" + COMMAND ${JKQTPlotter_GenerateDocImages_COMMAND} --listaxisstyleprops --background=lightgrey --iconsize=50 --outputdir="${JKQTPlotter_GenerateDocImages_OutputDir}/axisstyle/" WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR} DEPENDS jkqtplotter_doc_imagegenerator ) - add_dependencies(JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocImages_listaxislabeltype) + add_dependencies(JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocImages_listaxisstyleprops) endif(JKQtPlotter_BUILD_TOOLS) diff --git a/doc/dox/whatsnew.dox b/doc/dox/whatsnew.dox index b92c99044b..d715d676c6 100644 --- a/doc/dox/whatsnew.dox +++ b/doc/dox/whatsnew.dox @@ -29,6 +29,8 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
  • REORGANIZED: separated line-graphs from jkqtpscatter.h/.cpp into jkqtplines.h/.cpp
  • IMPROVED: QT6-compatibility by removing deprecated warnings
  • IMPROVED/REWORKED: reworked JKQTPErrorPlotstyle and error indicator plotting so error-inidcators can be specified as ORed combination of flags from JKQTPErrorPlotstyleElements, added additional error indicator styles (half-bars, arrows...)
  • +
  • IMPROVED/REWORKED: reworked JKQTPCADrawMode and coordinate axis drawing so the draw mide can be specified as ORed combination of flags from JKQTPCADrawModeElements, added flags to draw arrows at the end of the axis line
  • +
  • IMPROVED/REWORKED: coordinate axis code was refactored
  • NEW: JKQTPFilledCurveXGraph and JKQTPFilledCurveYGraph can now plot wiggle plots with different fill styles above and below the baseline (feature request #68 Wiggle Plots from user:xichaoqiang
  • NEW/BREAKING CHANGE: data tooltip can now also be shown when "just" moving the mouse (so far this was only possible when dragging the mouse with a button pressed). This also removes JKQtPlotter::getActMouseLeftAsToolTip() and adds JKQtPlotter::getActMouseMoveToolTip() instead! Also the default toolbars and context menus changed!
  • NEW: new "seaborn" style for plots, see \ref jkqtpplotter_styling
  • @@ -54,6 +56,7 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
  • NEW: Added signals JKQTBasePlotter::beforeExporting()/JKQTBasePlotter::afterExporting() and JKQTBasePlotterJKQTBasePlotter:beforePrinting()/JKQTBasePlotter::afterPrinting() which allow to modify the plot just before and just after an export/print
  • NEW: Added new JKQTPCALabelType elements (JKQTPCALTfrac...), so axis label ticks can be displayed as fractions 1/2 instead of 0.5
  • NEW: Added new JKQTPCALabelType element JKQTPCALTscientific, so axis label ticks can be displayed as numbers in scientific notation like \c 1.2E-34
  • +
  • NEW: all elements of a coordinate axis may have their own color now
  • JKQTMathText: