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:
diff --git a/doc/images/JKQTPBarHorizontalErrorGraph.png b/doc/images/JKQTPBarHorizontalErrorGraph.png
index f86c5c14f3..1d4cbc10b3 100644
Binary files a/doc/images/JKQTPBarHorizontalErrorGraph.png and b/doc/images/JKQTPBarHorizontalErrorGraph.png differ
diff --git a/doc/images/JKQTPBarHorizontalErrorGraph_small.png b/doc/images/JKQTPBarHorizontalErrorGraph_small.png
index 4fca80d475..9ec425de49 100644
Binary files a/doc/images/JKQTPBarHorizontalErrorGraph_small.png and b/doc/images/JKQTPBarHorizontalErrorGraph_small.png differ
diff --git a/doc/images/JKQTPBarHorizontalGraph.png b/doc/images/JKQTPBarHorizontalGraph.png
index 56afb8a708..59eb79e6a2 100644
Binary files a/doc/images/JKQTPBarHorizontalGraph.png and b/doc/images/JKQTPBarHorizontalGraph.png differ
diff --git a/doc/images/JKQTPBarHorizontalGraphTwoColorFilling.png b/doc/images/JKQTPBarHorizontalGraphTwoColorFilling.png
index 97699b5abe..fb1551adbf 100644
Binary files a/doc/images/JKQTPBarHorizontalGraphTwoColorFilling.png and b/doc/images/JKQTPBarHorizontalGraphTwoColorFilling.png differ
diff --git a/doc/images/JKQTPBarHorizontalGraphTwoColorFilling_small.png b/doc/images/JKQTPBarHorizontalGraphTwoColorFilling_small.png
index a85e5a4d64..327b1039a4 100644
Binary files a/doc/images/JKQTPBarHorizontalGraphTwoColorFilling_small.png and b/doc/images/JKQTPBarHorizontalGraphTwoColorFilling_small.png differ
diff --git a/doc/images/JKQTPBarHorizontalGraph_small.png b/doc/images/JKQTPBarHorizontalGraph_small.png
index 83b1212479..1eab6beaa7 100644
Binary files a/doc/images/JKQTPBarHorizontalGraph_small.png and b/doc/images/JKQTPBarHorizontalGraph_small.png differ
diff --git a/doc/images/JKQTPBarVerticalErrorGraph.png b/doc/images/JKQTPBarVerticalErrorGraph.png
index c8646e9e0f..2cfb5482fb 100644
Binary files a/doc/images/JKQTPBarVerticalErrorGraph.png and b/doc/images/JKQTPBarVerticalErrorGraph.png differ
diff --git a/doc/images/JKQTPBarVerticalErrorGraph_small.png b/doc/images/JKQTPBarVerticalErrorGraph_small.png
index 17c9385ace..0f7c6d86c8 100644
Binary files a/doc/images/JKQTPBarVerticalErrorGraph_small.png and b/doc/images/JKQTPBarVerticalErrorGraph_small.png differ
diff --git a/doc/images/JKQTPBarVerticalGraph.png b/doc/images/JKQTPBarVerticalGraph.png
index 75872ce8dd..98896b7a47 100644
Binary files a/doc/images/JKQTPBarVerticalGraph.png and b/doc/images/JKQTPBarVerticalGraph.png differ
diff --git a/doc/images/JKQTPBarVerticalGraphTwoColorFilling.png b/doc/images/JKQTPBarVerticalGraphTwoColorFilling.png
index 8f2737bfe2..811b81a109 100644
Binary files a/doc/images/JKQTPBarVerticalGraphTwoColorFilling.png and b/doc/images/JKQTPBarVerticalGraphTwoColorFilling.png differ
diff --git a/doc/images/JKQTPBarVerticalGraphTwoColorFilling_small.png b/doc/images/JKQTPBarVerticalGraphTwoColorFilling_small.png
index 6b39ac7dea..7d72096999 100644
Binary files a/doc/images/JKQTPBarVerticalGraphTwoColorFilling_small.png and b/doc/images/JKQTPBarVerticalGraphTwoColorFilling_small.png differ
diff --git a/doc/images/JKQTPBarVerticalGraph_small.png b/doc/images/JKQTPBarVerticalGraph_small.png
index 24a933407e..1c280a3ab6 100644
Binary files a/doc/images/JKQTPBarVerticalGraph_small.png and b/doc/images/JKQTPBarVerticalGraph_small.png differ
diff --git a/doc/images/JKQTPCALTdate.png b/doc/images/JKQTPCALTdate.png
deleted file mode 100644
index 3f1cda0099..0000000000
Binary files a/doc/images/JKQTPCALTdate.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTdatetime.png b/doc/images/JKQTPCALTdatetime.png
deleted file mode 100644
index 38dbba8642..0000000000
Binary files a/doc/images/JKQTPCALTdatetime.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTdefault.png b/doc/images/JKQTPCALTdefault.png
deleted file mode 100644
index 181d0e1dcd..0000000000
Binary files a/doc/images/JKQTPCALTdefault.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTexponent.png b/doc/images/JKQTPCALTexponent.png
deleted file mode 100644
index dbcbbf015c..0000000000
Binary files a/doc/images/JKQTPCALTexponent.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTexponentCharacter.png b/doc/images/JKQTPCALTexponentCharacter.png
deleted file mode 100644
index cfc6978842..0000000000
Binary files a/doc/images/JKQTPCALTexponentCharacter.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTfrac.png b/doc/images/JKQTPCALTfrac.png
deleted file mode 100644
index f6dce06959..0000000000
Binary files a/doc/images/JKQTPCALTfrac.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTintfrac.png b/doc/images/JKQTPCALTintfrac.png
deleted file mode 100644
index 15779d68f7..0000000000
Binary files a/doc/images/JKQTPCALTintfrac.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTintsfrac.png b/doc/images/JKQTPCALTintsfrac.png
deleted file mode 100644
index a6a49d1a8f..0000000000
Binary files a/doc/images/JKQTPCALTintsfrac.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTintslashfrac.png b/doc/images/JKQTPCALTintslashfrac.png
deleted file mode 100644
index c07b8ee0ae..0000000000
Binary files a/doc/images/JKQTPCALTintslashfrac.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTscientific.png b/doc/images/JKQTPCALTscientific.png
deleted file mode 100644
index 3491570dfd..0000000000
Binary files a/doc/images/JKQTPCALTscientific.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTsfrac.png b/doc/images/JKQTPCALTsfrac.png
deleted file mode 100644
index 04ceca1525..0000000000
Binary files a/doc/images/JKQTPCALTsfrac.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTslashfrac.png b/doc/images/JKQTPCALTslashfrac.png
deleted file mode 100644
index 6d61d048f1..0000000000
Binary files a/doc/images/JKQTPCALTslashfrac.png and /dev/null differ
diff --git a/doc/images/JKQTPCALTtime.png b/doc/images/JKQTPCALTtime.png
deleted file mode 100644
index e84ca31b11..0000000000
Binary files a/doc/images/JKQTPCALTtime.png and /dev/null differ
diff --git a/doc/images/JKQTPColumnContourPlot.png b/doc/images/JKQTPColumnContourPlot.png
index 832677415a..bd3b1c1853 100644
Binary files a/doc/images/JKQTPColumnContourPlot.png and b/doc/images/JKQTPColumnContourPlot.png differ
diff --git a/doc/images/JKQTPColumnContourPlot_small.png b/doc/images/JKQTPColumnContourPlot_small.png
index 502e7d2172..e4b734473d 100644
Binary files a/doc/images/JKQTPColumnContourPlot_small.png and b/doc/images/JKQTPColumnContourPlot_small.png differ
diff --git a/doc/images/JKQTPFilledCurveXErrorGraph.png b/doc/images/JKQTPFilledCurveXErrorGraph.png
index 01114fe832..162e20c893 100644
Binary files a/doc/images/JKQTPFilledCurveXErrorGraph.png and b/doc/images/JKQTPFilledCurveXErrorGraph.png differ
diff --git a/doc/images/JKQTPFilledCurveXErrorGraph_small.png b/doc/images/JKQTPFilledCurveXErrorGraph_small.png
index f706433c9a..2d33e3ba2c 100644
Binary files a/doc/images/JKQTPFilledCurveXErrorGraph_small.png and b/doc/images/JKQTPFilledCurveXErrorGraph_small.png differ
diff --git a/doc/images/JKQTPFilledCurveXGraph.png b/doc/images/JKQTPFilledCurveXGraph.png
index dbc45e5878..d67e6519e1 100644
Binary files a/doc/images/JKQTPFilledCurveXGraph.png and b/doc/images/JKQTPFilledCurveXGraph.png differ
diff --git a/doc/images/JKQTPFilledCurveXGraph_small.png b/doc/images/JKQTPFilledCurveXGraph_small.png
index 43795d4650..abb3d3b0d2 100644
Binary files a/doc/images/JKQTPFilledCurveXGraph_small.png and b/doc/images/JKQTPFilledCurveXGraph_small.png differ
diff --git a/doc/images/JKQTPFilledCurveXGraph_wiggle.png b/doc/images/JKQTPFilledCurveXGraph_wiggle.png
index abbad88a40..b671b56335 100644
Binary files a/doc/images/JKQTPFilledCurveXGraph_wiggle.png and b/doc/images/JKQTPFilledCurveXGraph_wiggle.png differ
diff --git a/doc/images/JKQTPFilledCurveYErrorGraph.png b/doc/images/JKQTPFilledCurveYErrorGraph.png
index 98aa472b71..f58dc716df 100644
Binary files a/doc/images/JKQTPFilledCurveYErrorGraph.png and b/doc/images/JKQTPFilledCurveYErrorGraph.png differ
diff --git a/doc/images/JKQTPFilledCurveYErrorGraph_small.png b/doc/images/JKQTPFilledCurveYErrorGraph_small.png
index d22eaeb67f..6a839c13b5 100644
Binary files a/doc/images/JKQTPFilledCurveYErrorGraph_small.png and b/doc/images/JKQTPFilledCurveYErrorGraph_small.png differ
diff --git a/doc/images/JKQTPFilledCurveYGraph.png b/doc/images/JKQTPFilledCurveYGraph.png
index bc28bdc410..ed1b366b1a 100644
Binary files a/doc/images/JKQTPFilledCurveYGraph.png and b/doc/images/JKQTPFilledCurveYGraph.png differ
diff --git a/doc/images/JKQTPFilledCurveYGraph_small.png b/doc/images/JKQTPFilledCurveYGraph_small.png
index 9ba88c8a38..9f1eaf0223 100644
Binary files a/doc/images/JKQTPFilledCurveYGraph_small.png and b/doc/images/JKQTPFilledCurveYGraph_small.png differ
diff --git a/doc/images/JKQTPFilledCurveYGraph_wiggle.png b/doc/images/JKQTPFilledCurveYGraph_wiggle.png
index a2dc953e6e..46c6e4de63 100644
Binary files a/doc/images/JKQTPFilledCurveYGraph_wiggle.png and b/doc/images/JKQTPFilledCurveYGraph_wiggle.png differ
diff --git a/doc/images/JKQTPXYFunctionLineGraph.png b/doc/images/JKQTPXYFunctionLineGraph.png
index 9ec9b0a04a..3ee7c1d6ef 100644
Binary files a/doc/images/JKQTPXYFunctionLineGraph.png and b/doc/images/JKQTPXYFunctionLineGraph.png differ
diff --git a/doc/images/JKQTPXYFunctionLineGraph_small.png b/doc/images/JKQTPXYFunctionLineGraph_small.png
index a3682af6ca..da9bc2a26a 100644
Binary files a/doc/images/JKQTPXYFunctionLineGraph_small.png and b/doc/images/JKQTPXYFunctionLineGraph_small.png differ
diff --git a/doc/images/JKQTPXYLineGraph.png b/doc/images/JKQTPXYLineGraph.png
index e374763b95..cb33c3ad4a 100644
Binary files a/doc/images/JKQTPXYLineGraph.png and b/doc/images/JKQTPXYLineGraph.png differ
diff --git a/doc/images/JKQTPXYLineGraph_small.png b/doc/images/JKQTPXYLineGraph_small.png
index 8c4b458f3f..f1c5bbe8e2 100644
Binary files a/doc/images/JKQTPXYLineGraph_small.png and b/doc/images/JKQTPXYLineGraph_small.png differ
diff --git a/doc/images/JKQTPXYScatterErrorGraph.png b/doc/images/JKQTPXYScatterErrorGraph.png
index 5ded3616dd..571c5ca57b 100644
Binary files a/doc/images/JKQTPXYScatterErrorGraph.png and b/doc/images/JKQTPXYScatterErrorGraph.png differ
diff --git a/doc/images/JKQTPXYScatterErrorGraph_small.png b/doc/images/JKQTPXYScatterErrorGraph_small.png
index 913f0ec9e4..c036441352 100644
Binary files a/doc/images/JKQTPXYScatterErrorGraph_small.png and b/doc/images/JKQTPXYScatterErrorGraph_small.png differ
diff --git a/doc/images/JKQTPXYScatterGraph.png b/doc/images/JKQTPXYScatterGraph.png
index 25d6d26f5d..49a502fed0 100644
Binary files a/doc/images/JKQTPXYScatterGraph.png and b/doc/images/JKQTPXYScatterGraph.png differ
diff --git a/doc/images/JKQTPXYScatterGraph_small.png b/doc/images/JKQTPXYScatterGraph_small.png
index b2f9159b9c..609b0e2821 100644
Binary files a/doc/images/JKQTPXYScatterGraph_small.png and b/doc/images/JKQTPXYScatterGraph_small.png differ
diff --git a/doc/images/JKQTPbarHorizontalGraphStacked.png b/doc/images/JKQTPbarHorizontalGraphStacked.png
index bd4255af52..053069fcf3 100644
Binary files a/doc/images/JKQTPbarHorizontalGraphStacked.png and b/doc/images/JKQTPbarHorizontalGraphStacked.png differ
diff --git a/doc/images/JKQTPbarHorizontalGraphStacked_small.png b/doc/images/JKQTPbarHorizontalGraphStacked_small.png
index 91b573c0f0..3025ea2caf 100644
Binary files a/doc/images/JKQTPbarHorizontalGraphStacked_small.png and b/doc/images/JKQTPbarHorizontalGraphStacked_small.png differ
diff --git a/doc/images/JKQTPbarVerticalGraphStacked.png b/doc/images/JKQTPbarVerticalGraphStacked.png
index d6793f8c9d..92e0067b97 100644
Binary files a/doc/images/JKQTPbarVerticalGraphStacked.png and b/doc/images/JKQTPbarVerticalGraphStacked.png differ
diff --git a/doc/images/JKQTPbarVerticalGraphStacked_small.png b/doc/images/JKQTPbarVerticalGraphStacked_small.png
index b6c960f5d8..fc88d3c052 100644
Binary files a/doc/images/JKQTPbarVerticalGraphStacked_small.png and b/doc/images/JKQTPbarVerticalGraphStacked_small.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMAxisLabel.png b/doc/images/axisstyle/JKQTPCADMAxisLabel.png
new file mode 100644
index 0000000000..daf8ca9a54
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMAxisLabel.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMLine.png b/doc/images/axisstyle/JKQTPCADMLine.png
new file mode 100644
index 0000000000..3e5e93f27a
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMLine.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMLineTicks.png b/doc/images/axisstyle/JKQTPCADMLineTicks.png
new file mode 100644
index 0000000000..1c94a8fccc
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMLineTicks.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMLineTicksTickLabels.png b/doc/images/axisstyle/JKQTPCADMLineTicksTickLabels.png
new file mode 100644
index 0000000000..3c93c39a19
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMLineTicksTickLabels.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMMaxArrow.png b/doc/images/axisstyle/JKQTPCADMMaxArrow.png
new file mode 100644
index 0000000000..6346960adf
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMMaxArrow.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMMaxFilledArrow.png b/doc/images/axisstyle/JKQTPCADMMaxFilledArrow.png
new file mode 100644
index 0000000000..a3ce25a752
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMMaxFilledArrow.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMMinArrow.png b/doc/images/axisstyle/JKQTPCADMMinArrow.png
new file mode 100644
index 0000000000..9d9e526606
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMMinArrow.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMMinFilledArrow.png b/doc/images/axisstyle/JKQTPCADMMinFilledArrow.png
new file mode 100644
index 0000000000..d1a39265cd
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMMinFilledArrow.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMTickLabels.png b/doc/images/axisstyle/JKQTPCADMTickLabels.png
new file mode 100644
index 0000000000..2377513c3d
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMTickLabels.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMTickLabelsAxisLabel.png b/doc/images/axisstyle/JKQTPCADMTickLabelsAxisLabel.png
new file mode 100644
index 0000000000..8b3c7b5071
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMTickLabelsAxisLabel.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMTicks.png b/doc/images/axisstyle/JKQTPCADMTicks.png
new file mode 100644
index 0000000000..d24e982537
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMTicks.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMTicksTickLabels.png b/doc/images/axisstyle/JKQTPCADMTicksTickLabels.png
new file mode 100644
index 0000000000..56d2a85fc2
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMTicksTickLabels.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMTicksTickLabelsAxisLabel.png b/doc/images/axisstyle/JKQTPCADMTicksTickLabelsAxisLabel.png
new file mode 100644
index 0000000000..7da4667e3e
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMTicksTickLabelsAxisLabel.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMcomplete.png b/doc/images/axisstyle/JKQTPCADMcomplete.png
new file mode 100644
index 0000000000..7ce7640cc3
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMcomplete.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMcompleteMaxArrow.png b/doc/images/axisstyle/JKQTPCADMcompleteMaxArrow.png
new file mode 100644
index 0000000000..b4dc8f3e75
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMcompleteMaxArrow.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMcompleteMinMaxArrow.png b/doc/images/axisstyle/JKQTPCADMcompleteMinMaxArrow.png
new file mode 100644
index 0000000000..daceb09ec7
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMcompleteMinMaxArrow.png differ
diff --git a/doc/images/axisstyle/JKQTPCADMnone.png b/doc/images/axisstyle/JKQTPCADMnone.png
new file mode 100644
index 0000000000..07c138ac7e
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCADMnone.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTdate.png b/doc/images/axisstyle/JKQTPCALTdate.png
new file mode 100644
index 0000000000..310ad38ed0
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTdate.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTdatetime.png b/doc/images/axisstyle/JKQTPCALTdatetime.png
new file mode 100644
index 0000000000..31a724e3a9
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTdatetime.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTdefault.png b/doc/images/axisstyle/JKQTPCALTdefault.png
new file mode 100644
index 0000000000..62a69e160c
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTdefault.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTexponent.png b/doc/images/axisstyle/JKQTPCALTexponent.png
new file mode 100644
index 0000000000..f69c5b7384
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTexponent.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTexponentCharacter.png b/doc/images/axisstyle/JKQTPCALTexponentCharacter.png
new file mode 100644
index 0000000000..fe41e397f2
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTexponentCharacter.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTfrac.png b/doc/images/axisstyle/JKQTPCALTfrac.png
new file mode 100644
index 0000000000..e44d6975f4
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTintfrac.png b/doc/images/axisstyle/JKQTPCALTintfrac.png
new file mode 100644
index 0000000000..20cf52665c
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTintfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTintsfrac.png b/doc/images/axisstyle/JKQTPCALTintsfrac.png
new file mode 100644
index 0000000000..abb7dfd742
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTintsfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTintslashfrac.png b/doc/images/axisstyle/JKQTPCALTintslashfrac.png
new file mode 100644
index 0000000000..fe82e7c10d
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTintslashfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTscientific.png b/doc/images/axisstyle/JKQTPCALTscientific.png
new file mode 100644
index 0000000000..556d41ecc1
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTscientific.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTsfrac.png b/doc/images/axisstyle/JKQTPCALTsfrac.png
new file mode 100644
index 0000000000..a714830840
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTsfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTslashfrac.png b/doc/images/axisstyle/JKQTPCALTslashfrac.png
new file mode 100644
index 0000000000..51d0d5bb03
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTslashfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTtime.png b/doc/images/axisstyle/JKQTPCALTtime.png
new file mode 100644
index 0000000000..07f4f3fcf1
Binary files /dev/null and b/doc/images/axisstyle/JKQTPCALTtime.png differ
diff --git a/examples/dateaxes/dateaxes.cpp b/examples/dateaxes/dateaxes.cpp
index f7a76b0c22..8386b92c79 100644
--- a/examples/dateaxes/dateaxes.cpp
+++ b/examples/dateaxes/dateaxes.cpp
@@ -83,7 +83,7 @@ void drawWithDateAxis(JKQTPlotter& plot) {
// set the title above the plot, use LaTeX instructions to make text bold
plot.getPlotter()->setPlotLabel("\\textbf{Weather in Gelsenkirchen, 2017-2018}");
// set x-axis date-time-axis
- plot.getXAxis()->setLabelType(JKQTPCALTdatetime);
+ plot.getXAxis()->setTickLabelType(JKQTPCALTdatetime);
plot.getXAxis()->setAxisLabel("Date");
// set format string for date axis (e.g. Jan '18), see Documentation of QDateTime::toString()
plot.getXAxis()->setTickDateTimeFormat("MMM ''yy");
@@ -150,7 +150,7 @@ void drawWithTimeAxis(JKQTPlotter& plot) {
// set the title above the plot, use LaTeX instructions to make text bold
plot.getPlotter()->setPlotLabel("\\textbf{Weather in Heidelberg, 14^{th} Oct 2018}");
// set x-axis date-time-axis
- plot.getXAxis()->setLabelType(JKQTPCALTtime);
+ plot.getXAxis()->setTickLabelType(JKQTPCALTtime);
plot.getXAxis()->setAxisLabel("Time of Day");
// set format string for time axis with 24-hour and minute only,
// see QDateTime::toString() documentation for details on format strings
diff --git a/examples/jkqtplot_test/TestWidgetBarcharts.cpp b/examples/jkqtplot_test/TestWidgetBarcharts.cpp
index b2587ea3a0..4c4689307e 100644
--- a/examples/jkqtplot_test/TestWidgetBarcharts.cpp
+++ b/examples/jkqtplot_test/TestWidgetBarcharts.cpp
@@ -22,7 +22,7 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) :
plotBarchart->getPlotter()->setPlotLabel(tr("\\textbf{bar charts}"));
plotBarchart->setObjectName("plotBarchart");
plotBarchart->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/");
- plotBarchart->getPlotter()->getXAxis()->setLabelType(JKQTPCALTdate);
+ plotBarchart->getPlotter()->getXAxis()->setTickLabelType(JKQTPCALTdate);
plotBarchart->getPlotter()->getXAxis()->setTickDateFormat("dd. MMM yyyy");
barchartLayout->addWidget(plotBarchart);
diff --git a/examples/logaxes/logaxes.cpp b/examples/logaxes/logaxes.cpp
index 0efec25d58..282d39d8a7 100644
--- a/examples/logaxes/logaxes.cpp
+++ b/examples/logaxes/logaxes.cpp
@@ -86,7 +86,7 @@ int main(int argc, char* argv[])
plot.getYAxis()->setDrawMinorGrid(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.getYAxis()->setLabelType(JKQTPCALTexponent);
+ plot.getYAxis()->setTickLabelType(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)
diff --git a/examples/styling/jkqtpstyleplaintextedit.cpp b/examples/styling/jkqtpstyleplaintextedit.cpp
index a61ba4bcae..87610b479b 100644
--- a/examples/styling/jkqtpstyleplaintextedit.cpp
+++ b/examples/styling/jkqtpstyleplaintextedit.cpp
@@ -484,8 +484,7 @@ void JKQTPStylePlainTextEdit::contextMenuEvent(QContextMenuEvent *event)
submenu->setEnabled(true);
QAction* act;
JKQTPCADrawMode st;
- for (int i=0; i<=static_cast(JKQTPCADMmax); i++) {
- st=static_cast(i);
+ for (const JKQTPCADrawMode st : {JKQTPCADMnone,JKQTPCADMcomplete,JKQTPCADMcompleteMaxArrow,JKQTPCADMcompleteMinMaxArrow,JKQTPCADMLine,JKQTPCADMTicks,JKQTPCADMTickLabels,JKQTPCADMAxisLabel,JKQTPCADMLineTicksTickLabels,JKQTPCADMLineTicks,JKQTPCADMTicksTickLabelsAxisLabel,JKQTPCADMTicksTickLabels,JKQTPCADMTickLabelsAxisLabel}) {
act=new QAction(JKQTPCADrawMode2String(st));
connect(act, &QAction::triggered, std::bind(std::mem_fn(&JKQTPStylePlainTextEdit::changeCurrentLineValueTo), this, act->text()));
submenu->addAction(act);
diff --git a/lib/jkqtcommon/jkqtpdrawingtools.h b/lib/jkqtcommon/jkqtpdrawingtools.h
index 5a95b63800..47b33c4d01 100644
--- a/lib/jkqtcommon/jkqtpdrawingtools.h
+++ b/lib/jkqtcommon/jkqtpdrawingtools.h
@@ -311,7 +311,10 @@ JKQTCOMMON_LIB_EXPORT void JKQTPPlotSymbol(QPaintDevice& paintDevice, double x,
*
* \image html geo_arrow_tipsatlineend.png
*
- * \see \ref JKQTPlotterGeometricArrows and \ref JKQTPlotterGeometricGraphs
+ *
+ * \see JKQTPPlotLineDecorator(), JKQTPPlotDecoratedLine(), JKQTPLineDecoratorStyle, JKQTPLineDecoratorStyleCalcDecoratorSize()
+ *
+ * \see \ref JKQTPlotterGeometricArrows and \ref JKQTPlotterGeometricGraphs for usage examples.
*/
enum JKQTPLineDecoratorStyle {
JKQTPNoDecorator=0, /*!< \brief no decorator, i.e. a simple line-end \image html linedecorators/none.png */
@@ -368,8 +371,10 @@ JKQTCOMMON_LIB_EXPORT JKQTPLineDecoratorStyle String2JKQTPLineDecoratorStyle(con
\param y y-coordinate of the decorator tip
\param angle_rad angle of the line pointing to (x,y), given in radians, 0rad points to the right, >0rad is a counter-clockwise rotation, as calculated by atan2() from dx, dy of a line!
\param style type of the decorator to plot, see JKQTPLineDecoratorStyle
- \param size size of the decorator
+ \param size size of the decorator in pixels, the decorator fills at most the space \c x...x+size and \c y-size/2...y-size/2, but may be smaller (e.g. arrows are typically less high than the full \a size pixels ).
\param[out] line_start optional output parameter: when drawing the line let it end here, not necessarily at (x,y)
+
+ \see JKQTPPlotLineDecorator(), JKQTPPlotDecoratedLine(), JKQTPLineDecoratorStyle, JKQTPLineDecoratorStyleCalcDecoratorSize()
*/
template
inline void JKQTPPlotLineDecorator(TPainter& painter, double x, double y, double angle_rad, JKQTPLineDecoratorStyle style, double size, QPointF* line_start=nullptr);
@@ -384,11 +389,19 @@ inline void JKQTPPlotLineDecorator(TPainter& painter, double x, double y, double
\param size1 size of the first decorator
\param style2 type of the second decorator to plot, see JKQTPLineDecoratorStyle
\param size2 size of the second decorator
+
+ \note a decorator fills at most the space \c x...x+size and \c y-size/2...y-size/2 (where \c size is \a size1 or \a size2), but may be smaller (e.g. arrows are typically less high than the full \c size pixels ).
+
+ \see JKQTPPlotLineDecorator(), JKQTPPlotDecoratedLine(), JKQTPLineDecoratorStyle, JKQTPLineDecoratorStyleCalcDecoratorSize()
*/
template
inline void JKQTPPlotDecoratedLine(TPainter& painter, const QLineF& l, JKQTPLineDecoratorStyle style1, double size1, JKQTPLineDecoratorStyle style2, double size2);
-/** \brief calculates the tail decorator size from the line width \a line_width, using decoratorSizeFactor and a non-linear scaling function that levels off towards small \a line_width and increases sub-linearly for large ones, so the arrow heads to not grow too much */
+/*! \brief calculates the tail decorator size from the line width \a line_width, using decoratorSizeFactor and a non-linear scaling function that levels off towards small \a line_width and increases sub-linearly for large ones, so the arrow heads to not grow too much
+ \ingroup jkqtptools_drawing
+
+ \see JKQTPPlotLineDecorator(), JKQTPPlotDecoratedLine(), JKQTPLineDecoratorStyle, JKQTPLineDecoratorStyleCalcDecoratorSize()
+*/
JKQTCOMMON_LIB_EXPORT double JKQTPLineDecoratorStyleCalcDecoratorSize(double line_width, double decoratorSizeFactor);
diff --git a/lib/jkqtplotter/gui/jkqtpcomboboxes.cpp b/lib/jkqtplotter/gui/jkqtpcomboboxes.cpp
index 004e53bd2c..465e120561 100644
--- a/lib/jkqtplotter/gui/jkqtpcomboboxes.cpp
+++ b/lib/jkqtplotter/gui/jkqtpcomboboxes.cpp
@@ -377,6 +377,8 @@ JKQTPCADrawModeComboBox::JKQTPCADrawModeComboBox(QWidget *parent):
{
setEditable(false);
addDrawMode(JKQTPCADMcomplete, tr("complete"), QIcon(":/JKQTPlotter/jkqtp_axis_complete.png"));
+ addDrawMode(JKQTPCADMcompleteMaxArrow, tr("complete with max arrow"), QIcon(":/JKQTPlotter/jkqtp_axis_complete_maxarrow.png"));
+ addDrawMode(JKQTPCADMcompleteMinMaxArrow, tr("complete wih min&max arrows"), QIcon(":/JKQTPlotter/jkqtp_axis_complete_minmaxarrow.png"));
addDrawMode(JKQTPCADMLineTicksTickLabels, tr("line+tick+labels"), QIcon(":/JKQTPlotter/jkqtp_axis_ticksandlabels.png"));
addDrawMode(JKQTPCADMLineTicks, tr("line+tick"), QIcon(":/JKQTPlotter/jkqtp_axis_ticks.png"));
addDrawMode(JKQTPCADMLine, tr("line"), QIcon(":/JKQTPlotter/jkqtp_axis_line.png"));
diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp
index 9ba890e78c..37a905c478 100644
--- a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp
+++ b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp
@@ -156,7 +156,7 @@ void JKQTPCoordinateAxis::saveSettings(QSettings& settings, const QString& group
}
double JKQTPCoordinateAxis::calcLinearTickSpacing() {
- if (axisStyle.labelType==JKQTPCALTdate) {
+ if (axisStyle.tickLabelType==JKQTPCALTdate) {
QDateTime dt;
dt.setMSecsSinceEpoch(0);
//qDebug()<<" dt="<- =1000) TickSpacing=width/static_cast(axisStyle.minTicks);
//qDebug()<<"TickSpacing="< "<0) {
num=num+denom*intpart;
intpart=0;
@@ -438,13 +438,13 @@ QString JKQTPCoordinateAxis::floattolabel(double data, int past_comma) const {
QString res;
if (rounded==0.0 || (intpart==0 && num==0)) res= "0";
else {
- if (intpart==0 && sign<0) res+="-";
+ if (sign<0) res+="-";
if (intpart!=0) res+=QString::number(intpart);
if (num!=0) {
- if (denom==1) res=QString::number(num);
+ if (denom==1) res+=QString::number(num);
else {
- if (axisStyle.labelType==JKQTPCALTfrac || axisStyle.labelType==JKQTPCALTintfrac) res+=QString("\\frac{%1}{%2}").arg(num).arg(denom);
- else if (axisStyle.labelType==JKQTPCALTsfrac || axisStyle.labelType==JKQTPCALTintsfrac) res+=QString("\\sfrac{%1}{%2}").arg(num).arg(denom);
+ if (axisStyle.tickLabelType==JKQTPCALTfrac || axisStyle.tickLabelType==JKQTPCALTintfrac) res+=QString("\\frac{%1}{%2}").arg(num).arg(denom);
+ else if (axisStyle.tickLabelType==JKQTPCALTsfrac || axisStyle.tickLabelType==JKQTPCALTintsfrac) res+=QString("\\sfrac{%1}{%2}").arg(num).arg(denom);
else {
if (res.size()>0 && res[res.size()-1].isDigit()) {
if (sign<0) res+="-";
@@ -748,8 +748,8 @@ void JKQTPCoordinateAxis::setUserLogTickSpacing(double __value) {
redrawPlot();
}
-void JKQTPCoordinateAxis::setLabelType(JKQTPCALabelType __value) {
- this->axisStyle.labelType = __value;
+void JKQTPCoordinateAxis::setTickLabelType(JKQTPCALabelType __value) {
+ this->axisStyle.tickLabelType = __value;
this->paramsChanged=true;
redrawPlot();
}
@@ -990,6 +990,42 @@ void JKQTPCoordinateAxis::setTickLabelAngle(double __value) {
redrawPlot();
}
+void JKQTPCoordinateAxis::setArrowSizeFactor(double f) {
+ axisStyle.arrowSizeFactor=f;
+ this->paramsChanged=true;
+ redrawPlot();
+}
+
+void JKQTPCoordinateAxis::setLabelColor(QColor c) {
+ axisStyle.labelColor=c;
+ this->paramsChanged=true;
+ redrawPlot();
+}
+
+void JKQTPCoordinateAxis::setMinorTickColor(QColor c) {
+ axisStyle.minorTickColor=c;
+ this->paramsChanged=true;
+ redrawPlot();
+}
+
+void JKQTPCoordinateAxis::setMinorTickLabelColor(QColor c) {
+ axisStyle.minorTickLabelColor=c;
+ this->paramsChanged=true;
+ redrawPlot();
+}
+
+void JKQTPCoordinateAxis::setTickColor(QColor c) {
+ axisStyle.tickColor=c;
+ this->paramsChanged=true;
+ redrawPlot();
+}
+
+void JKQTPCoordinateAxis::setTickLabelColor(QColor c) {
+ axisStyle.tickLabelColor=c=c;
+ this->paramsChanged=true;
+ redrawPlot();
+}
+
void JKQTPCoordinateAxis::setAbsoluteRange(double amin, double amax) {
axisabsoultemin=std::min(amin, amax);
@@ -1073,7 +1109,6 @@ QSizeF JKQTPCoordinateAxis::getMaxTickLabelSize(JKQTPEnhancedPainter& painter, d
QFont f;
f.setFamily(JKQTMathTextFontSpecifier::fromFontSpec(getParent()->getCurrentPlotterStyle().defaultFontName).fontName());
f.setPointSizeF(this->axisStyle.tickLabelFontSize*parent->getFontSizeMultiplier());
- QFontMetricsF fm(f);
bool first=true;
int cnt=0;
while (getNextLabel(x, label, first) && cnt<50) {
@@ -1096,7 +1131,16 @@ QSizeF JKQTPCoordinateAxis::getMaxTickLabelSize(JKQTPEnhancedPainter& painter, d
}
}
-
+void JKQTPCoordinateAxis::drawAxisLine(JKQTPEnhancedPainter& painter, const QLineF& l, JKQTPCADrawMode drawMode) const {
+ const double arrowSize=axisStyle.getArrowSize(painter, parent);
+ JKQTPLineDecoratorStyle st1=JKQTPNoDecorator, st2=JKQTPNoDecorator;
+ if (drawMode.testFlag(JKQTPCADMMinArrow)) st1=JKQTPArrow;
+ if (drawMode.testFlag(JKQTPCADMMinFilledArrow)) st1=JKQTPFilledArrow;
+ if (drawMode.testFlag(JKQTPCADMMaxArrow)) st2=JKQTPArrow;
+ if (drawMode.testFlag(JKQTPCADMMaxFilledArrow)) st2=JKQTPFilledArrow;
+ JKQTPPlotDecoratedLine(painter, l, st1, arrowSize,
+ st2, arrowSize);
+}
@@ -1127,39 +1171,41 @@ double JKQTPVerticalAxis::getParentPlotOffset() const {
QSizeF JKQTPVerticalAxis::getSize1(JKQTPEnhancedPainter& painter) {
if (axisStyle.drawMode1==JKQTPCADMnone) return QSize(0,0);
double ptwidth=axisStyle.axisLineOffset;
+ const double arrowSize=(axisStyle.drawMode1.testAnyFlags(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))?(axisStyle.getArrowSize(painter, parent)/2.0):0.0;
double labwidth=0;
- if (JKQTPCADrawModeHasTicks(axisStyle.drawMode1)) ptwidth+=axisStyle.tickOutsideLength;
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode1)) {
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTicks)) ptwidth+=axisStyle.tickOutsideLength;
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)) {
ptwidth+=axisStyle.tickLabelDistance;
// find out the maximum width over all visible plot labels
labwidth+=getMaxTickLabelSize(painter).width();
}
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode1)) {
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMAxisLabel)) {
ptwidth+=axisStyle.labelDistance;
// find out size of axis label
labwidth+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
}
- return QSizeF(parent->pt2px(painter, ptwidth)+labwidth, getParentPlotWidth());
+ return QSizeF(qMax(parent->pt2px(painter, ptwidth)+labwidth, arrowSize), getParentPlotWidth());
}
QSizeF JKQTPVerticalAxis::getSize2(JKQTPEnhancedPainter& painter) {
if (axisStyle.drawMode2==JKQTPCADMnone) return QSize(0,0);
double ptwidth=axisStyle.axisLineOffset;
+ const double arrowSize=(axisStyle.drawMode1.testAnyFlags(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))?(axisStyle.getArrowSize(painter, parent)/2.0):0.0;
double labwidth=0;
- if (JKQTPCADrawModeHasTicks(axisStyle.drawMode2)) ptwidth+=axisStyle.tickOutsideLength;
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode2)) {
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTicks)) ptwidth+=axisStyle.tickOutsideLength;
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels)) {
ptwidth+=axisStyle.tickLabelDistance;
// find out the maximum width over all visible plot labels
labwidth+=getMaxTickLabelSize(painter).width();
}
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode2)) {
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMAxisLabel)) {
ptwidth+=axisStyle.labelDistance;
// find out size of axis label
labwidth+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
}
- return QSizeF(parent->pt2px(painter, ptwidth)+labwidth, getParentPlotWidth());
+ return QSizeF(qMax(arrowSize, parent->pt2px(painter, ptwidth)+labwidth), getParentPlotWidth());
}
@@ -1251,17 +1297,18 @@ void JKQTPVerticalAxis::drawGrids(JKQTPEnhancedPainter& painter) {
//qDebug()<<" end JKQTPVerticalAxis::drawGrids(";
}
-void JKQTPVerticalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, const QString& label, double fontSize)
+void JKQTPVerticalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, double labelOffset, const QString& label, double fontSize, bool isMinor)
{
getParentMathText()->setFontSize(fontSize*parent->getFontSizeMultiplier());
getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
- getParentMathText()->setFontColor(axisStyle.axisColor);
+ getParentMathText()->setFontColor(axisStyle.tickLabelColor);
+ if (isMinor) getParentMathText()->setFontColor(axisStyle.minorTickLabelColor);
getParentMathText()->parse(label);
double width, ascent, descent, strikeoutPos;
getParentMathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos);
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode1)) {
- double lx=xx-parent->pt2px(painter, axisStyle.minorTickOutsideLength+axisStyle.tickLabelDistance)-width;
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)) {
+ double lx=xx-parent->pt2px(painter, labelOffset)-width;
if (axisStyle.tickLabelAngle==90) {
painter.save(); auto __finalpaint=JKQTPFinally([&painter]() {painter.restore();});
painter.translate(lx+width-1.25*strikeoutPos, yy-width/2.0);
@@ -1291,18 +1338,19 @@ void JKQTPVerticalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx,
}
}
-void JKQTPVerticalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize)
+void JKQTPVerticalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, double labelOffset, const QString &label, double fontSize, bool isMinor)
{
getParentMathText()->setFontSize(fontSize*parent->getFontSizeMultiplier());
getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
- getParentMathText()->setFontColor(axisStyle.axisColor);
+ getParentMathText()->setFontColor(axisStyle.tickLabelColor);
+ if (isMinor) getParentMathText()->setFontColor(axisStyle.minorTickLabelColor);
getParentMathText()->parse(label);
double width, ascent, descent, strikeoutPos;
getParentMathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos);
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode2)) {
- double lx=xx+parent->pt2px(painter, axisStyle.tickOutsideLength+axisStyle.tickLabelDistance);
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels)) {
+ double lx=xx+parent->pt2px(painter, labelOffset);
if (axisStyle.tickLabelAngle==90) {
painter.save(); auto __finalpaint=JKQTPFinally([&painter]() {painter.restore();});
painter.translate(lx+descent, yy-width/2.0);
@@ -1333,6 +1381,99 @@ void JKQTPVerticalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx,
}
}
+void JKQTPVerticalAxis::drawAxisLabel1(JKQTPEnhancedPainter &painter, double left, double bottom, QSizeF labelMax) {
+ double labelOffset=parent->pt2px(painter, axisStyle.labelDistance);
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTicks)) labelOffset+=parent->pt2px(painter, axisStyle.tickOutsideLength);
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)) {
+ labelOffset+=parent->pt2px(painter, axisStyle.tickLabelDistance);
+ labelOffset+=labelMax.width();//+labelMax.height();
+ }
+
+
+ getParentMathText()->setFontSize(axisStyle.labelFontSize*parent->getFontSizeMultiplier());
+ getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
+ getParentMathText()->setFontColor(axisStyle.labelColor);
+ getParentMathText()->parse(axisLabel);
+ const JKQTMathTextNodeSize labelsize=getParentMathText()->getSizeDetail(painter);
+
+
+ QRectF rect(0,0, getParentPlotWidth(), labelsize.overallHeight);//plotBorderLeft-30);
+ painter.save(); auto __finalpaintiner=JKQTPFinally([&painter]() {painter.restore();});
+ painter.translate(QPointF(left-labelOffset-rect.height(), bottom));
+ painter.rotate(-90);
+ //JKQTPEnhancedPainter::RenderHints h=painter.renderHints();
+ //painter.drawRect(rect);
+ //painter.drawEllipse(-4, -4, 8, 8);
+ switch(axisStyle.labelPosition) {
+ case JKQTPLabelMax:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ case JKQTPLabelMin:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ case JKQTPLabelCenter:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ }
+ if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
+ painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
+ QPen p("magenta");
+ QColor col=p.color(); col.setAlphaF(0.8f); p.setColor(col);
+ p.setWidthF(getParent()->getCurrentPlotterStyle().debugRegionLineWidth/2.0);
+ painter.setPen(p);
+ painter.setBrush(QBrush(QColor(Qt::transparent)));
+ painter.drawRect(rect);
+ }
+ painter.resetTransform();
+}
+
+void JKQTPVerticalAxis::drawAxisLabel2(JKQTPEnhancedPainter &painter, double right, double bottom, QSizeF labelMax) {
+ double labelOffset=parent->pt2px(painter, axisStyle.labelDistance);
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTicks)) labelOffset+=parent->pt2px(painter, axisStyle.tickOutsideLength);
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels)) {
+ labelOffset+=parent->pt2px(painter, axisStyle.tickLabelDistance);
+ labelOffset+=labelMax.width();//+labelMax.height();
+ }
+
+
+ getParentMathText()->setFontSize(axisStyle.labelFontSize*parent->getFontSizeMultiplier());
+ getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
+ getParentMathText()->setFontColor(axisStyle.labelColor);
+ getParentMathText()->parse(axisLabel);
+ const JKQTMathTextNodeSize labelsize=getParentMathText()->getSizeDetail(painter);
+
+
+ QRectF rect(0,0, getParentPlotWidth(), labelsize.overallHeight);//plotBorderLeft-30);
+ painter.save(); auto __finalpaintinner=JKQTPFinally([&painter]() {painter.restore();});
+ painter.translate(QPointF(right+labelOffset, bottom));
+ painter.rotate(-90);
+
+ //JKQTPEnhancedPainter::RenderHints h=painter.renderHints();
+ //painter.drawRect(rect);
+ //painter.drawEllipse(-4, -4, 8, 8);
+ switch(axisStyle.labelPosition) {
+ case JKQTPLabelMax:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ case JKQTPLabelMin:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ case JKQTPLabelCenter:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ }
+ if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
+ painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
+ QPen p("magenta");
+ QColor col=p.color(); col.setAlphaF(0.8f); p.setColor(col);
+ p.setWidthF(getParent()->getCurrentPlotterStyle().debugRegionLineWidth/2.0);
+ painter.setPen(p);
+ painter.setBrush(QBrush(QColor(Qt::transparent)));
+ painter.drawRect(rect);
+ }
+ painter.resetTransform();
+}
+
void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) {
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaat(QString("JKQTPEnhancedPainter[%1]::drawAxes()").arg(objectName()));
@@ -1359,6 +1500,21 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) {
// move axes outside plot rectangle, if required
left-=parent->pt2px(painter, axisStyle.axisLineOffset);
right+=parent->pt2px(painter, axisStyle.axisLineOffset);
+
+
+ double ticklabelOffset1PT=axisStyle.tickLabelDistance; // offset of tick labels from axis 1
+ double minorticklabelOffset1PT=axisStyle.tickLabelDistance; // offset ofminor tick labels from axis 1
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTicks)) {
+ ticklabelOffset1PT+=axisStyle.tickOutsideLength;
+ minorticklabelOffset1PT+=axisStyle.minorTickOutsideLength;
+ }
+ double ticklabelOffset2PT=axisStyle.tickLabelDistance; // offset of tick labels from axis 2
+ double minorticklabelOffset2PT=axisStyle.tickLabelDistance; // offset ofminor tick labels from axis 2
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTicks)) {
+ ticklabelOffset2PT+=axisStyle.tickOutsideLength;
+ minorticklabelOffset2PT+=axisStyle.minorTickOutsideLength;
+ }
+
//qDebug()<<"JKQTPVerticalAxis:";
//qDebug()<<" left="<pt2px(painter, axisStyle.lineWidth*parent->getLineWidthMultiplier())));
- pmain.setStyle(Qt::SolidLine);
-
- QPen ptick=pmain;
- ptick.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, parent->pt2px(painter, axisStyle.tickWidth*parent->getLineWidthMultiplier())));
-
- QPen pmtick=ptick;
- pmtick.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, parent->pt2px(painter, axisStyle.minorTickWidth*parent->getLineWidthMultiplier())));
+ const QPen pmain=axisStyle.getAxisPen(painter, parent);
+ const QPen ptick=axisStyle.getTickPen(painter, parent);
+ const QPen pmtick=axisStyle.getMinorTickPen(painter, parent);
getParentMathText()->setFontSize(this->axisStyle.tickLabelFontSize*parent->getFontSizeMultiplier());
getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
getParentMathText()->setFontColor(axisStyle.axisColor);
- painter.setPen(pmain);
// plot thick axis at y==0
- if (axisStyle.showZeroAxis && (0>axismin) && (0=axismin) && (0<=axismax)) {
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaati(QString("JKQTPEnhancedPainter[%1]::drawAxes(): 0Axis").arg(objectName()));
#endif
- QPen pmain1=pmain;
- pmain1.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, parent->pt2px(painter, axisStyle.lineWidthZeroAxis*parent->getLineWidthMultiplier())));
- pmain1.setColor(axisStyle.colorZeroAxis);
- pmain1.setStyle(axisStyle.styleZeroAxis);
+ const QPen pmain1=axisStyle.getZeroAxisPen(painter, parent);
painter.setPen(pmain1);
- QLineF l(left-parent->pt2px(painter, axisStyle.tickOutsideLength), x2p(0), right+parent->pt2px(painter, axisStyle.tickOutsideLength), x2p(0));
- painter.drawLine(l);
-
- painter.setPen(pmain);
+ const QLineF l(left-parent->pt2px(painter, axisStyle.tickOutsideLength), x2p(0), right+parent->pt2px(painter, axisStyle.tickOutsideLength), x2p(0));
+ if (l.length()>0) painter.drawLine(l);
}
- // draw thick axis lines, left and/or right
- if ( JKQTPCADrawModeHasLine(axisStyle.drawMode1)) {
- QLineF l(left, x2p(axismin), left, x2p(axismax));
- painter.drawLine(l);
+ painter.setPen(pmain);
+ painter.setBrush(pmain.color());
+
+ // draw thick axis lines, left and/or right with optional arrows, but wihtou ticks
+ if ( axisStyle.drawMode1.testFlag(JKQTPCADMLine)) {
+ const QLineF l(left, x2p(axismin), left, x2p(axismax));
+ drawAxisLine(painter, l, axisStyle.drawMode1);
}
- if (JKQTPCADrawModeHasLine(axisStyle.drawMode2)) {
- QLineF l(right, x2p(axismin), right, x2p(axismax));
- painter.drawLine(l);
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMLine)) {
+ const QLineF l(right, x2p(axismin), right, x2p(axismax));
+ drawAxisLine(painter, l, axisStyle.drawMode1);
}
+ painter.setBrush(Qt::NoBrush);
// plot minor and major ticks + tick labels
- QSizeF labelMax=getMaxTickLabelSize(painter);
- double x=tickStart;
+ const QSizeF labelMax=getMaxTickLabelSize(painter);
+ double y=tickStart;
QString label="";
bool first=true;
// loop through all labels, as they are at the major ticks
int cnt=0;
+ const double arrowFreeSpace=axisStyle.getArrowSize(painter, parent)*1.2;
QVector lines_ptick, lines_ptick2;
QVector lines_pmtick, lines_pmtick2;
@@ -1439,102 +1587,74 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) {
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaatii(QString("JKQTPEnhancedPainter[%1]::drawAxes(): calcLabels").arg(objectName()));
#endif
- while (getNextLabel(x, label, first) && cnt<200) {
- double mtdist=getNextLabelDistance(x)/static_cast(axisStyle.minorTicks+1);
-
- double xleft=-1000000;
- double xx=x2p(x);
+ while (getNextLabel(y, label, first) && cnt<200) {
+ const double mtdist=getNextLabelDistance(y)/static_cast(axisStyle.minorTicks+1); // distance of minor ticks
+ const double yy=x2p(y); // y tick position
//qDebug()<<" tick @ x="<=axismin)) {
+ const QLineF l(left-parent->pt2px(painter, axisStyle.tickOutsideLength), yy, left+parent->pt2px(painter, axisStyle.tickInsideLength), yy);
+ if (l.length()>0) lines_ptick.append(l);
}
- //painter.setPen(pmtick);
- if ((tickLabels.size()<=0) && (axisStyle.minorTicks>0)) {
- double mx=x+mtdist;
- int minTickCnt=axisStyle.minorTicks;
- if (isLogAxis()) {
- if (mtdist>x) {
- mx=mtdist;
- } else {
- minTickCnt--;
- mx=2.0*mtdist;
- }
- }
- for (int i=0; i "<=axismin) {
- QLineF l(xleft=left-parent->pt2px(painter, axisStyle.minorTickOutsideLength), mxx, left+parent->pt2px(painter, axisStyle.minorTickInsideLength), mxx);
- if (l.length()>0) lines_pmtick.append(l);//painter.drawLine(l);
- //qDebug()<<"minortick: "<=axismin)) {
+ const QLineF l(right+parent->pt2px(painter, axisStyle.tickOutsideLength), yy, right-parent->pt2px(painter, axisStyle.tickInsideLength), yy);
+ if (l.length()>0) lines_ptick.append(l);
+ }
- if (axisStyle.minorTickLabelsEnabled&&JKQTPCADrawModeHasTickLabels(axisStyle.drawMode1)) {
- if (axisStyle.minorTickLabelFullNumber) val=mx;
- QString minorlabel=floattolabel(val);
- drawTickLabel1(painter, left, mxx, minorlabel, axisStyle.minorTickLabelFontSize);
- //drawTickLabel2(painter, right, xx, minorlabel, axisStyle.minorTickLabelFontSize);
+ // calculate minor ticks and draw minor tick labels
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTicks)||axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)||axisStyle.drawMode2.testFlag(JKQTPCADMTicks)||axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels)) {
+ // minor ticks only if no user-defined tickLabels were set and if minor ticks are actiavted (i.e. minorTicks>0)
+ if ((tickLabels.size()<=0) && (axisStyle.minorTicks>0)) {
+ double my=y+mtdist; // location of first minor tick
+ int minTickCnt=axisStyle.minorTicks; // number of minor ticks
+ if (isLogAxis()) {
+ if (mtdist>y) {
+ my=mtdist;
+ } else {
+ minTickCnt--;
+ my=2.0*mtdist;
}
+
}
- mx=mx+mtdist;
+ for (int i=0; i "<=axismin) {
- }
- }
- }
- if (JKQTPCADrawModeHasTicks(axisStyle.drawMode2)||JKQTPCADrawModeHasTickLabels(axisStyle.drawMode2)) {
- //painter.setPen(ptick);
- if (x<=axismax && x>=axismin) {
- QLineF l(right-parent->pt2px(painter, axisStyle.tickInsideLength), xx, right+parent->pt2px(painter, axisStyle.tickOutsideLength), xx);
- if (l.length()>0) lines_ptick2.append(l);//painter.drawLine(l);
- //qDebug()<<"tick2: "<0&&axisStyle.drawMode1.testFlag(JKQTPCADMTicks)) {
+ const QLineF l(left-parent->pt2px(painter, axisStyle.minorTickOutsideLength), my_pix, left+parent->pt2px(painter, axisStyle.minorTickInsideLength), my_pix);
+ if (l.length()>0) lines_pmtick.append(l);
+ }
+ // calculate minor tick lines, axis 2
+ if (axisStyle.minorTicks>0&&axisStyle.drawMode2.testFlag(JKQTPCADMTicks)) {
+ const QLineF l(right+parent->pt2px(painter, axisStyle.minorTickOutsideLength), my_pix, right-parent->pt2px(painter, axisStyle.minorTickInsideLength), my_pix);
+ if (l.length()>0) lines_pmtick.append(l);
+ }
- }
- //painter.setPen(pmtick);
- if ((tickLabels.size()<=0) && (axisStyle.minorTicks>0)) {
- double mx=x+mtdist;
- int minTickCnt=axisStyle.minorTicks;
- if (isLogAxis()) {
- if (mtdist>x) {
- mx=mtdist;
- } else {
- minTickCnt--;
- mx=2.0*mtdist;
- }
-
- }
- for (int i=0; i=axismin) {
- QLineF l(right-parent->pt2px(painter, axisStyle.minorTickInsideLength), mxx, xleft=(right+parent->pt2px(painter, axisStyle.minorTickOutsideLength)), mxx);
- if (l.length()>0) lines_pmtick2.append(l);//painter.drawLine(l);
- //qDebug()<<"minortick2: "<0&&(axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)||axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels))) {
+ double val= my/pow(logAxisBase,floor(log(my)/log(logAxisBase)));
+ if (axisStyle.minorTickLabelFullNumber) val=my;
+ const QString minorlabel=floattolabel(val);
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)) drawTickLabel1(painter, left, my_pix, minorticklabelOffset1PT, minorlabel, axisStyle.minorTickLabelFontSize, true);
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels)) drawTickLabel2(painter, right, my_pix, minorticklabelOffset2PT, minorlabel, axisStyle.minorTickLabelFontSize, true);
+ }
}
+ my=my+mtdist;
}
- mx=mx+mtdist;
}
}
- }
-
- if ((label!="") && (x<=axismax && x>=axismin)) {
-
-
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode1)) drawTickLabel1(painter, left, xx, label, this->axisStyle.tickLabelFontSize);
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode2)) drawTickLabel2(painter, right, xx, label, this->axisStyle.tickLabelFontSize);
+ if (!label.isEmpty() && (y<=axismax && y>=axismin)) {
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)) drawTickLabel1(painter, left, yy, ticklabelOffset1PT, label, this->axisStyle.tickLabelFontSize, false);
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels)) drawTickLabel2(painter, right, yy, ticklabelOffset2PT, label, this->axisStyle.tickLabelFontSize, false);
+ }
}
first=false;
cnt++;
@@ -1544,103 +1664,32 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) {
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaati(QString("JKQTPEnhancedPainter[%1]::drawAxes(): drawLines").arg(objectName()));
#endif
- painter.setPen(ptick);
- painter.drawLines(lines_ptick);
- painter.drawLines(lines_ptick2);
- painter.setPen(pmtick);
- painter.drawLines(lines_pmtick);
- painter.drawLines(lines_pmtick2);
- //qDebug()<<"left="<0) qDebug()<<" lines_ptick2[0]="<0) qDebug()<<" lines_pmtick2[0]="<setFontSize(axisStyle.labelFontSize*parent->getFontSizeMultiplier());
- getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
- getParentMathText()->parse(axisLabel);
- double width, ascent, descent, strikeoutPos;
- getParentMathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos);
-
-
- QRectF rect(0,0, getParentPlotWidth(), ascent+descent);//plotBorderLeft-30);
- painter.save(); auto __finalpaintiner=JKQTPFinally([&painter]() {painter.restore();});
- painter.translate(QPointF(left-parent->pt2px(painter, axisStyle.tickOutsideLength+axisStyle.tickLabelDistance+axisStyle.labelDistance)-descent-labelMax.width()-labelMax.height(), bottom));
- painter.rotate(-90);
- //JKQTPEnhancedPainter::RenderHints h=painter.renderHints();
- //painter.drawRect(rect);
- //painter.drawEllipse(-4, -4, 8, 8);
- switch(axisStyle.labelPosition) {
- case JKQTPLabelMax:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- case JKQTPLabelMin:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- case JKQTPLabelCenter:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- }
- if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
- painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
- QPen p("magenta");
- QColor col=p.color(); col.setAlphaF(0.8f); p.setColor(col);
- p.setWidthF(getParent()->getCurrentPlotterStyle().debugRegionLineWidth/2.0);
- painter.setPen(p);
- painter.setBrush(QBrush(QColor(Qt::transparent)));
- painter.drawRect(rect);
-
- }
- painter.resetTransform();
-
+ if (!axisLabel.isEmpty() && axisStyle.drawMode1.testFlag(JKQTPCADMAxisLabel)) {
+#ifdef JKQTBP_AUTOTIMER
+ JKQTPAutoOutputTimer jkaati(QString("JKQTPEnhancedPainter[%1]::drawAxes(): axisLabel1").arg(objectName()));
+#endif
+ drawAxisLabel1(painter, left, bottom, labelMax);
}
- if (!axisLabel.isEmpty() && JKQTPCADrawModeHasAxisLabel(axisStyle.drawMode2)) {
+ if (!axisLabel.isEmpty() && axisStyle.drawMode2.testFlag(JKQTPCADMAxisLabel)) {
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaati(QString("JKQTPEnhancedPainter[%1]::drawAxes(): axisLabel2").arg(objectName()));
#endif
- getParentMathText()->setFontSize(axisStyle.labelFontSize*parent->getFontSizeMultiplier());
- getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
- getParentMathText()->parse(axisLabel);
-
-
- QRectF rect(0,0, getParentPlotWidth(), getParentMathText()->getSize(painter).height());//plotBorderLeft-30);
- painter.save(); auto __finalpaintinner=JKQTPFinally([&painter]() {painter.restore();});
- painter.translate(QPointF(right+parent->pt2px(painter, axisStyle.tickOutsideLength+axisStyle.tickLabelDistance+axisStyle.labelDistance)+labelMax.width(), bottom));
- painter.rotate(-90);
- //JKQTPEnhancedPainter::RenderHints h=painter.renderHints();
- //painter.drawRect(rect);
- //painter.drawEllipse(-4, -4, 8, 8);
- switch(axisStyle.labelPosition) {
- case JKQTPLabelMax:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- case JKQTPLabelMin:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- case JKQTPLabelCenter:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- }
- if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
- painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
- QPen p("magenta");
- QColor col=p.color(); col.setAlphaF(0.8f); p.setColor(col);
- p.setWidthF(getParent()->getCurrentPlotterStyle().debugRegionLineWidth/2.0);
- painter.setPen(p);
- painter.setBrush(QBrush(QColor(Qt::transparent)));
- painter.drawRect(rect);
-
- }
- //painter.resetTransform();
-
+ drawAxisLabel2(painter, right, bottom, labelMax);
}
@@ -1666,10 +1715,6 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) {
-
-
-
-
JKQTPVerticalIndependentAxis::JKQTPVerticalIndependentAxis(double _axisOffset, double _axisWidth, double _otherAxisOffset, double _otherAxisWidth, JKQTBasePlotter* parent):
JKQTPVerticalAxis(parent),
axisOffset(_axisOffset),
@@ -1768,40 +1813,42 @@ double JKQTPHorizontalAxis::getParentPlotOffset() const {
QSizeF JKQTPHorizontalAxis::getSize1(JKQTPEnhancedPainter& painter) {
if (axisStyle.drawMode1==JKQTPCADMnone) return QSize(0,0);
- double ptwidth=axisStyle.axisLineOffset;
- double labwidth=0;
- if (JKQTPCADrawModeHasTicks(axisStyle.drawMode1)) ptwidth+=axisStyle.tickOutsideLength;
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode1)) {
- ptwidth+=axisStyle.tickLabelDistance;
+ double ptheight=axisStyle.axisLineOffset;
+ const double arrowSize=(axisStyle.drawMode1.testAnyFlags(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))?(axisStyle.getArrowSize(painter, parent)/2.0):0.0;
+ double labheight=0;
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTicks)) ptheight+=axisStyle.tickOutsideLength;
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)) {
+ ptheight+=axisStyle.tickLabelDistance;
// find out the maximum width over all visible plot labels
- labwidth+=getMaxTickLabelSize(painter).height();
+ labheight+=getMaxTickLabelSize(painter).height();
}
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode1)) {
- ptwidth+=axisStyle.labelDistance;
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMAxisLabel)) {
+ ptheight+=axisStyle.labelDistance;
// find out size of axis label
- labwidth+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
+ labheight+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
}
- return QSizeF(getParentPlotWidth(), parent->pt2px(painter, ptwidth)+labwidth);
+ return QSizeF(getParentPlotWidth(), qMax(arrowSize,parent->pt2px(painter, ptheight)+labheight));
}
QSizeF JKQTPHorizontalAxis::getSize2(JKQTPEnhancedPainter& painter) {
if (axisStyle.drawMode2==JKQTPCADMnone) return QSize(0,0);
- double ptwidth=axisStyle.axisLineOffset;
- double labwidth=0;
- if (JKQTPCADrawModeHasTicks(axisStyle.drawMode2)) ptwidth+=axisStyle.tickOutsideLength;
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode2)) {
- ptwidth+=axisStyle.tickLabelDistance;
+ double ptheight=axisStyle.axisLineOffset;
+ const double arrowSize=(axisStyle.drawMode1.testAnyFlags(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))?(axisStyle.getArrowSize(painter, parent)/2.0):0.0;
+ double labheight=0;
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTicks)) ptheight+=axisStyle.tickOutsideLength;
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels)) {
+ ptheight+=axisStyle.tickLabelDistance;
// find out the maximum width over all visible plot labels
- labwidth+=getMaxTickLabelSize(painter).height();
+ labheight+=getMaxTickLabelSize(painter).height();
}
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode2)) {
- ptwidth+=axisStyle.labelDistance;
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMAxisLabel)) {
+ ptheight+=axisStyle.labelDistance;
// find out size of axis label
- labwidth+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
+ labheight+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
}
- return QSizeF(getParentPlotWidth(), parent->pt2px(painter, ptwidth)+labwidth);
+ return QSizeF(getParentPlotWidth(), qMax(arrowSize,parent->pt2px(painter, ptheight)+labheight));
}
@@ -1883,68 +1930,161 @@ void JKQTPHorizontalAxis::drawGrids(JKQTPEnhancedPainter& painter) {
}
-void JKQTPHorizontalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize, double ascentMax, double /*descentMax*/)
+void JKQTPHorizontalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, double labelOffset, const QString &label, double fontSize, double ascentMax, double /*descentMax*/, bool isMinor)
{
getParentMathText()->setFontSize(fontSize*parent->getFontSizeMultiplier());
getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
- getParentMathText()->setFontColor(axisStyle.axisColor);
+ getParentMathText()->setFontColor(axisStyle.tickLabelColor);
+ if (isMinor) getParentMathText()->setFontColor(axisStyle.minorTickLabelColor);
getParentMathText()->parse(label);
double width, ascent, descent, strikeoutPos;
getParentMathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos);
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode1)) {
- double lx0=yy+parent->pt2px(painter, axisStyle.tickOutsideLength+axisStyle.tickLabelDistance);
- double lx=lx0+ascentMax;
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)) {
+ const double ly0=yy+parent->pt2px(painter, labelOffset);
+ const double ly=ly0+ascentMax;
if (axisStyle.tickLabelAngle!=0) {
painter.save(); auto __finalpaint=JKQTPFinally([&painter]() {painter.restore();});
if (axisStyle.tickLabelAngle>0) {
- painter.translate(xx-fabs(ascent*sin(axisStyle.tickLabelAngle/180.0*JKQTPSTATISTICS_PI)/2.0), lx0+fabs(ascent*cos(axisStyle.tickLabelAngle/180.0*JKQTPSTATISTICS_PI)));
+ painter.translate(xx-fabs(ascent*sin(axisStyle.tickLabelAngle/180.0*JKQTPSTATISTICS_PI)/2.0), ly0+fabs(ascent*cos(axisStyle.tickLabelAngle/180.0*JKQTPSTATISTICS_PI)));
painter.rotate(axisStyle.tickLabelAngle);
} else {
- painter.translate(xx+fabs(ascent*sin(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)/2.0)-width*fabs(cos(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)), lx0+ascent*fabs(cos(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI))+fabs(width*sin(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)));
+ painter.translate(xx+fabs(ascent*sin(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)/2.0)-width*fabs(cos(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)), ly0+ascent*fabs(cos(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI))+fabs(width*sin(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)));
painter.rotate(axisStyle.tickLabelAngle);
}
getParentMathText()->draw(painter, 0,0, parent->getCurrentPlotterStyle().debugShowTextBoxes);
} else {
- getParentMathText()->draw(painter, xx-width/2.0, lx, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ getParentMathText()->draw(painter, xx-width/2.0, ly, parent->getCurrentPlotterStyle().debugShowTextBoxes);
}
}
}
-void JKQTPHorizontalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize, double /*ascentMax*/, double descentMax)
+void JKQTPHorizontalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, double labelOffset, const QString &label, double fontSize, double /*ascentMax*/, double descentMax, bool isMinor)
{
getParentMathText()->setFontSize(fontSize*parent->getFontSizeMultiplier());
getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
- getParentMathText()->setFontColor(axisStyle.axisColor);
+ getParentMathText()->setFontColor(axisStyle.tickLabelColor);
+ if (isMinor) getParentMathText()->setFontColor(axisStyle.minorTickLabelColor);
getParentMathText()->parse(label);
-
double width, ascent, descent, strikeoutPos;
getParentMathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos);
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode2)) {
- double lx0=yy-parent->pt2px(painter, axisStyle.tickOutsideLength+axisStyle.tickLabelDistance);
- double lx=lx0-descentMax;
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels)) {
+ const double ly0=yy-parent->pt2px(painter, labelOffset);
+ const double ly=ly0-descentMax;
if (axisStyle.tickLabelAngle!=0) {
painter.save(); auto __finalpaint=JKQTPFinally([&painter]() {painter.restore();});
if (axisStyle.tickLabelAngle>0) {
- painter.translate(xx+fabs(descent*sin(axisStyle.tickLabelAngle/180.0*JKQTPSTATISTICS_PI)/2.0), lx0-fabs(descent*cos(axisStyle.tickLabelAngle/180.0*JKQTPSTATISTICS_PI)));
+ painter.translate(xx+fabs(descent*sin(axisStyle.tickLabelAngle/180.0*JKQTPSTATISTICS_PI)/2.0), ly0-fabs(descent*cos(axisStyle.tickLabelAngle/180.0*JKQTPSTATISTICS_PI)));
painter.rotate(-axisStyle.tickLabelAngle);
} else {
- painter.translate(xx-fabs(descent*sin(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)/2.0)-width*fabs(cos(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)), lx0-descent*fabs(cos(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI))-fabs(width*sin(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)));
+ painter.translate(xx-fabs(descent*sin(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)/2.0)-width*fabs(cos(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)), ly0-descent*fabs(cos(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI))-fabs(width*sin(fabs(axisStyle.tickLabelAngle)/180.0*JKQTPSTATISTICS_PI)));
painter.rotate(-axisStyle.tickLabelAngle);
}
getParentMathText()->draw(painter, 0,0, parent->getCurrentPlotterStyle().debugShowTextBoxes);
} else {
- getParentMathText()->draw(painter, xx-width/2.0, lx, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ getParentMathText()->draw(painter, xx-width/2.0, ly, parent->getCurrentPlotterStyle().debugShowTextBoxes);
}
}
}
+
+void JKQTPHorizontalAxis::drawAxisLabel1(JKQTPEnhancedPainter &painter, double left, double bottom, QSizeF labelMax) {
+ double labelOffset=parent->pt2px(painter, axisStyle.labelDistance);
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTicks)) labelOffset+=parent->pt2px(painter, axisStyle.tickOutsideLength);
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)) {
+ labelOffset+=parent->pt2px(painter, axisStyle.tickLabelDistance);
+ labelOffset+=labelMax.height();//+labelMax.height();
+ }
+
+
+ getParentMathText()->setFontSize(axisStyle.labelFontSize*parent->getFontSizeMultiplier());
+ getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
+ getParentMathText()->setFontColor(axisStyle.labelColor);
+ getParentMathText()->parse(axisLabel);
+ double width, ascent, descent, strikeoutPos;
+ getParentMathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos);
+
+
+ QRectF rect(0,0, getParentPlotWidth(), ascent+descent);//plotBorderLeft-30);
+ painter.save(); auto __finalpaintinner=JKQTPFinally([&painter]() {painter.restore();});
+ painter.translate(QPointF(left, bottom+labelOffset));
+ //JKQTPEnhancedPainter::RenderHints h=painter.renderHints();
+ //painter.drawRect(rect);
+ //painter.drawEllipse(-4, -4, 8, 8);
+ switch(axisStyle.labelPosition) {
+ case JKQTPLabelMax:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ case JKQTPLabelMin:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ case JKQTPLabelCenter:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ }
+ if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
+ painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
+ QPen p("magenta");
+ QColor col=p.color(); col.setAlphaF(0.8f); p.setColor(col);
+ p.setWidthF(getParent()->getCurrentPlotterStyle().debugRegionLineWidth/2.0);
+ painter.setPen(p);
+ painter.setBrush(QBrush(QColor(Qt::transparent)));
+ painter.drawRect(rect);
+
+ }
+}
+
+void JKQTPHorizontalAxis::drawAxisLabel2(JKQTPEnhancedPainter &painter, double left, double top, QSizeF labelMax) {
+ double labelOffset=parent->pt2px(painter, axisStyle.labelDistance);
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTicks)) labelOffset+=parent->pt2px(painter, axisStyle.tickOutsideLength);
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTickLabels)) {
+ labelOffset+=parent->pt2px(painter, axisStyle.tickLabelDistance);
+ labelOffset+=labelMax.width();//+labelMax.height();
+ }
+
+
+ getParentMathText()->setFontSize(axisStyle.labelFontSize*parent->getFontSizeMultiplier());
+ getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
+ getParentMathText()->setFontColor(axisStyle.labelColor);
+ getParentMathText()->parse(axisLabel);
+
+
+ QRectF rect(0,0, getParentPlotWidth(), getParentMathText()->getSize(painter).height());//plotBorderLeft-30);
+ painter.save(); auto __finalpaintinner=JKQTPFinally([&painter]() {painter.restore();});
+ painter.translate(QPointF(left, top-labelOffset-rect.height()));
+ //JKQTPEnhancedPainter::RenderHints h=painter.renderHints();
+ //painter.drawRect(rect);
+ //painter.drawEllipse(-4, -4, 8, 8);
+ switch(axisStyle.labelPosition) {
+ case JKQTPLabelMax:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ case JKQTPLabelMin:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ case JKQTPLabelCenter:
+ getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+ break;
+ }
+ if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
+ painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
+ QPen p("magenta");
+ QColor col=p.color(); col.setAlphaF(0.8f); p.setColor(col);
+ p.setWidthF(getParent()->getCurrentPlotterStyle().debugRegionLineWidth/2.0);
+ painter.setPen(p);
+ painter.setBrush(QBrush(QColor(Qt::transparent)));
+ painter.drawRect(rect);
+
+ }
+ //painter.resetTransform();
+}
+
void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) {
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaat(QString("JKQTPHorizontalAxis[%1]::drawAxes()").arg(objectName()));
@@ -1972,6 +2112,19 @@ void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) {
top-=parent->pt2px(painter, axisStyle.axisLineOffset);
bottom+=parent->pt2px(painter, axisStyle.axisLineOffset);
+ double ticklabelOffset1PT=axisStyle.tickLabelDistance; // offset of tick labels from axis 1
+ double minorticklabelOffset1PT=axisStyle.tickLabelDistance; // offset ofminor tick labels from axis 1
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTicks)) {
+ ticklabelOffset1PT+=axisStyle.tickOutsideLength;
+ minorticklabelOffset1PT+=axisStyle.minorTickOutsideLength;
+ }
+ double ticklabelOffset2PT=axisStyle.tickLabelDistance; // offset of tick labels from axis 2
+ double minorticklabelOffset2PT=axisStyle.tickLabelDistance; // offset ofminor tick labels from axis 2
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTicks)) {
+ ticklabelOffset2PT+=axisStyle.tickOutsideLength;
+ minorticklabelOffset2PT+=axisStyle.minorTickOutsideLength;
+ }
+
//qDebug()<<" left="<pt2px(painter, axisStyle.lineWidth*parent->getLineWidthMultiplier())));
- pmain.setStyle(Qt::SolidLine);
-
- QPen ptick=pmain;
- ptick.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, parent->pt2px(painter, axisStyle.tickWidth*parent->getLineWidthMultiplier())));
-
- QPen pmtick=ptick;
- pmtick.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, parent->pt2px(painter, axisStyle.minorTickWidth*parent->getLineWidthMultiplier())));
+ const QPen pmain=axisStyle.getAxisPen(painter, parent);
+ const QPen ptick=axisStyle.getTickPen(painter, parent);
+ const QPen pmtick=axisStyle.getMinorTickPen(painter, parent);
getParentMathText()->setFontSize(this->axisStyle.tickLabelFontSize*parent->getFontSizeMultiplier());
getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
getParentMathText()->setFontColor(axisStyle.axisColor);
- painter.setPen(pmain);
// plot thick axis at y==0
if (axisStyle.showZeroAxis && (0>axismin) && (0pt2px(painter, axisStyle.lineWidthZeroAxis*parent->getLineWidthMultiplier())));
- pmain1.setColor(axisStyle.colorZeroAxis);
- pmain1.setStyle(axisStyle.styleZeroAxis);
- painter.setPen(pmain1);
- QLineF l(x2p(0), bottom+parent->pt2px(painter, axisStyle.tickOutsideLength), x2p(0), top-parent->pt2px(painter, axisStyle.tickOutsideLength));
- painter.drawLine(l);
- painter.setPen(pmain);
+ const QPen pmain1=axisStyle.getZeroAxisPen(painter, parent);
+ painter.setPen(pmain1);
+ const QLineF l(x2p(0), bottom+parent->pt2px(painter, axisStyle.tickOutsideLength), x2p(0), top-parent->pt2px(painter, axisStyle.tickOutsideLength));
+ if (l.length()>0) painter.drawLine(l);
}
+ painter.setPen(pmain);
+ painter.setBrush(pmain.color());
+
// draw thick axis lines, left and/or right
- if (JKQTPCADrawModeHasLine(axisStyle.drawMode1)) {
- QLineF l(x2p(axismin), bottom, x2p(axismax), bottom);
- painter.drawLine(l);
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMLine)) {
+ const QLineF l(x2p(axismin), bottom, x2p(axismax), bottom);
+ drawAxisLine(painter, l, axisStyle.drawMode1);
}
- if (JKQTPCADrawModeHasLine(axisStyle.drawMode2)) {
- QLineF l(x2p(axismin), top, x2p(axismax), top);
- painter.drawLine(l);
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMLine)) {
+ const QLineF l(x2p(axismin), top, x2p(axismax), top);
+ drawAxisLine(painter, l, axisStyle.drawMode2);
}
+ painter.setBrush(Qt::NoBrush);
// plot minor and major ticks + tick labels
double ascentMax, descentMax;
@@ -2040,6 +2185,7 @@ void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) {
QVector lines_ptick, lines_ptick2;
QVector lines_pmtick, lines_pmtick2;
+ const double arrowFreeSpace=axisStyle.getArrowSize(painter, parent)*1.2;
{
#ifdef JKQTBP_AUTOTIMER
@@ -2047,20 +2193,26 @@ void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) {
#endif
while (getNextLabel(x, label, first) && cnt<200) {
- double mtdist=getNextLabelDistance(x)/static_cast(axisStyle.minorTicks+1);
+ const double mtdist=getNextLabelDistance(x)/static_cast(axisStyle.minorTicks+1);
- double xleft=-1000000;
- double xx=x2p(x);
+ const double xx=x2p(x);
//qDebug()<<" tick @ x="<=axismin)) {
-
-
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode1)) drawTickLabel1(painter, xx, bottom, label, this->axisStyle.tickLabelFontSize, ascentMax, descentMax);
- if (JKQTPCADrawModeHasTickLabels(axisStyle.drawMode2)) drawTickLabel2(painter, xx, top, label, this->axisStyle.tickLabelFontSize, ascentMax, descentMax);
-
- }
first=false;
cnt++;
}
}
{
- #ifdef JKQTBP_AUTOTIMER
- JKQTPAutoOutputTimer jkaati(QString("JKQTPHorizontalAxis[%1]::drawAxes(): drawLines").arg(objectName()));
- #endif
-
- painter.setPen(ptick);
- painter.drawLines(lines_ptick);
- painter.drawLines(lines_ptick2);
- painter.setPen(pmtick);
- painter.drawLines(lines_pmtick);
- painter.drawLines(lines_pmtick2);
+ #ifdef JKQTBP_AUTOTIMER
+ JKQTPAutoOutputTimer jkaati(QString("JKQTPHorizontalAxis[%1]::drawAxes(): drawLines").arg(objectName()));
+ #endif
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMTicks)) {
+ painter.setPen(ptick);
+ painter.drawLines(lines_ptick);
+ painter.setPen(pmtick);
+ painter.drawLines(lines_pmtick);
+ }
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMTicks)) {
+ painter.setPen(ptick);
+ painter.drawLines(lines_ptick2);
+ painter.setPen(pmtick);
+ painter.drawLines(lines_pmtick2);
+ }
}
// plot axis label
- if (!axisLabel.isEmpty() && JKQTPCADrawModeHasAxisLabel(axisStyle.drawMode1)) {
+ if (!axisLabel.isEmpty() && axisStyle.drawMode1.testFlag(JKQTPCADMAxisLabel)) {
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaati(QString("JKQTPHorizontalAxis[%1]::drawAxes(): axisLabel1").arg(objectName()));
#endif
- getParentMathText()->setFontSize(axisStyle.labelFontSize*parent->getFontSizeMultiplier());
- getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
- getParentMathText()->parse(axisLabel);
- double width, ascent, descent, strikeoutPos;
- getParentMathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos);
-
-
- QRectF rect(0,0, getParentPlotWidth(), ascent+descent);//plotBorderLeft-30);
- painter.save(); auto __finalpaintinner=JKQTPFinally([&painter]() {painter.restore();});
- painter.translate(QPointF(left, bottom+parent->pt2px(painter, axisStyle.tickOutsideLength+axisStyle.tickLabelDistance+axisStyle.labelDistance)+labelMax.height()));
- //JKQTPEnhancedPainter::RenderHints h=painter.renderHints();
- //painter.drawRect(rect);
- //painter.drawEllipse(-4, -4, 8, 8);
- switch(axisStyle.labelPosition) {
- case JKQTPLabelMax:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- case JKQTPLabelMin:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- case JKQTPLabelCenter:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- }
- if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
- painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
- QPen p("magenta");
- QColor col=p.color(); col.setAlphaF(0.8f); p.setColor(col);
- p.setWidthF(getParent()->getCurrentPlotterStyle().debugRegionLineWidth/2.0);
- painter.setPen(p);
- painter.setBrush(QBrush(QColor(Qt::transparent)));
- painter.drawRect(rect);
-
- }
- //painter.resetTransform();
+ drawAxisLabel1(painter, left, bottom, labelMax);
}
- if (!axisLabel.isEmpty() && JKQTPCADrawModeHasAxisLabel(axisStyle.drawMode2)) {
+ if (!axisLabel.isEmpty() && axisStyle.drawMode2.testFlag(JKQTPCADMAxisLabel)) {
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaati(QString("JKQTPHorizontalAxis[%1]::drawAxes(): axisLabel2").arg(objectName()));
#endif
- getParentMathText()->setFontSize(axisStyle.labelFontSize*parent->getFontSizeMultiplier());
- getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
- getParentMathText()->parse(axisLabel);
-
-
- QRectF rect(0,0, getParentPlotWidth(), getParentMathText()->getSize(painter).height());//plotBorderLeft-30);
- painter.save(); auto __finalpaintinner=JKQTPFinally([&painter]() {painter.restore();});
- painter.translate(QPointF(left, top-parent->pt2px(painter, axisStyle.tickOutsideLength+axisStyle.tickLabelDistance+axisStyle.labelDistance)-labelMax.height()-rect.height()));
- //JKQTPEnhancedPainter::RenderHints h=painter.renderHints();
- //painter.drawRect(rect);
- //painter.drawEllipse(-4, -4, 8, 8);
- switch(axisStyle.labelPosition) {
- case JKQTPLabelMax:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- case JKQTPLabelMin:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- case JKQTPLabelCenter:
- getParentMathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
- break;
- }
- if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
- painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
- QPen p("magenta");
- QColor col=p.color(); col.setAlphaF(0.8f); p.setColor(col);
- p.setWidthF(getParent()->getCurrentPlotterStyle().debugRegionLineWidth/2.0);
- painter.setPen(p);
- painter.setBrush(QBrush(QColor(Qt::transparent)));
- painter.drawRect(rect);
-
- }
- //painter.resetTransform();
-
+ drawAxisLabel2(painter, left, top, labelMax);
}
if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.h b/lib/jkqtplotter/jkqtpcoordinateaxes.h
index f16fd7a5cb..288e2888c3 100644
--- a/lib/jkqtplotter/jkqtpcoordinateaxes.h
+++ b/lib/jkqtplotter/jkqtpcoordinateaxes.h
@@ -250,7 +250,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
/** \copydoc userLogTickSpacing */
inline double getUserLogTickSpacing() const { return this->userLogTickSpacing; }
/** \copydoc JKQTPCoordinateAxisStyle::labelType */
- inline JKQTPCALabelType getLabelType() const { return this->axisStyle.labelType; }
+ inline JKQTPCALabelType getTickLabelType() const { return this->axisStyle.tickLabelType; }
/** \copydoc axisLabel */
inline QString getAxisLabel() const { return this->axisLabel; }
/** \copydoc JKQTPCoordinateAxisStyle::labelPosition */
@@ -271,10 +271,22 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
inline unsigned int getMinorTicks() const { return this->axisStyle.minorTicks; }
/** \copydoc JKQTPCoordinateAxisStyle::tickOutsideLength */
inline double getTickOutsideLength() const { return this->axisStyle.tickOutsideLength; }
+ /** \copydoc JKQTPCoordinateAxisStyle::arrowSizeFactor */
+ inline double getArrowSizeFactor() const { return this->axisStyle.arrowSizeFactor; }
/** \copydoc JKQTPCoordinateAxisStyle::minorTickOutsideLength */
inline double getMinorTickOutsideLength() const { return this->axisStyle.minorTickOutsideLength; }
/** \copydoc JKQTPCoordinateAxisStyle::axisColor */
inline QColor getAxisColor() const { return this->axisStyle.axisColor; }
+ /** \copydoc JKQTPCoordinateAxisStyle::labelColor */
+ inline QColor getLabelColor() const { return this->axisStyle.labelColor; }
+ /** \copydoc JKQTPCoordinateAxisStyle::minorTickColor */
+ inline QColor getMinorTickColor() const { return this->axisStyle.minorTickColor; }
+ /** \copydoc JKQTPCoordinateAxisStyle::minorTickLabelColor */
+ inline QColor getMinorTickLabelColor() const { return this->axisStyle.minorTickLabelColor; }
+ /** \copydoc JKQTPCoordinateAxisStyle::tickColor */
+ inline QColor getTickColor() const { return this->axisStyle.tickColor; }
+ /** \copydoc JKQTPCoordinateAxisStyle::tickLabelColor */
+ inline QColor getTickLabelColor() const { return this->axisStyle.tickLabelColor; }
/** \copydoc JKQTPCoordinateAxisStyle::showZeroAxis */
inline bool getShowZeroAxis() const { return this->axisStyle.showZeroAxis; }
/** \copydoc JKQTPGridStyle::lineColor */
@@ -441,7 +453,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
void setUserLogTickSpacing (double __value);
/** \copydoc JKQTPCoordinateAxisStyle::labelType */
- void setLabelType (JKQTPCALabelType __value);
+ void setTickLabelType (JKQTPCALabelType __value);
/** \copydoc JKQTPCoordinateAxisStyle::tickMode */
void setTickMode (JKQTPLabelTickMode __value);
@@ -561,6 +573,18 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
/** \copydoc JKQTPCoordinateAxisStyle::tickLabelAngle */
void setTickLabelAngle(double __value);
+ /** \copydoc JKQTPCoordinateAxisStyle::arrowSizeFactor */
+ void setArrowSizeFactor(double f) ;
+ /** \copydoc JKQTPCoordinateAxisStyle::labelColor */
+ void setLabelColor(QColor c) ;
+ /** \copydoc JKQTPCoordinateAxisStyle::minorTickColor */
+ void setMinorTickColor(QColor c) ;
+ /** \copydoc JKQTPCoordinateAxisStyle::minorTickLabelColor */
+ void setMinorTickLabelColor(QColor c) ;
+ /** \copydoc JKQTPCoordinateAxisStyle::tickColor */
+ void setTickColor(QColor c);
+ /** \copydoc JKQTPCoordinateAxisStyle::tickLabelColor */
+ void setTickLabelColor(QColor c) ;
protected:
/** \brief indicates whether one of the parameters has changed sinse the last recalculation of tickSpacing ... */
@@ -742,6 +766,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
/** \brief calculates the maximum width and height (returned as QSize) of all tick labels.
* Ascent and descent may also be returned in the two additional pointer arguments- */
QSizeF getMaxTickLabelSize(JKQTPEnhancedPainter& painter, double* ascent=nullptr, double* descent=nullptr);
+ /** \brief draw the axis line \a l (pointing from axismin to axismax) optionally decorated as specified by \a drawMode using JKQTPEnhancedPainter \a painter */
+ void drawAxisLine(JKQTPEnhancedPainter& painter, const QLineF& l, JKQTPCADrawMode drawMode) const;
};
@@ -783,8 +809,36 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPVerticalAxis: public JKQTPCoordinateAxis {
virtual double getParentOtheraxisOffset() const override;
protected:
- virtual void drawTickLabel1(JKQTPEnhancedPainter& painter, double xx, double yy, const QString &label, double fontSize) ;
- virtual void drawTickLabel2(JKQTPEnhancedPainter& painter, double xx, double yy, const QString &label, double fontSize) ;
+ /** \brief draw a tick label on the left axis 1 with text \a label (with optional rotation) at ( \a xx , \a yy ) (in pixel)
+ *
+ * \param painter the JKQTPEnhancedPainter used for drawing
+ * \param xx the exact position of the tick in pixels
+ * \param yy the exact position of the tick in pixels
+ * \param labelOffset offset of the label from ( \a xx , \a yy ) in pt, this is typically equal to \c tickOuterLength+tickLabelDistance
+ * \param label text to display
+ * \param fontSize the fontSize of the label (in pt)
+ * \param ascentMax maximum ascent of all tick labels
+ * \param descentMax maximum descent of all tick labels
+ * \param isMinor indicates whether the axis tick is a minor tick
+ */
+ void drawTickLabel1(JKQTPEnhancedPainter& painter, double xx, double yy, double labelOffset, const QString &label, double fontSize, bool isMinor=false) ;
+ /** \brief draw a tick label on the right axis 2 with text \a label (with optional rotation) at ( \a xx , \a yy ) (in pixel)
+ *
+ * \param painter the JKQTPEnhancedPainter used for drawing
+ * \param xx the exact position of the tick in pixels
+ * \param yy the exact position of the tick in pixels
+ * \param labelOffset offset of the label from ( \a xx , \a yy ) in pt, this is typically equal to \c tickOuterLength+tickLabelDistance
+ * \param label text to display
+ * \param fontSize the fontSize of the label (in pt)
+ * \param ascentMax maximum ascent of all tick labels
+ * \param descentMax maximum descent of all tick labels
+ * \param isMinor indicates whether the axis tick is a minor tick
+ */
+ void drawTickLabel2(JKQTPEnhancedPainter& painter, double xx, double yy, double labelOffset, const QString &label, double fontSize, bool isMinor=false) ;
+ /** \brief draw the axis label using \a painter for axis 1 at \c x= \a left and \c y= \a bottom. \a labelMax is the maximum Size of all tick labels */
+ void drawAxisLabel1(JKQTPEnhancedPainter &painter, double left, double bottom, QSizeF labelMax);
+ /** \brief draw the axis label using \a painter for axis 2 at \c x= \a right and \c y= \a bottom. \a labelMax is the maximum Size of all tick labels */
+ void drawAxisLabel2(JKQTPEnhancedPainter &painter, double right, double bottom, QSizeF labelMax);
};
@@ -871,9 +925,36 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPHorizontalAxis: public JKQTPCoordinateAxis {
virtual double getParentOtheraxisOffset() const override;
protected:
-
- virtual void drawTickLabel1(JKQTPEnhancedPainter& painter, double xx, double yy, const QString &label, double fontSize, double ascentMax, double descentMax) ;
- virtual void drawTickLabel2(JKQTPEnhancedPainter& painter, double xx, double yy, const QString &label, double fontSize, double ascentMax, double descentMax) ;
+ /** \brief draw a tick label on the lower axis 1 with text \a label (with optional rotation) at ( \a xx , \a yy ) (in pixel)
+ *
+ * \param painter the JKQTPEnhancedPainter used for drawing
+ * \param xx the exact position of the tick in pixels
+ * \param yy the exact position of the tick in pixels
+ * \param labelOffset offset of the label from ( \a xx , \a yy ) in pt, this is typically equal to \c tickOuterLength+tickLabelDistance
+ * \param label text to display
+ * \param fontSize the fontSize of the label (in pt)
+ * \param ascentMax maximum ascent of all tick labels
+ * \param descentMax maximum descent of all tick labels
+ * \param isMinor indicates whether the axis tick is a minor tick
+ */
+ void drawTickLabel1(JKQTPEnhancedPainter& painter, double xx, double yy, double labelOffset, const QString &label, double fontSize, double ascentMax, double descentMax, bool isMinor=false) ;
+ /** \brief draw a tick label on the upper axis 2 with text \a label (with optional rotation) at ( \a xx , \a yy ) (in pixel)
+ *
+ * \param painter the JKQTPEnhancedPainter used for drawing
+ * \param xx the exact position of the tick in pixels
+ * \param yy the exact position of the tick in pixels
+ * \param labelOffset offset of the label from ( \a xx , \a yy ) in pt, this is typically equal to \c tickOuterLength+tickLabelDistance
+ * \param label text to display
+ * \param fontSize the fontSize of the label (in pt)
+ * \param ascentMax maximum ascent of all tick labels
+ * \param descentMax maximum descent of all tick labels
+ * \param isMinor indicates whether the axis tick is a minor tick
+ */
+ void drawTickLabel2(JKQTPEnhancedPainter& painter, double xx, double yy, double labelOffset, const QString &label, double fontSize, double ascentMax, double descentMax, bool isMinor=false) ;
+ /** \brief draw the axis label using \a painter for axis 1 at \c x= \a left and \c y= \a bottom. \a labelMax is the maximum Size of all tick labels */
+ void drawAxisLabel1(JKQTPEnhancedPainter &painter, double left, double bottom, QSizeF labelMax);
+ /** \brief draw the axis label using \a painter for axis 2 at \c x= \a left and \c y= \a top. \a labelMax is the maximum Size of all tick labels */
+ void drawAxisLabel2(JKQTPEnhancedPainter &painter, double left, double top, QSizeF labelMax);
};
diff --git a/lib/jkqtplotter/jkqtpcoordinateaxesstyle.cpp b/lib/jkqtplotter/jkqtpcoordinateaxesstyle.cpp
index 43a60de7bb..2bae88aa7c 100644
--- a/lib/jkqtplotter/jkqtpcoordinateaxesstyle.cpp
+++ b/lib/jkqtplotter/jkqtpcoordinateaxesstyle.cpp
@@ -33,7 +33,7 @@ JKQTPCoordinateAxisStyle::JKQTPCoordinateAxisStyle():
labelDigits(3),
autoLabelDigits(true),
minorTickLabelsEnabled(false),
- labelType(JKQTPCALTexponent),
+ tickLabelType(JKQTPCALTexponent),
tickMode(JKQTPLTMLinOrPower),
labelPosition(JKQTPLabelCenter),
labelFontSize(10),
@@ -43,9 +43,14 @@ JKQTPCoordinateAxisStyle::JKQTPCoordinateAxisStyle():
minorTickLabelFullNumber(true),
drawMode1(JKQTPCADMcomplete),
drawMode2(JKQTPCADMLineTicks),
+ minorTickColor(QColor("black")),
+ minorTickLabelColor(QColor("black")),
minorTickWidth(1),
+ tickColor(QColor("black")),
+ tickLabelColor(QColor("black")),
tickWidth(1.5),
lineWidth(1.5),
+ arrowSizeFactor(8),
lineWidthZeroAxis(1.5),
tickTimeFormat(QLocale().timeFormat(QLocale::NarrowFormat)),
tickDateFormat(QLocale().dateFormat(QLocale::NarrowFormat)),
@@ -57,7 +62,8 @@ JKQTPCoordinateAxisStyle::JKQTPCoordinateAxisStyle():
tickInsideLength(3),
minorTickInsideLength(1.5),
axisColor(QColor("black")),
- tickLabelDistance(3),
+ labelColor(QColor("black")),
+ tickLabelDistance(4),
labelDistance(5),
tickLabelAngle(0),
majorGridStyle(true),
@@ -85,6 +91,7 @@ void JKQTPCoordinateAxisStyle::loadSettings(const QSettings &settings, const QSt
minorTickWidth = settings.value(group+"minor_tick/width", defaultStyle.minorTickWidth).toDouble();
tickWidth = settings.value(group+"ticks/width", defaultStyle.tickWidth).toDouble();
lineWidth = settings.value(group+"line_width", defaultStyle.lineWidth).toDouble();
+ arrowSizeFactor = settings.value(group+"arrow_size_factor", defaultStyle.arrowSizeFactor).toDouble();
lineWidthZeroAxis = settings.value(group+"zero_line/line_width", defaultStyle.lineWidthZeroAxis).toDouble();
labelFontSize = settings.value(group+"axis_label/font_size", defaultStyle.labelFontSize).toDouble();
tickLabelFontSize = settings.value(group+"ticks/label_font_size", defaultStyle.tickLabelFontSize).toDouble();
@@ -102,8 +109,13 @@ void JKQTPCoordinateAxisStyle::loadSettings(const QSettings &settings, const QSt
tickLabelDistance = settings.value(group+"ticks/label_distance", defaultStyle.tickLabelDistance).toDouble();
labelDistance = settings.value(group+"axis_label/distance", defaultStyle.labelDistance).toDouble();
labelPosition=String2JKQTPLabelPosition(settings.value(group+"axis_label/position", JKQTPLabelPosition2String(labelPosition)).toString());
- labelType=String2JKQTPCALabelType(settings.value(group+"axis_label/type", JKQTPCALabelType2String(labelType)).toString());
+ tickLabelType=String2JKQTPCALabelType(settings.value(group+"ticks/type", JKQTPCALabelType2String(tickLabelType)).toString());
+ labelColor=jkqtp_String2QColor(settings.value(group+"axis_label/color", jkqtp_QColor2String(labelColor)).toString());
axisColor=jkqtp_String2QColor(settings.value(group+"color", jkqtp_QColor2String(axisColor)).toString());
+ tickColor=jkqtp_String2QColor(settings.value(group+"ticks/color", jkqtp_QColor2String(tickColor)).toString());
+ minorTickColor=jkqtp_String2QColor(settings.value(group+"minor_tick/color", jkqtp_QColor2String(minorTickColor)).toString());
+ tickLabelColor=jkqtp_String2QColor(settings.value(group+"ticks/label_color", jkqtp_QColor2String(tickLabelColor)).toString());
+ minorTickLabelColor=jkqtp_String2QColor(settings.value(group+"minor_tick/label_color", jkqtp_QColor2String(minorTickLabelColor)).toString());
drawMode1=String2JKQTPCADrawMode(settings.value(group+"draw_mode1", JKQTPCADrawMode2String(drawMode1)).toString());
drawMode2=String2JKQTPCADrawMode(settings.value(group+"draw_mode2", JKQTPCADrawMode2String(drawMode2)).toString());
tickMode=String2JKQTPLabelTickMode(settings.value(group+"ticks/mode", JKQTPLabelTickMode2String(tickMode)).toString());
@@ -120,28 +132,34 @@ void JKQTPCoordinateAxisStyle::saveSettings(QSettings &settings, const QString &
settings.setValue(group+"draw_mode1", JKQTPCADrawMode2String(drawMode1));
settings.setValue(group+"draw_mode2", JKQTPCADrawMode2String(drawMode2));
settings.setValue(group+"line_width", lineWidth);
+ settings.setValue(group+"arrow_size_factor", arrowSizeFactor);
settings.setValue(group+"axis_lines_offset", axisLineOffset);
settings.setValue(group+"min_ticks", minTicks);
settings.setValue(group+"axis_label/distance", labelDistance);
settings.setValue(group+"axis_label/font_size", labelFontSize);
+ settings.setValue(group+"axis_label/color", jkqtp_QColor2String(labelColor));
settings.setValue(group+"axis_label/position", JKQTPLabelPosition2String(labelPosition));
- settings.setValue(group+"axis_label/type", JKQTPCALabelType2String(labelType));
settings.setValue(group+"minor_tick/labels_enabled", minorTickLabelsEnabled);
settings.setValue(group+"minor_tick/inside_length", minorTickInsideLength);
settings.setValue(group+"minor_tick/label_font_size", minorTickLabelFontSize);
settings.setValue(group+"minor_tick/label_full_number", minorTickLabelFullNumber);
+ settings.setValue(group+"minor_tick/label_color", jkqtp_QColor2String(minorTickLabelColor));
settings.setValue(group+"minor_tick/outside_length", minorTickOutsideLength);
settings.setValue(group+"minor_tick/width", minorTickWidth);
settings.setValue(group+"minor_tick/count", minorTicks);
+ settings.setValue(group+"minor_tick/color", jkqtp_QColor2String(minorTickColor));
+ settings.setValue(group+"ticks/type", JKQTPCALabelType2String(tickLabelType));
settings.setValue(group+"ticks/date_format", tickDateFormat);
settings.setValue(group+"ticks/datetime_format", tickDateTimeFormat);
settings.setValue(group+"ticks/inside_length", tickInsideLength);
settings.setValue(group+"ticks/label_distance", tickLabelDistance);
settings.setValue(group+"ticks/label_font_size", tickLabelFontSize);
+ settings.setValue(group+"ticks/label_color", jkqtp_QColor2String(tickLabelColor));
settings.setValue(group+"ticks/mode", JKQTPLabelTickMode2String(tickMode));
settings.setValue(group+"ticks/outside_length", tickOutsideLength);
settings.setValue(group+"ticks/time_format", tickTimeFormat);
settings.setValue(group+"ticks/width", tickWidth);
+ settings.setValue(group+"ticks/color", jkqtp_QColor2String(tickColor));
settings.setValue(group+"zero_line/enabled", showZeroAxis);
settings.setValue(group+"zero_line/line_width", lineWidthZeroAxis);
settings.setValue(group+"zero_line/color", jkqtp_QColor2String(colorZeroAxis));
@@ -150,6 +168,45 @@ void JKQTPCoordinateAxisStyle::saveSettings(QSettings &settings, const QString &
minorGridStyle.saveSettings(settings, group+"minor_grid/");
}
+QPen JKQTPCoordinateAxisStyle::getZeroAxisPen(JKQTPEnhancedPainter& painter, JKQTBasePlotter *parent) const
+{
+ QPen pmain(colorZeroAxis);
+ pmain.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidthZeroAxis*parent->getLineWidthMultiplier())));
+ pmain.setStyle(styleZeroAxis);
+ pmain.setCapStyle(Qt::SquareCap);
+ return pmain;
+}
+
+QPen JKQTPCoordinateAxisStyle::getAxisPen(JKQTPEnhancedPainter& painter, JKQTBasePlotter *parent) const {
+ QPen pmain(axisColor);
+ pmain.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier())));
+ pmain.setStyle(Qt::SolidLine);
+ pmain.setCapStyle(Qt::SquareCap);
+ return pmain;
+}
+
+QPen JKQTPCoordinateAxisStyle::getTickPen(JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const {
+ QPen ptick=getAxisPen(painter, parent);
+ ptick.setColor(tickColor);
+ ptick.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, parent->pt2px(painter, tickWidth*parent->getLineWidthMultiplier())));
+ ptick.setCapStyle(Qt::FlatCap);
+ return ptick;
+}
+
+QPen JKQTPCoordinateAxisStyle::getMinorTickPen(JKQTPEnhancedPainter& painter, JKQTBasePlotter *parent) const {
+ QPen pmtick=getTickPen(painter, parent);
+ pmtick.setColor(minorTickColor);
+ pmtick.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, parent->pt2px(painter, minorTickWidth*parent->getLineWidthMultiplier())));
+ pmtick.setCapStyle(Qt::FlatCap);
+ return pmtick;
+}
+
+double JKQTPCoordinateAxisStyle::getArrowSize(JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
+{
+ const QPen paxis=getAxisPen(painter, parent);
+ return JKQTPLineDecoratorStyleCalcDecoratorSize(paxis.widthF(), arrowSizeFactor);
+}
+
JKQTPColorbarCoordinateAxisStyle::JKQTPColorbarCoordinateAxisStyle():
JKQTPCoordinateAxisStyle()
diff --git a/lib/jkqtplotter/jkqtpcoordinateaxesstyle.h b/lib/jkqtplotter/jkqtpcoordinateaxesstyle.h
index 5f40299709..ad2544c18a 100644
--- a/lib/jkqtplotter/jkqtpcoordinateaxesstyle.h
+++ b/lib/jkqtplotter/jkqtpcoordinateaxesstyle.h
@@ -107,7 +107,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxisStyle {
/** \brief if \c true, the plotter displays minor axis labels as number between 1 and 10 in some cases */
bool minorTickLabelsEnabled;
/** \brief indicates how to draw the labels */
- JKQTPCALabelType labelType;
+ JKQTPCALabelType tickLabelType;
/** \brief mode of the major ticks */
JKQTPLabelTickMode tickMode;
@@ -116,6 +116,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxisStyle {
JKQTPLabelPosition labelPosition;
/** \brief fontsize of the axis labels */
double labelFontSize;
+ /** \brief color of the axis label */
+ QColor labelColor;
/** \brief fontsize of the axis tick labels */
double tickLabelFontSize;
/** \brief fontsize of the minor axis tick labels */
@@ -130,12 +132,22 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxisStyle {
JKQTPCADrawMode drawMode1;
/** \brief draw mode of the secondary (right/top) axis */
JKQTPCADrawMode drawMode2;
+ /** \brief color of minor ticks */
+ QColor minorTickColor;
+ /** \brief color of minor tick labels */
+ QColor minorTickLabelColor;
/** \brief line width of minor ticks in pt */
double minorTickWidth;
+ /** \brief color of axis ticks */
+ QColor tickColor;
+ /** \brief color of axis tick labels */
+ QColor tickLabelColor;
/** \brief line width of ticks in pt */
double tickWidth;
/** \brief line width of axis in pt */
double lineWidth;
+ /** \brief factor used to calculate the size of line arrows */
+ double arrowSizeFactor;
/** \brief line width of 0-line in pt */
double lineWidthZeroAxis;
@@ -184,6 +196,18 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxisStyle {
Qt::PenStyle styleZeroAxis;
/** \brief if non-zero, the line of the coordinate axis is moved outside the plot by this amount [pt]. This does not apply to the zero-axis! */
double axisLineOffset;
+
+
+ /** \brief returns a QPen that can be used for drawing zero axis lines */
+ QPen getZeroAxisPen(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent) const;
+ /** \brief returns a QPen that can be used for drawing axis lines */
+ QPen getAxisPen(JKQTPEnhancedPainter &painter, JKQTBasePlotter* parent) const;
+ /** \brief returns a QPen that can be used for drawing axis tick lines */
+ QPen getTickPen(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent) const;
+ /** \brief returns a QPen that can be used for drawing minor axis tick lines */
+ QPen getMinorTickPen(JKQTPEnhancedPainter &painter, JKQTBasePlotter* parent) const;
+ /** \brief calculates the size of an arrow in pixels */
+ double getArrowSize(JKQTPEnhancedPainter &painter, JKQTBasePlotter* parent) const;
};
diff --git a/lib/jkqtplotter/jkqtpimagetools.cpp b/lib/jkqtplotter/jkqtpimagetools.cpp
index 1545736ee1..3ace19d098 100644
--- a/lib/jkqtplotter/jkqtpimagetools.cpp
+++ b/lib/jkqtplotter/jkqtpimagetools.cpp
@@ -146,7 +146,7 @@ void JKQTPColorPaletteStyleAndToolsMixin::cbDrawOutside(JKQTPEnhancedPainter& pa
colorBarRightAxis->setOtherAxisWidth(cb.width());
colorBarRightAxis->drawAxes(painter);
- if ( JKQTPCADrawModeHasLine(colorBarRightAxis->getDrawMode1()) && JKQTPCADrawModeHasLine(colorBarRightAxis->getDrawMode2())) {
+ if ( colorBarRightAxis->getDrawMode1().testFlag(JKQTPCADMLine) && colorBarRightAxis->getDrawMode2().testFlag(JKQTPCADMLine)) {
painter.setPen(p);
painter.drawLine(QLineF(cb.topLeft(), cb.topRight()));
painter.drawLine(QLineF(cb.bottomLeft(), cb.bottomRight()));
@@ -205,7 +205,7 @@ void JKQTPColorPaletteStyleAndToolsMixin::cbDrawOutside(JKQTPEnhancedPainter& pa
colorBarTopAxis->setOtherAxisWidth(cb.height());
colorBarTopAxis->drawAxes(painter);
- if ( JKQTPCADrawModeHasLine(colorBarTopAxis->getDrawMode1()) && JKQTPCADrawModeHasLine(colorBarTopAxis->getDrawMode2())) {
+ if ( colorBarTopAxis->getDrawMode1().testFlag(JKQTPCADMLine) && colorBarTopAxis->getDrawMode2().testFlag(JKQTPCADMLine)) {
painter.setPen(p);
painter.drawLine(QLineF(cb.topLeft(), cb.bottomLeft()));
painter.drawLine(QLineF(cb.topRight(), cb.bottomRight()));
@@ -654,7 +654,7 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside(JKQTPEnhance
modifierColorBarRightAxis->setOtherAxisWidth(cb.height());
modifierColorBarRightAxis->drawAxes(painter);
} else {
- if ( JKQTPCADrawModeHasLine(colorBarRightAxis->getDrawMode1()) && JKQTPCADrawModeHasLine(colorBarRightAxis->getDrawMode2())) {
+ if ( colorBarRightAxis->getDrawMode1().testFlag(JKQTPCADMLine) && colorBarRightAxis->getDrawMode2().testFlag(JKQTPCADMLine)) {
painter.setPen(p);
painter.drawLine(QLineF(cb.topLeft(), cb.topRight()));
painter.drawLine(QLineF(cb.bottomLeft(), cb.bottomRight()));
@@ -707,7 +707,7 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside(JKQTPEnhance
modifierColorBarTopAxis->setOtherAxisWidth(cb.width());
modifierColorBarTopAxis->drawAxes(painter);
} else {
- if ( JKQTPCADrawModeHasLine(colorBarTopAxis->getDrawMode1()) && JKQTPCADrawModeHasLine(colorBarTopAxis->getDrawMode2())) {
+ if ( colorBarTopAxis->getDrawMode1().testFlag(JKQTPCADMLine) && colorBarTopAxis->getDrawMode2().testFlag(JKQTPCADMLine)) {
painter.setPen(p);
painter.drawLine(QLineF(cb.topLeft(), cb.bottomLeft()));
painter.drawLine(QLineF(cb.topRight(), cb.bottomRight()));
diff --git a/lib/jkqtplotter/jkqtptools.cpp b/lib/jkqtplotter/jkqtptools.cpp
index 7577d0ed21..08d2c90636 100644
--- a/lib/jkqtplotter/jkqtptools.cpp
+++ b/lib/jkqtplotter/jkqtptools.cpp
@@ -39,36 +39,42 @@
QString JKQTPCADrawMode2String(JKQTPCADrawMode pos) {
- switch(pos) {
- case JKQTPCADMcomplete: return "all";
- case JKQTPCADMTicksTickLabelsAxisLabel: return "ticks+labels+axislabel";
- case JKQTPCADMTicksTickLabels: return "ticks+labels";
- case JKQTPCADMTicks: return "ticks";
- case JKQTPCADMLineTicksTickLabels: return "line+ticks+labels";
- case JKQTPCADMTickLabelsAxisLabel: return "labels+axislabel";
- case JKQTPCADMTickLabels: return "labels";
- case JKQTPCADMLineTicks: return "line+ticks";
- case JKQTPCADMLine: return "line";
- case JKQTPCADMnone: return "none";
- }
- return "";
+ if (pos==JKQTPCADMnone) return "none";
+ if (pos==JKQTPCADMcomplete) return "complete";
+ if (pos==JKQTPCADMcompleteMaxArrow) return "complete+max_filled_arrow";
+ if (pos==JKQTPCADMcompleteMinMaxArrow) return "complete+max_filled_arrow+min_filled_arrow";
+
+ QString s="";
+ if (pos.testFlag(JKQTPCADMLine)) JKQTPExtendString(s, "+", "line");
+ if (pos.testFlag(JKQTPCADMMaxArrow)) JKQTPExtendString(s, "+", "max_arrow");
+ if (pos.testFlag(JKQTPCADMMaxFilledArrow)) JKQTPExtendString(s, "+", "max_filled_arrow");
+ if (pos.testFlag(JKQTPCADMMinArrow)) JKQTPExtendString(s, "+", "min_arrow");
+ if (pos.testFlag(JKQTPCADMMinFilledArrow)) JKQTPExtendString(s, "+", "min_filled_arrow");
+ if (pos.testFlag(JKQTPCADMTicks)) JKQTPExtendString(s, "+", "ticks");
+ if (pos.testFlag(JKQTPCADMTickLabels)) JKQTPExtendString(s, "+", "labels");
+ if (pos.testFlag(JKQTPCADMAxisLabel)) JKQTPExtendString(s, "+", "axislabel");
+
+ return s;
}
JKQTPCADrawMode String2JKQTPCADrawMode(const QString& pos) {
- QString s=pos.trimmed().toLower();
- if (s=="all" || s=="complete" || s=="line+ticks+labels+axislabel") return JKQTPCADMcomplete;
- if (s=="ticks+labels+axislabel") return JKQTPCADMTicksTickLabelsAxisLabel;
- if (s=="labels+axislabel") return JKQTPCADMTickLabelsAxisLabel;
- if (s=="ticks+labels") return JKQTPCADMTicksTickLabels;
- if (s=="line+ticks+labels") return JKQTPCADMLineTicksTickLabels;
- if (s=="labels") return JKQTPCADMTickLabels;
- if (s=="line+ticks") return JKQTPCADMLineTicks;
- if (s=="ticks") return JKQTPCADMTicks;
- if (s=="line") return JKQTPCADMLine;
- if (s=="none") return JKQTPCADMnone;
- return JKQTPCADMnone;
+ QStringList slist=pos.trimmed().toLower().split('+');
+
+ JKQTPCADrawMode res=JKQTPCADMnone;
+ for (const QString& s: slist) {
+ if (s=="all" || s=="complete") res |= JKQTPCADMcomplete;
+ if (s=="labels" || s=="ticklabels") res |= JKQTPCADMTickLabels;
+ if (s=="axislabel") res |= JKQTPCADMAxisLabel;
+ if (s=="ticks") res |= JKQTPCADMTicks;
+ if (s=="line") res |= JKQTPCADMLine;
+ if (s=="max_arrow"||s=="maxarrow") res |= JKQTPCADMMaxArrow;
+ if (s=="max_filled_arrow"||s=="maxfilledarrow") res |= JKQTPCADMMaxFilledArrow;
+ if (s=="min_arrow"||s=="minarrow") res |= JKQTPCADMMinArrow;
+ if (s=="min_filled_arrow"||s=="minfilledarrow") res |= JKQTPCADMMinFilledArrow;
+ }
+ return res;
}
@@ -108,6 +114,7 @@ QString JKQTPCALabelType2String(JKQTPCALabelType pos) {
case JKQTPCALTfrac: return "frac";
case JKQTPCALTsfrac: return "sfrac";
case JKQTPCALTslashfrac: return "slashfrac";
+ case JKQTPCALTcount: return "";
}
return "";
}
@@ -391,26 +398,6 @@ QString JKQTPMouseDragActions2String(JKQTPMouseDragActions act)
}
-bool JKQTPCADrawModeHasLine(JKQTPCADrawMode pos)
-{
- return (pos==JKQTPCADMcomplete) || (pos==JKQTPCADMLineTicksTickLabels) || (pos==JKQTPCADMLineTicks) || (pos==JKQTPCADMLine);
-}
-
-bool JKQTPCADrawModeHasTicks(JKQTPCADrawMode pos)
-{
- return (pos==JKQTPCADMcomplete) || (pos==JKQTPCADMTicksTickLabelsAxisLabel) || (pos==JKQTPCADMLineTicks) || (pos==JKQTPCADMLineTicksTickLabels) || (pos==JKQTPCADMTicksTickLabels)|| (pos==JKQTPCADMTicks);
-}
-
-bool JKQTPCADrawModeHasTickLabels(JKQTPCADrawMode pos)
-{
- return (pos==JKQTPCADMcomplete) || (pos==JKQTPCADMTicksTickLabelsAxisLabel) || (pos==JKQTPCADMLineTicksTickLabels) || (pos==JKQTPCADMTicksTickLabels) || (pos==JKQTPCADMTickLabels) || (pos==JKQTPCADMTickLabelsAxisLabel);
-}
-
-bool JKQTPCADrawModeHasAxisLabel(JKQTPCADrawMode pos)
-{
- return (pos==JKQTPCADMcomplete) || (pos==JKQTPCADMTicksTickLabelsAxisLabel) || (pos==JKQTPCADMTickLabelsAxisLabel);
-}
-
JKQTPColorDerivationMode::JKQTPColorDerivationMode(PredefinedModes mode):
colorModification(ColorChangeMode::SameColor),
diff --git a/lib/jkqtplotter/jkqtptools.h b/lib/jkqtplotter/jkqtptools.h
index a34679f7ab..a65b855102 100644
--- a/lib/jkqtplotter/jkqtptools.h
+++ b/lib/jkqtplotter/jkqtptools.h
@@ -385,42 +385,45 @@ JKQTPLOTTER_LIB_EXPORT QString JKQTPColorDerivationMode2String(JKQTPColorDerivat
JKQTPLOTTER_LIB_EXPORT JKQTPColorDerivationMode String2JKQTPColorDerivationMode(const QString &mode);
-/** \brief display mode for an axis
- * \ingroup jkqtpplottersupprt */
-enum JKQTPCADrawMode {
- JKQTPCADMcomplete=0, /*!< \brief draw axis with ticks, ticklabels and axis label */
- JKQTPCADMLineTicksTickLabels, /*!< \brief draw axis with ticks, line and tick labels */
- JKQTPCADMLineTicks, /*!< \brief draw axis with ticks and line */
- JKQTPCADMLine, /*!< \brief draw axis as thick line */
- JKQTPCADMTicksTickLabelsAxisLabel, /*!< \brief draw axis with ticks, tick labels and axisLabel */
- JKQTPCADMTicksTickLabels, /*!< \brief draw axis with ticks and tick labels */
- JKQTPCADMTickLabelsAxisLabel, /*!< \brief draw axis tick labels and axisLabel */
- JKQTPCADMTickLabels, /*!< \brief draw axis tick labels */
- JKQTPCADMTicks, /*!< \brief draw axis with ticks */
- JKQTPCADMnone, /*!< \brief draw no axis */
+/** \brief drawing flags for a coordinate axis
+ * \ingroup jkqtpplottersupprt
+ *
+ * \note This enum provides the elements for \ref JKQTPCADrawMode, which is actually used
+ * throughout the code.
+ *
+ * \see JKQTPCADrawMode, JKQTPCoordinateAxisStyle
+*/
+enum JKQTPCADrawModeElements {
+ JKQTPCADMLine=0x01, /*!< \brief draw axis as thick line \image html axisstyle/JKQTPCADMLine.png */
+ JKQTPCADMTicks=0x02, /*!< \brief draw axis ticks \image html axisstyle/JKQTPCADMTicks.png */
+ JKQTPCADMTickLabels=0x04, /*!< \brief draw axis tick labels \image html axisstyle/JKQTPCADMTickLabels.png */
+ JKQTPCADMAxisLabel=0x08, /*!< \brief draw axis axis Label \image html axisstyle/JKQTPCADMAxisLabel.png */
- JKQTPCADMmax=JKQTPCADMnone
+ JKQTPCADMMaxArrow=0x0100, /*!< \brief an open arrow at the max-end of the axis \image html axisstyle/JKQTPCADMMaxArrow.png */
+ JKQTPCADMMaxFilledArrow=0x0200, /*!< \brief draw a filled arrow at the max-end of the axis \image html axisstyle/JKQTPCADMMaxFilledArrow.png */
+ JKQTPCADMMinArrow=0x1000, /*!< \brief an open arrow at the end of the axis at the min-end of the axis \image html axisstyle/JKQTPCADMMinArrow.png */
+ JKQTPCADMMinFilledArrow=0x2000, /*!< \brief draw a filled arrow at the min-end of the axis \image html axisstyle/JKQTPCADMMinFilledArrow.png */
+
+ JKQTPCADMLineTicksTickLabels=JKQTPCADMLine|JKQTPCADMTicks|JKQTPCADMTickLabels, /*!< \brief draw axis with ticks, line and tick labels \image html axisstyle/JKQTPCADMLineTicksTickLabels.png */
+ JKQTPCADMLineTicks=JKQTPCADMLine|JKQTPCADMTicks, /*!< \brief draw axis with ticks and line \image html axisstyle/JKQTPCADMLineTicks.png */
+ JKQTPCADMTicksTickLabelsAxisLabel=JKQTPCADMTicks|JKQTPCADMTickLabels|JKQTPCADMAxisLabel, /*!< \brief draw axis with ticks, tick labels and axisLabel \image html axisstyle/JKQTPCADMTicksTickLabelsAxisLabel.png */
+ JKQTPCADMTicksTickLabels=JKQTPCADMTicks|JKQTPCADMTickLabels, /*!< \brief draw axis with ticks and tick labels \image html axisstyle/JKQTPCADMTicksTickLabels.png */
+ JKQTPCADMTickLabelsAxisLabel=JKQTPCADMTickLabels|JKQTPCADMAxisLabel, /*!< \brief draw axis tick labels and axisLabel \image html axisstyle/JKQTPCADMTickLabelsAxisLabel.png */
+ JKQTPCADMnone=0x0000, /*!< \brief draw no axis \image html axisstyle/JKQTPCADMnone.png */
+ JKQTPCADMcomplete=JKQTPCADMLine|JKQTPCADMTicks|JKQTPCADMTickLabels|JKQTPCADMAxisLabel, /*!< \brief draw axis withline, ticks, ticklabels and axis label \image html axisstyle/JKQTPCADMcomplete.png */
+ JKQTPCADMcompleteMaxArrow=JKQTPCADMcomplete|JKQTPCADMMaxFilledArrow, /*!< \brief draw axis withline, ticks, ticklabels and axis label and an arrow pointing to the max-side of the axis \image html axisstyle/JKQTPCADMcompleteMaxArrow.png */
+ JKQTPCADMcompleteMinMaxArrow=JKQTPCADMcomplete|JKQTPCADMMaxFilledArrow|JKQTPCADMMinFilledArrow, /*!< \brief draw axis withline, ticks, ticklabels and axis label and arrows pointing to the min and max side of the axis \image html axisstyle/JKQTPCADMcompleteMinMaxArrow.png */
};
-
-/** \brief determines whether JKQTPCADrawMode has the line
- * \ingroup jkqtpplottersupprt
+/** \brief drawing mode for a coordinate axis
+ * \ingroup jkqtplotter_basegraphserrors
+ *
+ * \qFlagsNote{JKQTPCADrawMode,JKQTPCADrawModeElements}
+ *
+ * \see JKQTPCADrawModeElements, JKQTPCoordinateAxisStyle
*/
-JKQTPLOTTER_LIB_EXPORT bool JKQTPCADrawModeHasLine(JKQTPCADrawMode pos);
+Q_DECLARE_FLAGS(JKQTPCADrawMode, JKQTPCADrawModeElements)
+Q_DECLARE_OPERATORS_FOR_FLAGS(JKQTPCADrawMode)
-/** \brief determines whether JKQTPCADrawMode has ticks
- * \ingroup jkqtpplottersupprt
- */
-JKQTPLOTTER_LIB_EXPORT bool JKQTPCADrawModeHasTicks(JKQTPCADrawMode pos);
-
-/** \brief determines whether JKQTPCADrawMode has tick labels
- * \ingroup jkqtpplottersupprt
- */
-JKQTPLOTTER_LIB_EXPORT bool JKQTPCADrawModeHasTickLabels(JKQTPCADrawMode pos);
-
-/** \brief determines whether JKQTPCADrawMode has the axis label
- * \ingroup jkqtpplottersupprt
- */
-JKQTPLOTTER_LIB_EXPORT bool JKQTPCADrawModeHasAxisLabel(JKQTPCADrawMode pos);
@@ -438,19 +441,19 @@ JKQTPLOTTER_LIB_EXPORT JKQTPCADrawMode String2JKQTPCADrawMode(const QString& pos
/** \brief display mode for the axis labels
* \ingroup jkqtpplottersupprt */
enum JKQTPCALabelType {
- JKQTPCALTdefault, /*!< \brief simply print the numbers \image html JKQTPCALTdefault.png */
- JKQTPCALTscientific, /*!< \brief print the numbers in scientific notation, e.g. \c "1.23e-4" \image html JKQTPCALTscientific.png */
- JKQTPCALTexponentCharacter, /*!< \brief print the numbers and show a unit character, i.e. 5μ for \f$ 5\cdot 10^{-6} \f$ , \c 3k for \f$ 3\cdot 10^3 \f$ ... \image html JKQTPCALTexponentCharacter.png */
- JKQTPCALTexponent, /*!< \brief show numbers in exponential for, e.g. \f$ 3\cdot 10^5 \f$ ... \image html JKQTPCALTexponent.png */
- JKQTPCALTdate, /*!< \brief show numbers as dates \image html JKQTPCALTdate.png */
- JKQTPCALTtime, /*!< \brief show numbers as times \image html JKQTPCALTtime.png*/
- JKQTPCALTdatetime, /*!< \brief show numbers as times \image html JKQTPCALTdatetime.png */
- JKQTPCALTfrac, /*!< \brief show numbers as fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed like \f$ \frac{1}{2} \f$ \image html JKQTPCALTfrac.png */
- JKQTPCALTslashfrac, /*!< \brief show numbers as fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed like \c 1/2 \image html JKQTPCALTslashfrac.png */
- JKQTPCALTsfrac, /*!< \brief show numbers as fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed using \c \\sfrac{1}{2} \image html JKQTPCALTsfrac.png */
- JKQTPCALTintfrac, /*!< \brief show numbers as integral+fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed like \$ -3\frac{1}{2} \f$ \image html JKQTPCALTintfrac.png */
- JKQTPCALTintslashfrac, /*!< \brief show numbers as integral+fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed like \c 1/2 \image html JKQTPCALTintslashfrac.png */
- JKQTPCALTintsfrac, /*!< \brief show numbers as integral+fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed using \c \\sfrac{1}{2} \image html JKQTPCALTintsfrac.png */
+ JKQTPCALTdefault=0, /*!< \brief simply print the numbers \image html axisstyle/JKQTPCALTdefault.png */
+ JKQTPCALTscientific, /*!< \brief print the numbers in scientific notation, e.g. \c "1.23e-4" \image html axisstyle/JKQTPCALTscientific.png */
+ JKQTPCALTexponentCharacter, /*!< \brief print the numbers and show a unit character, i.e. 5μ for \f$ 5\cdot 10^{-6} \f$ , \c 3k for \f$ 3\cdot 10^3 \f$ ... \image html axisstyle/JKQTPCALTexponentCharacter.png */
+ JKQTPCALTexponent, /*!< \brief show numbers in exponential for, e.g. \f$ 3\cdot 10^5 \f$ ... \image html axisstyle/JKQTPCALTexponent.png */
+ JKQTPCALTdate, /*!< \brief show numbers as dates \image html axisstyle/JKQTPCALTdate.png */
+ JKQTPCALTtime, /*!< \brief show numbers as times \image html axisstyle/JKQTPCALTtime.png*/
+ JKQTPCALTdatetime, /*!< \brief show numbers as times \image html axisstyle/JKQTPCALTdatetime.png */
+ JKQTPCALTfrac, /*!< \brief show numbers as fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed like \f$ \frac{1}{2} \f$ \image html axisstyle/JKQTPCALTfrac.png */
+ JKQTPCALTslashfrac, /*!< \brief show numbers as fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed like \c 1/2 \image html axisstyle/JKQTPCALTslashfrac.png */
+ JKQTPCALTsfrac, /*!< \brief show numbers as fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed using \c \\sfrac{1}{2} \image html axisstyle/JKQTPCALTsfrac.png */
+ JKQTPCALTintfrac, /*!< \brief show numbers as integral+fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed like \$ -3\frac{1}{2} \f$ \image html axisstyle/JKQTPCALTintfrac.png */
+ JKQTPCALTintslashfrac, /*!< \brief show numbers as integral+fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed like \c 1/2 \image html axisstyle/JKQTPCALTintslashfrac.png */
+ JKQTPCALTintsfrac, /*!< \brief show numbers as integral+fraction, the number is first rounded to the given precision and then a fraction is calculated and displayed using \c \\sfrac{1}{2} \image html axisstyle/JKQTPCALTintsfrac.png */
JKQTPCALTcount,
JKQTPCALTmax=JKQTPCALTcount-1
diff --git a/screenshots/advancedlineandfillstyling.png b/screenshots/advancedlineandfillstyling.png
index 68d818fb86..76d97f18d4 100644
Binary files a/screenshots/advancedlineandfillstyling.png and b/screenshots/advancedlineandfillstyling.png differ
diff --git a/screenshots/advancedlineandfillstyling_small.png b/screenshots/advancedlineandfillstyling_small.png
index e3d1fafd68..941ed659a6 100644
Binary files a/screenshots/advancedlineandfillstyling_small.png and b/screenshots/advancedlineandfillstyling_small.png differ
diff --git a/screenshots/barchart.png b/screenshots/barchart.png
index 5688a0ea7e..e3b35ecc15 100644
Binary files a/screenshots/barchart.png and b/screenshots/barchart.png differ
diff --git a/screenshots/barchart_errorbars.png b/screenshots/barchart_errorbars.png
index 3902172001..e0b7704f0e 100644
Binary files a/screenshots/barchart_errorbars.png and b/screenshots/barchart_errorbars.png differ
diff --git a/screenshots/barchart_errorbars_hor.png b/screenshots/barchart_errorbars_hor.png
index c4c98310a6..14cac25e31 100644
Binary files a/screenshots/barchart_errorbars_hor.png and b/screenshots/barchart_errorbars_hor.png differ
diff --git a/screenshots/barchart_errorbars_hor_small.png b/screenshots/barchart_errorbars_hor_small.png
index 4fca80d475..9ec425de49 100644
Binary files a/screenshots/barchart_errorbars_hor_small.png and b/screenshots/barchart_errorbars_hor_small.png differ
diff --git a/screenshots/barchart_errorbars_small.png b/screenshots/barchart_errorbars_small.png
index 17c9385ace..0f7c6d86c8 100644
Binary files a/screenshots/barchart_errorbars_small.png and b/screenshots/barchart_errorbars_small.png differ
diff --git a/screenshots/barchart_hor.png b/screenshots/barchart_hor.png
index 4c1312d1a4..08fb6b239f 100644
Binary files a/screenshots/barchart_hor.png and b/screenshots/barchart_hor.png differ
diff --git a/screenshots/barchart_hor_small.png b/screenshots/barchart_hor_small.png
index 83b1212479..1eab6beaa7 100644
Binary files a/screenshots/barchart_hor_small.png and b/screenshots/barchart_hor_small.png differ
diff --git a/screenshots/barchart_small.png b/screenshots/barchart_small.png
index 24a933407e..1c280a3ab6 100644
Binary files a/screenshots/barchart_small.png and b/screenshots/barchart_small.png differ
diff --git a/screenshots/barchart_twocolor.png b/screenshots/barchart_twocolor.png
index f5d11d6400..1649a7b83b 100644
Binary files a/screenshots/barchart_twocolor.png and b/screenshots/barchart_twocolor.png differ
diff --git a/screenshots/barchart_twocolor_hor.png b/screenshots/barchart_twocolor_hor.png
index 1c5ab26910..d3526f3d3e 100644
Binary files a/screenshots/barchart_twocolor_hor.png and b/screenshots/barchart_twocolor_hor.png differ
diff --git a/screenshots/barchart_twocolor_hor_small.png b/screenshots/barchart_twocolor_hor_small.png
index a85e5a4d64..327b1039a4 100644
Binary files a/screenshots/barchart_twocolor_hor_small.png and b/screenshots/barchart_twocolor_hor_small.png differ
diff --git a/screenshots/barchart_twocolor_small.png b/screenshots/barchart_twocolor_small.png
index 6b39ac7dea..7d72096999 100644
Binary files a/screenshots/barchart_twocolor_small.png and b/screenshots/barchart_twocolor_small.png differ
diff --git a/screenshots/boxplot.png b/screenshots/boxplot.png
index ef1269c6d2..406a27d23c 100644
Binary files a/screenshots/boxplot.png and b/screenshots/boxplot.png differ
diff --git a/screenshots/boxplot_small.png b/screenshots/boxplot_small.png
index e0d40a7407..edf4f3bc85 100644
Binary files a/screenshots/boxplot_small.png and b/screenshots/boxplot_small.png differ
diff --git a/screenshots/contourplot.png b/screenshots/contourplot.png
index 721cd5228c..034dfd6d50 100644
Binary files a/screenshots/contourplot.png and b/screenshots/contourplot.png differ
diff --git a/screenshots/contourplot_small.png b/screenshots/contourplot_small.png
index 502e7d2172..e4b734473d 100644
Binary files a/screenshots/contourplot_small.png and b/screenshots/contourplot_small.png differ
diff --git a/screenshots/dateaxes.png b/screenshots/dateaxes.png
index fe3ab3fd19..aefb71017a 100644
Binary files a/screenshots/dateaxes.png and b/screenshots/dateaxes.png differ
diff --git a/screenshots/dateaxes_small.png b/screenshots/dateaxes_small.png
index 99eae154cb..2c4cf042e3 100644
Binary files a/screenshots/dateaxes_small.png and b/screenshots/dateaxes_small.png differ
diff --git a/screenshots/dateaxes_timeaxis.png b/screenshots/dateaxes_timeaxis.png
index 218ea12092..527480e8c6 100644
Binary files a/screenshots/dateaxes_timeaxis.png and b/screenshots/dateaxes_timeaxis.png differ
diff --git a/screenshots/dateaxes_timeaxis_small.png b/screenshots/dateaxes_timeaxis_small.png
index 30c52ff4c6..06b9728887 100644
Binary files a/screenshots/dateaxes_timeaxis_small.png and b/screenshots/dateaxes_timeaxis_small.png differ
diff --git a/screenshots/errorbarstyles.png b/screenshots/errorbarstyles.png
index ef7c9d4059..b31435dc8a 100644
Binary files a/screenshots/errorbarstyles.png and b/screenshots/errorbarstyles.png differ
diff --git a/screenshots/errorbarstyles_small.png b/screenshots/errorbarstyles_small.png
index 71c1610e90..39aaee48dd 100644
Binary files a/screenshots/errorbarstyles_small.png and b/screenshots/errorbarstyles_small.png differ
diff --git a/screenshots/evalcurve.png b/screenshots/evalcurve.png
index 9ec9b0a04a..3ee7c1d6ef 100644
Binary files a/screenshots/evalcurve.png and b/screenshots/evalcurve.png differ
diff --git a/screenshots/evalcurve_small.png b/screenshots/evalcurve_small.png
index a3682af6ca..da9bc2a26a 100644
Binary files a/screenshots/evalcurve_small.png and b/screenshots/evalcurve_small.png differ
diff --git a/screenshots/filledgraphs.png b/screenshots/filledgraphs.png
index 13a1776a2b..bee6cf800c 100644
Binary files a/screenshots/filledgraphs.png and b/screenshots/filledgraphs.png differ
diff --git a/screenshots/filledgraphs_errors.png b/screenshots/filledgraphs_errors.png
index 4b87e7194d..1ab4191339 100644
Binary files a/screenshots/filledgraphs_errors.png and b/screenshots/filledgraphs_errors.png differ
diff --git a/screenshots/filledgraphs_errors_small.png b/screenshots/filledgraphs_errors_small.png
index f706433c9a..2d33e3ba2c 100644
Binary files a/screenshots/filledgraphs_errors_small.png and b/screenshots/filledgraphs_errors_small.png differ
diff --git a/screenshots/filledgraphs_errors_y.png b/screenshots/filledgraphs_errors_y.png
index 0471a1a127..9532616ad8 100644
Binary files a/screenshots/filledgraphs_errors_y.png and b/screenshots/filledgraphs_errors_y.png differ
diff --git a/screenshots/filledgraphs_errors_y_small.png b/screenshots/filledgraphs_errors_y_small.png
index d22eaeb67f..6a839c13b5 100644
Binary files a/screenshots/filledgraphs_errors_y_small.png and b/screenshots/filledgraphs_errors_y_small.png differ
diff --git a/screenshots/filledgraphs_small.png b/screenshots/filledgraphs_small.png
index 43795d4650..abb3d3b0d2 100644
Binary files a/screenshots/filledgraphs_small.png and b/screenshots/filledgraphs_small.png differ
diff --git a/screenshots/filledgraphs_y.png b/screenshots/filledgraphs_y.png
index 37cb42d2f8..68db1643ec 100644
Binary files a/screenshots/filledgraphs_y.png and b/screenshots/filledgraphs_y.png differ
diff --git a/screenshots/filledgraphs_y_small.png b/screenshots/filledgraphs_y_small.png
index 9ba88c8a38..9f1eaf0223 100644
Binary files a/screenshots/filledgraphs_y_small.png and b/screenshots/filledgraphs_y_small.png differ
diff --git a/screenshots/functionplot.png b/screenshots/functionplot.png
index 28afce5408..b0d843f4a6 100644
Binary files a/screenshots/functionplot.png and b/screenshots/functionplot.png differ
diff --git a/screenshots/functionplot_fy.png b/screenshots/functionplot_fy.png
index 212cb715bc..2838e310ff 100644
Binary files a/screenshots/functionplot_fy.png and b/screenshots/functionplot_fy.png differ
diff --git a/screenshots/functionplot_fy_small.png b/screenshots/functionplot_fy_small.png
index eb9a50b349..2298c41334 100644
Binary files a/screenshots/functionplot_fy_small.png and b/screenshots/functionplot_fy_small.png differ
diff --git a/screenshots/functionplot_small.png b/screenshots/functionplot_small.png
index ef8c3a0443..c7da490c3f 100644
Binary files a/screenshots/functionplot_small.png and b/screenshots/functionplot_small.png differ
diff --git a/screenshots/geometric.png b/screenshots/geometric.png
index f982a39134..10c3dff353 100644
Binary files a/screenshots/geometric.png and b/screenshots/geometric.png differ
diff --git a/screenshots/geometric_small.png b/screenshots/geometric_small.png
index eb50a089be..a79170f5e1 100644
Binary files a/screenshots/geometric_small.png and b/screenshots/geometric_small.png differ
diff --git a/screenshots/imageplot.png b/screenshots/imageplot.png
index bea2dd7033..6b8c45527a 100644
Binary files a/screenshots/imageplot.png and b/screenshots/imageplot.png differ
diff --git a/screenshots/imageplot_modifier.png b/screenshots/imageplot_modifier.png
index 3f1221e7ea..bea037a04b 100644
Binary files a/screenshots/imageplot_modifier.png and b/screenshots/imageplot_modifier.png differ
diff --git a/screenshots/imageplot_modifier_small.png b/screenshots/imageplot_modifier_small.png
index c37d2185f0..0b6e31abb3 100644
Binary files a/screenshots/imageplot_modifier_small.png and b/screenshots/imageplot_modifier_small.png differ
diff --git a/screenshots/imageplot_nodatastore.png b/screenshots/imageplot_nodatastore.png
index 25ad665a56..86e11a1e2c 100644
Binary files a/screenshots/imageplot_nodatastore.png and b/screenshots/imageplot_nodatastore.png differ
diff --git a/screenshots/imageplot_nodatastore_small.png b/screenshots/imageplot_nodatastore_small.png
index 2c56f3d959..3ac255050d 100644
Binary files a/screenshots/imageplot_nodatastore_small.png and b/screenshots/imageplot_nodatastore_small.png differ
diff --git a/screenshots/imageplot_small.png b/screenshots/imageplot_small.png
index 1c6ad98b9c..76cf8e4b22 100644
Binary files a/screenshots/imageplot_small.png and b/screenshots/imageplot_small.png differ
diff --git a/screenshots/imageplot_userpal_program.png b/screenshots/imageplot_userpal_program.png
index 3d97590f98..a8b9338909 100644
Binary files a/screenshots/imageplot_userpal_program.png and b/screenshots/imageplot_userpal_program.png differ
diff --git a/screenshots/imageplot_userpal_program_small.png b/screenshots/imageplot_userpal_program_small.png
index fbb42b84a6..c773a29d6c 100644
Binary files a/screenshots/imageplot_userpal_program_small.png and b/screenshots/imageplot_userpal_program_small.png differ
diff --git a/screenshots/impulsesplot.png b/screenshots/impulsesplot.png
index 25748404c2..08bceaa735 100644
Binary files a/screenshots/impulsesplot.png and b/screenshots/impulsesplot.png differ
diff --git a/screenshots/impulsesplot_small.png b/screenshots/impulsesplot_small.png
index 5a85422b50..9966a745de 100644
Binary files a/screenshots/impulsesplot_small.png and b/screenshots/impulsesplot_small.png differ
diff --git a/screenshots/mandelbrot.png b/screenshots/mandelbrot.png
index 1ad8eb346e..6e7552da05 100644
Binary files a/screenshots/mandelbrot.png and b/screenshots/mandelbrot.png differ
diff --git a/screenshots/mandelbrot_small.png b/screenshots/mandelbrot_small.png
index 779638bd8b..20dc8d5998 100644
Binary files a/screenshots/mandelbrot_small.png and b/screenshots/mandelbrot_small.png differ
diff --git a/screenshots/multiplot.png b/screenshots/multiplot.png
index 215106c7dd..9271d244cd 100644
Binary files a/screenshots/multiplot.png and b/screenshots/multiplot.png differ
diff --git a/screenshots/multiplot_controlwindow.png b/screenshots/multiplot_controlwindow.png
index bf548904a3..e236a72924 100644
Binary files a/screenshots/multiplot_controlwindow.png and b/screenshots/multiplot_controlwindow.png differ
diff --git a/screenshots/multiplot_controlwindow_small.png b/screenshots/multiplot_controlwindow_small.png
index b755e78628..e366485430 100644
Binary files a/screenshots/multiplot_controlwindow_small.png and b/screenshots/multiplot_controlwindow_small.png differ
diff --git a/screenshots/multiplot_small.png b/screenshots/multiplot_small.png
index d726754aff..2d565ca641 100644
Binary files a/screenshots/multiplot_small.png and b/screenshots/multiplot_small.png differ
diff --git a/screenshots/parametriccurve1.png b/screenshots/parametriccurve1.png
index 4fcf027f7d..937cf441ad 100644
Binary files a/screenshots/parametriccurve1.png and b/screenshots/parametriccurve1.png differ
diff --git a/screenshots/parametriccurve1_small.png b/screenshots/parametriccurve1_small.png
index af34fce73f..e34d09a2df 100644
Binary files a/screenshots/parametriccurve1_small.png and b/screenshots/parametriccurve1_small.png differ
diff --git a/screenshots/parametriccurve2.png b/screenshots/parametriccurve2.png
index 71850c95c5..b1e5fe57d2 100644
Binary files a/screenshots/parametriccurve2.png and b/screenshots/parametriccurve2.png differ
diff --git a/screenshots/parametriccurve2_small.png b/screenshots/parametriccurve2_small.png
index 00ef2ff742..3f0197b105 100644
Binary files a/screenshots/parametriccurve2_small.png and b/screenshots/parametriccurve2_small.png differ
diff --git a/screenshots/paramscatterplot.png b/screenshots/paramscatterplot.png
index df9c970444..73b4bef1a5 100644
Binary files a/screenshots/paramscatterplot.png and b/screenshots/paramscatterplot.png differ
diff --git a/screenshots/paramscatterplot_customsymbol.png b/screenshots/paramscatterplot_customsymbol.png
index 1fe7d55499..e00aea463a 100644
Binary files a/screenshots/paramscatterplot_customsymbol.png and b/screenshots/paramscatterplot_customsymbol.png differ
diff --git a/screenshots/paramscatterplot_customsymbol_small.png b/screenshots/paramscatterplot_customsymbol_small.png
index f08e5ce0f1..4d42d5f347 100644
Binary files a/screenshots/paramscatterplot_customsymbol_small.png and b/screenshots/paramscatterplot_customsymbol_small.png differ
diff --git a/screenshots/paramscatterplot_small.png b/screenshots/paramscatterplot_small.png
index 5432617f05..efa5cf9a89 100644
Binary files a/screenshots/paramscatterplot_small.png and b/screenshots/paramscatterplot_small.png differ
diff --git a/screenshots/parsedfunctionplot.png b/screenshots/parsedfunctionplot.png
index cb0d6f73d4..acf6e9ed10 100644
Binary files a/screenshots/parsedfunctionplot.png and b/screenshots/parsedfunctionplot.png differ
diff --git a/screenshots/parsedfunctionplot_small.png b/screenshots/parsedfunctionplot_small.png
index ad444bae21..6d282f9ad1 100644
Binary files a/screenshots/parsedfunctionplot_small.png and b/screenshots/parsedfunctionplot_small.png differ
diff --git a/screenshots/rgbimageplot.png b/screenshots/rgbimageplot.png
index ff10120130..aee262c184 100644
Binary files a/screenshots/rgbimageplot.png and b/screenshots/rgbimageplot.png differ
diff --git a/screenshots/rgbimageplot_qt.png b/screenshots/rgbimageplot_qt.png
index da4ebb2c98..092838153a 100644
Binary files a/screenshots/rgbimageplot_qt.png and b/screenshots/rgbimageplot_qt.png differ
diff --git a/screenshots/rgbimageplot_qt_small.png b/screenshots/rgbimageplot_qt_small.png
index a5c1a700b4..eefcd9f289 100644
Binary files a/screenshots/rgbimageplot_qt_small.png and b/screenshots/rgbimageplot_qt_small.png differ
diff --git a/screenshots/rgbimageplot_small.png b/screenshots/rgbimageplot_small.png
index f5e88c5df9..4e4b4401fa 100644
Binary files a/screenshots/rgbimageplot_small.png and b/screenshots/rgbimageplot_small.png differ
diff --git a/screenshots/scatter.png b/screenshots/scatter.png
index 8fd90630ed..8283d585b0 100644
Binary files a/screenshots/scatter.png and b/screenshots/scatter.png differ
diff --git a/screenshots/scatter_customsymbol.png b/screenshots/scatter_customsymbol.png
index 05f39d8c28..fca6df2e70 100644
Binary files a/screenshots/scatter_customsymbol.png and b/screenshots/scatter_customsymbol.png differ
diff --git a/screenshots/scatter_customsymbol_small.png b/screenshots/scatter_customsymbol_small.png
index 2dfa5594d7..5153fae491 100644
Binary files a/screenshots/scatter_customsymbol_small.png and b/screenshots/scatter_customsymbol_small.png differ
diff --git a/screenshots/scatter_error.png b/screenshots/scatter_error.png
index 2272c62c7c..9806418fd7 100644
Binary files a/screenshots/scatter_error.png and b/screenshots/scatter_error.png differ
diff --git a/screenshots/scatter_error_small.png b/screenshots/scatter_error_small.png
index 913f0ec9e4..c036441352 100644
Binary files a/screenshots/scatter_error_small.png and b/screenshots/scatter_error_small.png differ
diff --git a/screenshots/scatter_small.png b/screenshots/scatter_small.png
index b2f9159b9c..609b0e2821 100644
Binary files a/screenshots/scatter_small.png and b/screenshots/scatter_small.png differ
diff --git a/screenshots/simpletest.png b/screenshots/simpletest.png
index 037ad2f0e4..00afffe71f 100644
Binary files a/screenshots/simpletest.png and b/screenshots/simpletest.png differ
diff --git a/screenshots/simpletest_small.png b/screenshots/simpletest_small.png
index 8c4b458f3f..f1c5bbe8e2 100644
Binary files a/screenshots/simpletest_small.png and b/screenshots/simpletest_small.png differ
diff --git a/screenshots/stackedbars.png b/screenshots/stackedbars.png
index f7e0697fb5..6d98f1c342 100644
Binary files a/screenshots/stackedbars.png and b/screenshots/stackedbars.png differ
diff --git a/screenshots/stackedbars_hor.png b/screenshots/stackedbars_hor.png
index 421afed634..a929d24943 100644
Binary files a/screenshots/stackedbars_hor.png and b/screenshots/stackedbars_hor.png differ
diff --git a/screenshots/stackedbars_hor_small.png b/screenshots/stackedbars_hor_small.png
index 91b573c0f0..3025ea2caf 100644
Binary files a/screenshots/stackedbars_hor_small.png and b/screenshots/stackedbars_hor_small.png differ
diff --git a/screenshots/stackedbars_small.png b/screenshots/stackedbars_small.png
index b6c960f5d8..fc88d3c052 100644
Binary files a/screenshots/stackedbars_small.png and b/screenshots/stackedbars_small.png differ
diff --git a/screenshots/stepplots.png b/screenshots/stepplots.png
index 479a98f74c..8d4cbcd43a 100644
Binary files a/screenshots/stepplots.png and b/screenshots/stepplots.png differ
diff --git a/screenshots/stepplots_small.png b/screenshots/stepplots_small.png
index 59a4e960fd..e2d339e707 100644
Binary files a/screenshots/stepplots_small.png and b/screenshots/stepplots_small.png differ
diff --git a/screenshots/symbols_and_errors.png b/screenshots/symbols_and_errors.png
index fdbd9045f0..159160ab07 100644
Binary files a/screenshots/symbols_and_errors.png and b/screenshots/symbols_and_errors.png differ
diff --git a/screenshots/symbols_and_errors_small.png b/screenshots/symbols_and_errors_small.png
index a6a01efc8e..d3c60d84e4 100644
Binary files a/screenshots/symbols_and_errors_small.png and b/screenshots/symbols_and_errors_small.png differ
diff --git a/screenshots/test_distributionplot.png b/screenshots/test_distributionplot.png
index 50233e8940..b23cbb3350 100644
Binary files a/screenshots/test_distributionplot.png and b/screenshots/test_distributionplot.png differ
diff --git a/screenshots/test_distributionplot_small.png b/screenshots/test_distributionplot_small.png
index e4be367af3..efdf7f7b50 100644
Binary files a/screenshots/test_distributionplot_small.png and b/screenshots/test_distributionplot_small.png differ
diff --git a/screenshots/test_styledboxplot.png b/screenshots/test_styledboxplot.png
index 812f98314f..8bf78d204d 100644
Binary files a/screenshots/test_styledboxplot.png and b/screenshots/test_styledboxplot.png differ
diff --git a/screenshots/test_styledboxplot_small.png b/screenshots/test_styledboxplot_small.png
index e579d4f314..26214ae2a2 100644
Binary files a/screenshots/test_styledboxplot_small.png and b/screenshots/test_styledboxplot_small.png differ
diff --git a/screenshots/violinplot_hor.png b/screenshots/violinplot_hor.png
index 0a38b0bfdf..61bf3ff2e3 100644
Binary files a/screenshots/violinplot_hor.png and b/screenshots/violinplot_hor.png differ
diff --git a/screenshots/violinplot_hor_small.png b/screenshots/violinplot_hor_small.png
index 3e45970c85..d490e626ff 100644
Binary files a/screenshots/violinplot_hor_small.png and b/screenshots/violinplot_hor_small.png differ
diff --git a/screenshots/violinplot_vert.png b/screenshots/violinplot_vert.png
index 1474da8e2e..b11557cd22 100644
Binary files a/screenshots/violinplot_vert.png and b/screenshots/violinplot_vert.png differ
diff --git a/screenshots/violinplot_vert_small.png b/screenshots/violinplot_vert_small.png
index 0c11a2abcd..6f03ad8a40 100644
Binary files a/screenshots/violinplot_vert_small.png and b/screenshots/violinplot_vert_small.png differ
diff --git a/screenshots/wiggleplot_x.png b/screenshots/wiggleplot_x.png
index 85ae62f4bc..0b97d51fa4 100644
Binary files a/screenshots/wiggleplot_x.png and b/screenshots/wiggleplot_x.png differ
diff --git a/screenshots/wiggleplot_x_small.png b/screenshots/wiggleplot_x_small.png
index 401b4ad830..38b4c12e40 100644
Binary files a/screenshots/wiggleplot_x_small.png and b/screenshots/wiggleplot_x_small.png differ
diff --git a/screenshots/wiggleplot_y.png b/screenshots/wiggleplot_y.png
index f5b7f4d1bc..357536b525 100644
Binary files a/screenshots/wiggleplot_y.png and b/screenshots/wiggleplot_y.png differ
diff --git a/screenshots/wiggleplot_y_small.png b/screenshots/wiggleplot_y_small.png
index de4c1e5a62..c2943a5bd1 100644
Binary files a/screenshots/wiggleplot_y_small.png and b/screenshots/wiggleplot_y_small.png differ
diff --git a/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp b/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp
index bfc35808c9..a071623c1e 100644
--- a/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp
+++ b/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp
@@ -178,7 +178,7 @@ void doListErrorIndicators(const QDir& outputDir, int iconsize, QColor backgroun
}
}
-void doListJKQTPCALabelType(const QDir& outputDir, int iconsize, QColor backgroundColor) {
+void doListAxisStyling(const QDir& outputDir, int iconsize, QColor backgroundColor) {
JKQTBasePlotter plot(true);
plot.setXY(0,1,0.9,110);
@@ -192,66 +192,121 @@ void doListJKQTPCALabelType(const QDir& outputDir, int iconsize, QColor backgrou
plot.getXAxis()->setDrawMode2(JKQTPCADMLine);
plot.getXAxis()->setDrawGrid(false);
plot.getYAxis()->setDrawMode1(JKQTPCADMLineTicksTickLabels);
- plot.getYAxis()->setDrawMode2(JKQTPCADMnone);
+ plot.getYAxis()->setDrawMode2(JKQTPCADMLine);
plot.getYAxis()->setAxisLabel("");
- plot.getYAxis()->setLabelType(JKQTPCALTdefault);
+ plot.getYAxis()->setTickLabelType(JKQTPCALTdefault);
plot.setY(0,110);
plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTdefault.png"), "png");
plot.setY(1e-6,1.1e3);
plot.getYAxis()->setMinTicks(7);
- plot.getYAxis()->setLabelType(JKQTPCALTexponentCharacter);
+ plot.getYAxis()->setTickLabelType(JKQTPCALTexponentCharacter);
plot.getYAxis()->setLogAxis(true);
- plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTexponentCharacter.png"), "png");
+ plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTexponentCharacter.png"), "png");
plot.getYAxis()->setLogAxis(false);
- plot.setY(-1.3, 1.55);
+ plot.getYAxis()->setDrawMode1(JKQTPCADMLineTicksTickLabels);
+ plot.getYAxis()->setDrawMode2(JKQTPCADMLineTicks);
+ plot.setY(-1.55, 1.55);
plot.getYAxis()->setMinTicks(5);
- plot.getYAxis()->setLabelType(JKQTPCALTintfrac);
- plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTintfrac.png"), "png");
- plot.getYAxis()->setLabelType(JKQTPCALTintsfrac);
- plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTintsfrac.png"), "png");
- plot.getYAxis()->setLabelType(JKQTPCALTintslashfrac);
- plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTintslashfrac.png"), "png");
- plot.getYAxis()->setLabelType(JKQTPCALTfrac);
- plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTfrac.png"), "png");
- plot.getYAxis()->setLabelType(JKQTPCALTsfrac);
- plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTsfrac.png"), "png");
- plot.getYAxis()->setLabelType(JKQTPCALTslashfrac);
- plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTslashfrac.png"), "png");
+ plot.getYAxis()->setTickLabelType(JKQTPCALTintfrac);
+ plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTintfrac.png"), "png");
+ plot.getYAxis()->setTickLabelType(JKQTPCALTintsfrac);
+ plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTintsfrac.png"), "png");
+ plot.getYAxis()->setTickLabelType(JKQTPCALTintslashfrac);
+ plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*1.2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTintslashfrac.png"), "png");
+ plot.getYAxis()->setTickLabelType(JKQTPCALTfrac);
+ plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTfrac.png"), "png");
+ plot.getYAxis()->setTickLabelType(JKQTPCALTsfrac);
+ plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTsfrac.png"), "png");
+ plot.getYAxis()->setTickLabelType(JKQTPCALTslashfrac);
+ plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTslashfrac.png"), "png");
+ plot.getYAxis()->setLogAxis(true);
plot.setY(0.000008,100000);
plot.getYAxis()->setMinTicks(4);
- plot.getYAxis()->setLabelType(JKQTPCALTexponent);
- plot.getYAxis()->setLogAxis(true);
+ plot.getYAxis()->setTickLabelType(JKQTPCALTexponent);
plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTexponent.png"), "png");
+ plot.getYAxis()->setLogAxis(true);
plot.setY(0.000008,100000);
plot.getYAxis()->setMinTicks(4);
- plot.getYAxis()->setLabelType(JKQTPCALTscientific);
- plot.getYAxis()->setLogAxis(true);
- plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTscientific.png"), "png");
+ plot.getYAxis()->setTickLabelType(JKQTPCALTscientific);
+ plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*1.2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTscientific.png"), "png");
+ plot.getYAxis()->setLogAxis(false);
plot.getYAxis()->setMinTicks(4);
plot.setY(QDateTime(QDate(1999,10,1),QTime(0,0,0)).toMSecsSinceEpoch(),
QDateTime(QDate(2000,2,1),QTime(0,0,0)).toMSecsSinceEpoch());
- plot.getYAxis()->setLabelType(JKQTPCALTdate);
- plot.getYAxis()->setLogAxis(false);
+ plot.getYAxis()->setTickLabelType(JKQTPCALTdate);
plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTdate.png"), "png");
plot.setY(QDateTime(QDate(2000,2,1),QTime(12,0,0)).toMSecsSinceEpoch(),
QDateTime(QDate(2000,2,1),QTime(24,0,0)).toMSecsSinceEpoch());
- plot.getYAxis()->setLabelType(JKQTPCALTtime);
+ plot.getYAxis()->setTickLabelType(JKQTPCALTtime);
plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*1.0,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTtime.png"), "png");
plot.setY(QDateTime(QDate(2010,10,1),QTime(12,0,0)).toMSecsSinceEpoch(),
QDateTime(QDate(2010,10,2),QTime(12,0,0)).toMSecsSinceEpoch());
- plot.getYAxis()->setLabelType(JKQTPCALTdatetime);
+ plot.getYAxis()->setTickLabelType(JKQTPCALTdatetime);
plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2.5,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTdatetime.png"), "png");
+
+ plot.setXY(0,10,0,1);
+ plot.setWidgetSize(iconsize*4,4*iconsize);
+ plot.setShowKey(false);
+ plot.setGrid(true);
+ plot.getXAxis()->setShowZeroAxis(false);
+ plot.getYAxis()->setShowZeroAxis(false);
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLine);
+ plot.getXAxis()->setDrawMode2(JKQTPCADMLine);
+ plot.getYAxis()->setDrawMode1(JKQTPCADMLine);
+ plot.getYAxis()->setDrawMode2(JKQTPCADMLine);
+ plot.getXAxis()->setAxisLabel("axis label");
+
+ int imgheight;
+ plot.getYAxis()->setTickLabelType(JKQTPCALTdefault);
+ plot.getXAxis()->setDrawMode1(JKQTPCADMnone);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMnone.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLine);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMLine.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMTicks);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMTicks.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMTickLabels);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMTickLabels.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMAxisLabel);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMAxisLabel.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLineTicksTickLabels);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMLineTicksTickLabels.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLineTicks);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMLineTicks.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMTicksTickLabelsAxisLabel);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMTicksTickLabelsAxisLabel.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMTicksTickLabels);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMTicksTickLabels.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMTickLabelsAxisLabel);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMTickLabelsAxisLabel.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMcomplete);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMcomplete.png"), "png");
+
+ plot.getYAxis()->setDrawMode1(JKQTPCADMnone);
+ plot.getYAxis()->setDrawMode2(JKQTPCADMnone);
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMMaxArrow);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMMaxArrow.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMMaxFilledArrow);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMMaxFilledArrow.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMMinArrow);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMMinArrow.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMMinFilledArrow);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMMinFilledArrow.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMcompleteMaxArrow);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMcompleteMaxArrow.png"), "png");
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMcompleteMinMaxArrow);
+ imgheight=iconsize; plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,plot.getHeight()-imgheight,plot.getWidth(),imgheight).save(outputDir.absoluteFilePath("JKQTPCADMcompleteMinMaxArrow.png"), "png");
+
}
int main(int argc, char* argv[])
@@ -270,8 +325,8 @@ int main(int argc, char* argv[])
parser.addOption(listlinedecoratorsOption);
QCommandLineOption listerrorindicatorsOption("listerrorindicators", "generate example images for all error-indicators.");
parser.addOption(listerrorindicatorsOption);
- QCommandLineOption listaxislabeltypeOption("listaxislabeltype", "generate example images for JKQTPCALabelType.");
- parser.addOption(listaxislabeltypeOption);
+ QCommandLineOption listaxisstylepropsOption("listaxisstyleprops", "generate example images for JKQTPCALabelType and other coordinate axis properties.");
+ parser.addOption(listaxisstylepropsOption);
QCommandLineOption iconsizeOption("iconsize", "typical size of the generatued images.", "iconsize", "24");
parser.addOption(iconsizeOption);
QCommandLineOption backgroundOption("background", "background color.", "background", "white");
@@ -282,7 +337,7 @@ int main(int argc, char* argv[])
const bool listsymbols=parser.isSet(listsymbolsOption);
const bool listlinedecorators=parser.isSet(listlinedecoratorsOption);
const bool listerrorindicators=parser.isSet(listerrorindicatorsOption);
- const bool listaxislabeltype=parser.isSet(listaxislabeltypeOption);
+ const bool listaxisstyleprops=parser.isSet(listaxisstylepropsOption);
const int iconsize=parser.value(iconsizeOption).toInt();
const QColor backgroundColor = jkqtp_String2QColor(parser.value(backgroundOption));
@@ -290,8 +345,8 @@ int main(int argc, char* argv[])
if (listsymbols) doListSymbols(outputDir, iconsize, backgroundColor);
if (listlinedecorators) doListLineDecorators(outputDir, iconsize, backgroundColor);
- if (listsymbols) doListErrorIndicators(outputDir, iconsize, backgroundColor);
- if (listaxislabeltype) doListJKQTPCALabelType(outputDir, iconsize, backgroundColor);
+ if (listerrorindicators) doListErrorIndicators(outputDir, iconsize, backgroundColor);
+ if (listaxisstyleprops) doListAxisStyling(outputDir, iconsize, backgroundColor);
return EXIT_SUCCESS;
}