diff --git a/doc/dox/whatsnew.dox b/doc/dox/whatsnew.dox
index 3ca33cc694..50b90971f1 100644
--- a/doc/dox/whatsnew.dox
+++ b/doc/dox/whatsnew.dox
@@ -94,6 +94,7 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
NEW: added entry for JKQTBasePlotterStyle::plotLabelColor to set the plot label color
NEW: added JKQTBasePlotterStyle::plotLabelTopBorder to set the spacing between top and plot label
NEW: Due to addition of JKQTMathText::setFontOptions() and the matchign extension of JKQTMathText::setFontSpecial() (see below) you can now add modifiers like +BOLD+ITALIC to any font-name provided to JKQTPlotter and in style INI-files
+ NEW: added JKQTPLabelMinBesides and JKQTPLabelMaxBesides to JKQTPLabelPosition, so labels can be set besides the axes
JKQTMathText:
diff --git a/doc/images/JKQTBasePlotter_addSecondaryXAxis.png b/doc/images/JKQTBasePlotter_addSecondaryXAxis.png
index a0afa82f38..9ae3809437 100644
Binary files a/doc/images/JKQTBasePlotter_addSecondaryXAxis.png and b/doc/images/JKQTBasePlotter_addSecondaryXAxis.png differ
diff --git a/doc/images/JKQTBasePlotter_addSecondaryYAxis.png b/doc/images/JKQTBasePlotter_addSecondaryYAxis.png
index 01ca136675..68c5296b6f 100644
Binary files a/doc/images/JKQTBasePlotter_addSecondaryYAxis.png and b/doc/images/JKQTBasePlotter_addSecondaryYAxis.png differ
diff --git a/doc/images/JKQTPBarHorizontalErrorGraph.png b/doc/images/JKQTPBarHorizontalErrorGraph.png
index b1670d2b8e..5eeb2c3340 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 20983f5936..465df36c39 100644
Binary files a/doc/images/JKQTPBarHorizontalErrorGraph_small.png and b/doc/images/JKQTPBarHorizontalErrorGraph_small.png differ
diff --git a/doc/images/JKQTPBarHorizontalGraphCustomDrawFunctor.png b/doc/images/JKQTPBarHorizontalGraphCustomDrawFunctor.png
index cce8ad05db..ee31640034 100644
Binary files a/doc/images/JKQTPBarHorizontalGraphCustomDrawFunctor.png and b/doc/images/JKQTPBarHorizontalGraphCustomDrawFunctor.png differ
diff --git a/doc/images/JKQTPBarHorizontalGraphCustomDrawFunctor_small.png b/doc/images/JKQTPBarHorizontalGraphCustomDrawFunctor_small.png
index 212d3db385..ea65f9698d 100644
Binary files a/doc/images/JKQTPBarHorizontalGraphCustomDrawFunctor_small.png and b/doc/images/JKQTPBarHorizontalGraphCustomDrawFunctor_small.png differ
diff --git a/doc/images/JKQTPBarHorizontalGraphFunctorFilling.png b/doc/images/JKQTPBarHorizontalGraphFunctorFilling.png
index f0aee88abd..d567022b71 100644
Binary files a/doc/images/JKQTPBarHorizontalGraphFunctorFilling.png and b/doc/images/JKQTPBarHorizontalGraphFunctorFilling.png differ
diff --git a/doc/images/JKQTPBarHorizontalGraphFunctorFilling_small.png b/doc/images/JKQTPBarHorizontalGraphFunctorFilling_small.png
index 43df0a41a0..f837030adc 100644
Binary files a/doc/images/JKQTPBarHorizontalGraphFunctorFilling_small.png and b/doc/images/JKQTPBarHorizontalGraphFunctorFilling_small.png differ
diff --git a/doc/images/JKQTPBarHorizontalGraphTwoColorFilling.png b/doc/images/JKQTPBarHorizontalGraphTwoColorFilling.png
index f6ab6d09b0..e6355f3e60 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 44a903029f..bfb4b41f0c 100644
Binary files a/doc/images/JKQTPBarHorizontalGraphTwoColorFilling_small.png and b/doc/images/JKQTPBarHorizontalGraphTwoColorFilling_small.png differ
diff --git a/doc/images/JKQTPBarVerticalErrorGraph.png b/doc/images/JKQTPBarVerticalErrorGraph.png
index 6f8a404032..a77b9d04f4 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 008e8426f6..ac187a5200 100644
Binary files a/doc/images/JKQTPBarVerticalErrorGraph_small.png and b/doc/images/JKQTPBarVerticalErrorGraph_small.png differ
diff --git a/doc/images/JKQTPBarVerticalGraphCustomDrawFunctor.png b/doc/images/JKQTPBarVerticalGraphCustomDrawFunctor.png
index ddd6d64959..7602c66948 100644
Binary files a/doc/images/JKQTPBarVerticalGraphCustomDrawFunctor.png and b/doc/images/JKQTPBarVerticalGraphCustomDrawFunctor.png differ
diff --git a/doc/images/JKQTPBarVerticalGraphCustomDrawFunctor_small.png b/doc/images/JKQTPBarVerticalGraphCustomDrawFunctor_small.png
index a976c1bcf9..218b52fecf 100644
Binary files a/doc/images/JKQTPBarVerticalGraphCustomDrawFunctor_small.png and b/doc/images/JKQTPBarVerticalGraphCustomDrawFunctor_small.png differ
diff --git a/doc/images/JKQTPBarVerticalGraphFunctorFilling.png b/doc/images/JKQTPBarVerticalGraphFunctorFilling.png
index 117c63cd3f..10a0f77715 100644
Binary files a/doc/images/JKQTPBarVerticalGraphFunctorFilling.png and b/doc/images/JKQTPBarVerticalGraphFunctorFilling.png differ
diff --git a/doc/images/JKQTPBarVerticalGraphFunctorFilling_small.png b/doc/images/JKQTPBarVerticalGraphFunctorFilling_small.png
index d7c4e5dc79..fc6fd108ba 100644
Binary files a/doc/images/JKQTPBarVerticalGraphFunctorFilling_small.png and b/doc/images/JKQTPBarVerticalGraphFunctorFilling_small.png differ
diff --git a/doc/images/JKQTPBarVerticalGraphTwoColorFilling.png b/doc/images/JKQTPBarVerticalGraphTwoColorFilling.png
index ed38990b17..bf4b753d59 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 91b3a64279..e3f2a7c7de 100644
Binary files a/doc/images/JKQTPBarVerticalGraphTwoColorFilling_small.png and b/doc/images/JKQTPBarVerticalGraphTwoColorFilling_small.png differ
diff --git a/doc/images/JKQTPBoxplotHorizontalGraph.png b/doc/images/JKQTPBoxplotHorizontalGraph.png
index 688488ec91..ba341c22ec 100644
Binary files a/doc/images/JKQTPBoxplotHorizontalGraph.png and b/doc/images/JKQTPBoxplotHorizontalGraph.png differ
diff --git a/doc/images/JKQTPBoxplotHorizontalGraph_small.png b/doc/images/JKQTPBoxplotHorizontalGraph_small.png
index 70280ace3a..1b72bafa03 100644
Binary files a/doc/images/JKQTPBoxplotHorizontalGraph_small.png and b/doc/images/JKQTPBoxplotHorizontalGraph_small.png differ
diff --git a/doc/images/JKQTPBoxplotVerticalGraph.png b/doc/images/JKQTPBoxplotVerticalGraph.png
index fa48f47b34..a8094220ad 100644
Binary files a/doc/images/JKQTPBoxplotVerticalGraph.png and b/doc/images/JKQTPBoxplotVerticalGraph.png differ
diff --git a/doc/images/JKQTPBoxplotVerticalGraph_small.png b/doc/images/JKQTPBoxplotVerticalGraph_small.png
index 1334ece439..349724d467 100644
Binary files a/doc/images/JKQTPBoxplotVerticalGraph_small.png and b/doc/images/JKQTPBoxplotVerticalGraph_small.png differ
diff --git a/doc/images/JKQTPColumnContourPlot.png b/doc/images/JKQTPColumnContourPlot.png
index dffc065ebf..c4c52e17a2 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 ee74e281e2..fec6c2f5f9 100644
Binary files a/doc/images/JKQTPColumnContourPlot_small.png and b/doc/images/JKQTPColumnContourPlot_small.png differ
diff --git a/doc/images/JKQTPCoordinateAxisStyleDrawMode0.png b/doc/images/JKQTPCoordinateAxisStyleDrawMode0.png
index 547752e1a6..a9cd55a8ba 100644
Binary files a/doc/images/JKQTPCoordinateAxisStyleDrawMode0.png and b/doc/images/JKQTPCoordinateAxisStyleDrawMode0.png differ
diff --git a/doc/images/JKQTPFilledCurveXErrorGraph.png b/doc/images/JKQTPFilledCurveXErrorGraph.png
index e50f083beb..4b41c3ebc7 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 964eafe607..82b33f5f28 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 874fb0b319..0a8b530f62 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 8aa42cb2c3..636db3f6a7 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 6a4f4bae18..77785849cb 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 a2b9182a54..e167ede734 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 c029873e63..9a44e7da47 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 c40ac86222..254d204477 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 1fb70576d9..6ddd270fd7 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 37091791e3..21c50ca17c 100644
Binary files a/doc/images/JKQTPFilledCurveYGraph_wiggle.png and b/doc/images/JKQTPFilledCurveYGraph_wiggle.png differ
diff --git a/doc/images/JKQTPImpulsesHorizontalErrorGraph.png b/doc/images/JKQTPImpulsesHorizontalErrorGraph.png
index 5462e48a28..6e977b5d57 100644
Binary files a/doc/images/JKQTPImpulsesHorizontalErrorGraph.png and b/doc/images/JKQTPImpulsesHorizontalErrorGraph.png differ
diff --git a/doc/images/JKQTPImpulsesHorizontalErrorGraph_small.png b/doc/images/JKQTPImpulsesHorizontalErrorGraph_small.png
index cb179797e5..0e7428e254 100644
Binary files a/doc/images/JKQTPImpulsesHorizontalErrorGraph_small.png and b/doc/images/JKQTPImpulsesHorizontalErrorGraph_small.png differ
diff --git a/doc/images/JKQTPImpulsesHorizontalGraph.png b/doc/images/JKQTPImpulsesHorizontalGraph.png
index aecf18c25c..81ca5aaee3 100644
Binary files a/doc/images/JKQTPImpulsesHorizontalGraph.png and b/doc/images/JKQTPImpulsesHorizontalGraph.png differ
diff --git a/doc/images/JKQTPImpulsesHorizontalGraphBaseline.png b/doc/images/JKQTPImpulsesHorizontalGraphBaseline.png
index a2b15cc285..382608a504 100644
Binary files a/doc/images/JKQTPImpulsesHorizontalGraphBaseline.png and b/doc/images/JKQTPImpulsesHorizontalGraphBaseline.png differ
diff --git a/doc/images/JKQTPImpulsesHorizontalGraphNoBaseline.png b/doc/images/JKQTPImpulsesHorizontalGraphNoBaseline.png
index aecf18c25c..81ca5aaee3 100644
Binary files a/doc/images/JKQTPImpulsesHorizontalGraphNoBaseline.png and b/doc/images/JKQTPImpulsesHorizontalGraphNoBaseline.png differ
diff --git a/doc/images/JKQTPImpulsesHorizontalGraph_small.png b/doc/images/JKQTPImpulsesHorizontalGraph_small.png
index da07b5b94a..64f9e1a5d8 100644
Binary files a/doc/images/JKQTPImpulsesHorizontalGraph_small.png and b/doc/images/JKQTPImpulsesHorizontalGraph_small.png differ
diff --git a/doc/images/JKQTPImpulsesVerticalErrorGraph.png b/doc/images/JKQTPImpulsesVerticalErrorGraph.png
index cc7f1c5618..185cdc2eb5 100644
Binary files a/doc/images/JKQTPImpulsesVerticalErrorGraph.png and b/doc/images/JKQTPImpulsesVerticalErrorGraph.png differ
diff --git a/doc/images/JKQTPImpulsesVerticalErrorGraph_small.png b/doc/images/JKQTPImpulsesVerticalErrorGraph_small.png
index f4cde09a5a..8b45552579 100644
Binary files a/doc/images/JKQTPImpulsesVerticalErrorGraph_small.png and b/doc/images/JKQTPImpulsesVerticalErrorGraph_small.png differ
diff --git a/doc/images/JKQTPImpulsesVerticalGraph.png b/doc/images/JKQTPImpulsesVerticalGraph.png
index b36460a31e..25aaba868f 100644
Binary files a/doc/images/JKQTPImpulsesVerticalGraph.png and b/doc/images/JKQTPImpulsesVerticalGraph.png differ
diff --git a/doc/images/JKQTPImpulsesVerticalGraphBaseline.png b/doc/images/JKQTPImpulsesVerticalGraphBaseline.png
index 306cb01a28..c9bca2a359 100644
Binary files a/doc/images/JKQTPImpulsesVerticalGraphBaseline.png and b/doc/images/JKQTPImpulsesVerticalGraphBaseline.png differ
diff --git a/doc/images/JKQTPImpulsesVerticalGraphNoBaseline.png b/doc/images/JKQTPImpulsesVerticalGraphNoBaseline.png
index b36460a31e..25aaba868f 100644
Binary files a/doc/images/JKQTPImpulsesVerticalGraphNoBaseline.png and b/doc/images/JKQTPImpulsesVerticalGraphNoBaseline.png differ
diff --git a/doc/images/JKQTPImpulsesVerticalGraph_Symbols.png b/doc/images/JKQTPImpulsesVerticalGraph_Symbols.png
index 860f56e569..59c3d772ab 100644
Binary files a/doc/images/JKQTPImpulsesVerticalGraph_Symbols.png and b/doc/images/JKQTPImpulsesVerticalGraph_Symbols.png differ
diff --git a/doc/images/JKQTPImpulsesVerticalGraph_Symbols_small.png b/doc/images/JKQTPImpulsesVerticalGraph_Symbols_small.png
index b559069357..2cb060b539 100644
Binary files a/doc/images/JKQTPImpulsesVerticalGraph_Symbols_small.png and b/doc/images/JKQTPImpulsesVerticalGraph_Symbols_small.png differ
diff --git a/doc/images/JKQTPImpulsesVerticalGraph_small.png b/doc/images/JKQTPImpulsesVerticalGraph_small.png
index 0a42e224a2..20579a3e7f 100644
Binary files a/doc/images/JKQTPImpulsesVerticalGraph_small.png and b/doc/images/JKQTPImpulsesVerticalGraph_small.png differ
diff --git a/doc/images/JKQTPXYFunctionLineGraph.png b/doc/images/JKQTPXYFunctionLineGraph.png
index d9f6820655..3a75950472 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 52582498f7..c4f7ed9ea8 100644
Binary files a/doc/images/JKQTPXYFunctionLineGraph_small.png and b/doc/images/JKQTPXYFunctionLineGraph_small.png differ
diff --git a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorBars.png b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorBars.png
index 5ab6a47c5b..ee46361633 100644
Binary files a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorBars.png and b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorBars.png differ
diff --git a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorBars_small.png b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorBars_small.png
index 4fef05bf09..2f74f6bcac 100644
Binary files a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorBars_small.png and b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorBars_small.png differ
diff --git a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorLines.png b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorLines.png
index aad2533ef4..feeaeadf59 100644
Binary files a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorLines.png and b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorLines.png differ
diff --git a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorLines_small.png b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorLines_small.png
index cbd4254620..971913f444 100644
Binary files a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorLines_small.png and b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorLines_small.png differ
diff --git a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorPolygons.png b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorPolygons.png
index 36f0e38eb0..e9ddbd2138 100644
Binary files a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorPolygons.png and b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorPolygons.png differ
diff --git a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorPolygons_small.png b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorPolygons_small.png
index fb7bad789f..a57aff4650 100644
Binary files a/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorPolygons_small.png and b/doc/images/JKQTPXYLineErrorGraph_JKQTPErrorPolygons_small.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTdate.png b/doc/images/axisstyle/JKQTPCALTdate.png
index 88b8d24232..c02cef24a9 100644
Binary files a/doc/images/axisstyle/JKQTPCALTdate.png and b/doc/images/axisstyle/JKQTPCALTdate.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTdatetime.png b/doc/images/axisstyle/JKQTPCALTdatetime.png
index f018b9cbed..a6d0fc0bff 100644
Binary files a/doc/images/axisstyle/JKQTPCALTdatetime.png and b/doc/images/axisstyle/JKQTPCALTdatetime.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTdefault.png b/doc/images/axisstyle/JKQTPCALTdefault.png
index d77b88fa01..a9889bdd1f 100644
Binary files a/doc/images/axisstyle/JKQTPCALTdefault.png and b/doc/images/axisstyle/JKQTPCALTdefault.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTexponent.png b/doc/images/axisstyle/JKQTPCALTexponent.png
index 4bd5af3514..7b0298063e 100644
Binary files a/doc/images/axisstyle/JKQTPCALTexponent.png and b/doc/images/axisstyle/JKQTPCALTexponent.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTexponentCharacter.png b/doc/images/axisstyle/JKQTPCALTexponentCharacter.png
index aaf7eaba14..c9a6b6d415 100644
Binary files a/doc/images/axisstyle/JKQTPCALTexponentCharacter.png and b/doc/images/axisstyle/JKQTPCALTexponentCharacter.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTfrac.png b/doc/images/axisstyle/JKQTPCALTfrac.png
index e2f313538d..0223661a00 100644
Binary files a/doc/images/axisstyle/JKQTPCALTfrac.png and b/doc/images/axisstyle/JKQTPCALTfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTintfrac.png b/doc/images/axisstyle/JKQTPCALTintfrac.png
index 30b6d713db..e314e70f0c 100644
Binary files a/doc/images/axisstyle/JKQTPCALTintfrac.png and b/doc/images/axisstyle/JKQTPCALTintfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTintsfrac.png b/doc/images/axisstyle/JKQTPCALTintsfrac.png
index e6965ab023..d3784f24b8 100644
Binary files a/doc/images/axisstyle/JKQTPCALTintsfrac.png and b/doc/images/axisstyle/JKQTPCALTintsfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTintslashfrac.png b/doc/images/axisstyle/JKQTPCALTintslashfrac.png
index 2321e47bc4..5f246f301f 100644
Binary files a/doc/images/axisstyle/JKQTPCALTintslashfrac.png and b/doc/images/axisstyle/JKQTPCALTintslashfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTprintf.png b/doc/images/axisstyle/JKQTPCALTprintf.png
index eef7d0a441..4058dd8d07 100644
Binary files a/doc/images/axisstyle/JKQTPCALTprintf.png and b/doc/images/axisstyle/JKQTPCALTprintf.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTscientific.png b/doc/images/axisstyle/JKQTPCALTscientific.png
index 17f77a034b..a8ee0beec5 100644
Binary files a/doc/images/axisstyle/JKQTPCALTscientific.png and b/doc/images/axisstyle/JKQTPCALTscientific.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTsfrac.png b/doc/images/axisstyle/JKQTPCALTsfrac.png
index 8436d76fda..f9e414d683 100644
Binary files a/doc/images/axisstyle/JKQTPCALTsfrac.png and b/doc/images/axisstyle/JKQTPCALTsfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTslashfrac.png b/doc/images/axisstyle/JKQTPCALTslashfrac.png
index e9ffc2d5b3..1c6ac50728 100644
Binary files a/doc/images/axisstyle/JKQTPCALTslashfrac.png and b/doc/images/axisstyle/JKQTPCALTslashfrac.png differ
diff --git a/doc/images/axisstyle/JKQTPCALTtime.png b/doc/images/axisstyle/JKQTPCALTtime.png
index 8e164556ed..e5bb85732b 100644
Binary files a/doc/images/axisstyle/JKQTPCALTtime.png and b/doc/images/axisstyle/JKQTPCALTtime.png differ
diff --git a/doc/images/axisstyle/JKQTPLTMLin.png b/doc/images/axisstyle/JKQTPLTMLin.png
index 81130e2997..699a8093df 100644
Binary files a/doc/images/axisstyle/JKQTPLTMLin.png and b/doc/images/axisstyle/JKQTPLTMLin.png differ
diff --git a/doc/images/axisstyle/JKQTPLTMLinOrPower.png b/doc/images/axisstyle/JKQTPLTMLinOrPower.png
index 501f1d0616..c162cbe3e1 100644
Binary files a/doc/images/axisstyle/JKQTPLTMLinOrPower.png and b/doc/images/axisstyle/JKQTPLTMLinOrPower.png differ
diff --git a/doc/images/axisstyle/JKQTPLTMPower.png b/doc/images/axisstyle/JKQTPLTMPower.png
index a126eac6c8..2c6198ac15 100644
Binary files a/doc/images/axisstyle/JKQTPLTMPower.png and b/doc/images/axisstyle/JKQTPLTMPower.png differ
diff --git a/doc/images/axisstyle/axis_unit_scaling_none.png b/doc/images/axisstyle/axis_unit_scaling_none.png
index 3b3d905240..2ca4de81e1 100644
Binary files a/doc/images/axisstyle/axis_unit_scaling_none.png and b/doc/images/axisstyle/axis_unit_scaling_none.png differ
diff --git a/doc/images/axisstyle/axis_unit_scaling_pi.png b/doc/images/axisstyle/axis_unit_scaling_pi.png
index a01bc66916..2a667b3e11 100644
Binary files a/doc/images/axisstyle/axis_unit_scaling_pi.png and b/doc/images/axisstyle/axis_unit_scaling_pi.png differ
diff --git a/doc/images/jkqtmathtext/jkqtmathtext_unicode.png b/doc/images/jkqtmathtext/jkqtmathtext_unicode.png
index 38513a49b8..d8bf9ec46a 100644
Binary files a/doc/images/jkqtmathtext/jkqtmathtext_unicode.png and b/doc/images/jkqtmathtext/jkqtmathtext_unicode.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelCenter.png b/doc/images/labelstyles/JKQTPLabelCenter.png
index c4033951f0..75e7f1ef9b 100644
Binary files a/doc/images/labelstyles/JKQTPLabelCenter.png and b/doc/images/labelstyles/JKQTPLabelCenter.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelCenter_zeroaxis.png b/doc/images/labelstyles/JKQTPLabelCenter_zeroaxis.png
new file mode 100644
index 0000000000..fc93db23d7
Binary files /dev/null and b/doc/images/labelstyles/JKQTPLabelCenter_zeroaxis.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelMax.png b/doc/images/labelstyles/JKQTPLabelMax.png
index c25926f5c4..66cfe7b1af 100644
Binary files a/doc/images/labelstyles/JKQTPLabelMax.png and b/doc/images/labelstyles/JKQTPLabelMax.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelMaxBesides.png b/doc/images/labelstyles/JKQTPLabelMaxBesides.png
new file mode 100644
index 0000000000..7a787ae513
Binary files /dev/null and b/doc/images/labelstyles/JKQTPLabelMaxBesides.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelMaxBesides_zeroaxis.png b/doc/images/labelstyles/JKQTPLabelMaxBesides_zeroaxis.png
new file mode 100644
index 0000000000..06398542df
Binary files /dev/null and b/doc/images/labelstyles/JKQTPLabelMaxBesides_zeroaxis.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelMax_zeroaxis.png b/doc/images/labelstyles/JKQTPLabelMax_zeroaxis.png
new file mode 100644
index 0000000000..5d4434df89
Binary files /dev/null and b/doc/images/labelstyles/JKQTPLabelMax_zeroaxis.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelMin.png b/doc/images/labelstyles/JKQTPLabelMin.png
index 038de11f07..2d88a57513 100644
Binary files a/doc/images/labelstyles/JKQTPLabelMin.png and b/doc/images/labelstyles/JKQTPLabelMin.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelMinBesides.png b/doc/images/labelstyles/JKQTPLabelMinBesides.png
new file mode 100644
index 0000000000..9b9167edbb
Binary files /dev/null and b/doc/images/labelstyles/JKQTPLabelMinBesides.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelMinBesides_zeroaxis.png b/doc/images/labelstyles/JKQTPLabelMinBesides_zeroaxis.png
new file mode 100644
index 0000000000..a690e68d19
Binary files /dev/null and b/doc/images/labelstyles/JKQTPLabelMinBesides_zeroaxis.png differ
diff --git a/doc/images/labelstyles/JKQTPLabelMin_zeroaxis.png b/doc/images/labelstyles/JKQTPLabelMin_zeroaxis.png
new file mode 100644
index 0000000000..696ce508cb
Binary files /dev/null and b/doc/images/labelstyles/JKQTPLabelMin_zeroaxis.png differ
diff --git a/doc/images/styles/blackandwhite.ini.png b/doc/images/styles/blackandwhite.ini.png
index f9dea3449e..8efedaeb48 100644
Binary files a/doc/images/styles/blackandwhite.ini.png and b/doc/images/styles/blackandwhite.ini.png differ
diff --git a/doc/images/styles/blueprint.ini.png b/doc/images/styles/blueprint.ini.png
index a46768c68c..ad6a308723 100644
Binary files a/doc/images/styles/blueprint.ini.png and b/doc/images/styles/blueprint.ini.png differ
diff --git a/doc/images/styles/cyberpunk.ini.png b/doc/images/styles/cyberpunk.ini.png
index dfc5c40caa..21ea0fb079 100644
Binary files a/doc/images/styles/cyberpunk.ini.png and b/doc/images/styles/cyberpunk.ini.png differ
diff --git a/doc/images/styles/dark.ini.png b/doc/images/styles/dark.ini.png
index 91247fc7c1..68d6ec080c 100644
Binary files a/doc/images/styles/dark.ini.png and b/doc/images/styles/dark.ini.png differ
diff --git a/doc/images/styles/default.ini.png b/doc/images/styles/default.ini.png
index 8e61b0f8c8..c3bc3ac691 100644
Binary files a/doc/images/styles/default.ini.png and b/doc/images/styles/default.ini.png differ
diff --git a/doc/images/styles/legacy_default_style.ini.png b/doc/images/styles/legacy_default_style.ini.png
index f55ba189fb..d5f7953f79 100644
Binary files a/doc/images/styles/legacy_default_style.ini.png and b/doc/images/styles/legacy_default_style.ini.png differ
diff --git a/doc/images/styles/seaborn.ini.png b/doc/images/styles/seaborn.ini.png
index 77a0d760b1..786ca9d0e9 100644
Binary files a/doc/images/styles/seaborn.ini.png and b/doc/images/styles/seaborn.ini.png differ
diff --git a/doc/images/styles/simple_arrowsaxes.ini.png b/doc/images/styles/simple_arrowsaxes.ini.png
index 681f0231ee..61d7d64b31 100644
Binary files a/doc/images/styles/simple_arrowsaxes.ini.png and b/doc/images/styles/simple_arrowsaxes.ini.png differ
diff --git a/doc/images/styles/simple_axesoffset.ini.png b/doc/images/styles/simple_axesoffset.ini.png
index 81ddb0b6e8..f31c614a3b 100644
Binary files a/doc/images/styles/simple_axesoffset.ini.png and b/doc/images/styles/simple_axesoffset.ini.png differ
diff --git a/doc/images/styles/simple_axesoffset_plotbox.ini.png b/doc/images/styles/simple_axesoffset_plotbox.ini.png
index 651c1c0d55..f216077243 100644
Binary files a/doc/images/styles/simple_axesoffset_plotbox.ini.png and b/doc/images/styles/simple_axesoffset_plotbox.ini.png differ
diff --git a/doc/images/styles/simple_gridandticks.ini.png b/doc/images/styles/simple_gridandticks.ini.png
index d48db68454..9c0079b787 100644
Binary files a/doc/images/styles/simple_gridandticks.ini.png and b/doc/images/styles/simple_gridandticks.ini.png differ
diff --git a/lib/jkqtmathtext/jkqtmathtexttools.h b/lib/jkqtmathtext/jkqtmathtexttools.h
index 448876ecc8..c34f692116 100644
--- a/lib/jkqtmathtext/jkqtmathtexttools.h
+++ b/lib/jkqtmathtext/jkqtmathtexttools.h
@@ -393,11 +393,11 @@ struct JKQTMATHTEXT_LIB_EXPORT JKQTMathTextNodeSize {
JKQTMathTextNodeSize();
/** \brief width of whole block */
double width;
- /** \brief baselineHeight of whole block */
+ /** \brief baselineHeight of whole block, i.e. the ascent */
double baselineHeight;
/** \brief overallHeight of whole block */
double overallHeight;
- /** \brief strikeoutPos of whole block */
+ /** \brief strikeoutPos of whole block, i.e. distance of the strikeout position from the baseline */
double strikeoutPos;
/** \brief x-correction (<0 = move to the left) for subscripts, i.e. approximately at the height of the baseline
*
@@ -408,7 +408,7 @@ struct JKQTMATHTEXT_LIB_EXPORT JKQTMathTextNodeSize {
double baselineXCorrection;
/** \brief x-correction (>0 = move to the right) for superscripts, i.e. approximately at the top of the box */
double topXCorrection;
- /** \brief calculate the descent */
+ /** \brief calculate the descent (overallHeight-baselineHeight) */
inline double getDescent() const { return overallHeight-baselineHeight; }
/** \brief calculate the overall size in floating-point precision */
inline QSizeF getSize() const { return QSizeF(width, overallHeight); }
diff --git a/lib/jkqtplotter/graphs/jkqtpimagergb.cpp b/lib/jkqtplotter/graphs/jkqtpimagergb.cpp
index 0d32864a1d..e231b863f6 100644
--- a/lib/jkqtplotter/graphs/jkqtpimagergb.cpp
+++ b/lib/jkqtplotter/graphs/jkqtpimagergb.cpp
@@ -152,18 +152,19 @@ void JKQTPRGBMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftS
colorBarRightAxis->setRange(internalDataMin, internalDataMax);
colorBarRightAxis->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotHeight());
colorBarRightAxisB->setAxisLabel(imageNameR);
- QSizeF s2=colorBarRightAxis->getSize2(painter);
- QSizeF s1=colorBarRightAxis->getSize1(painter);
- if (!colorbarsSideBySide || !firstC) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.width()+s1.width());
+ const auto s2=colorBarRightAxis->getSize2(painter);
+ const auto s1=colorBarRightAxis->getSize1(painter);
+ if (!colorbarsSideBySide || !firstC) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.requiredSize
+ +s1.requiredSize);
}
if (colorBarTopVisible) {
//if (!colorbarsSideBySide || !firstC) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset);
colorBarTopAxis->setRange(internalDataMin, internalDataMax);
colorBarTopAxis->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotWidth());
colorBarTopAxisB->setAxisLabel(imageNameR);
- QSizeF s2=colorBarTopAxisB->getSize2(painter);
- QSizeF s1=colorBarTopAxisB->getSize2(painter);
- if (!colorbarsSideBySide || !firstC) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.height()+s1.height());
+ const auto s2=colorBarTopAxisB->getSize2(painter);
+ const auto s1=colorBarTopAxisB->getSize2(painter);
+ if (!colorbarsSideBySide || !firstC) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.requiredSize+s1.requiredSize);
}
firstC=true;
}
@@ -175,18 +176,18 @@ void JKQTPRGBMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftS
colorBarRightAxisG->setRange(internalDataMinG, internalDataMaxG);
colorBarRightAxisG->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotHeight());
colorBarRightAxisB->setAxisLabel(imageNameG);
- QSizeF s2=colorBarRightAxis->getSize2(painter);
- QSizeF s1=colorBarRightAxis->getSize1(painter);
- if (!colorbarsSideBySide || !firstC) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.width()+s1.width());
+ const auto s2=colorBarRightAxis->getSize2(painter);
+ const auto s1=colorBarRightAxis->getSize1(painter);
+ if (!colorbarsSideBySide || !firstC) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.requiredSize+s1.requiredSize);
}
if (colorBarTopVisible) {
//if (!colorbarsSideBySide || !firstC) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset);
colorBarTopAxisG->setRange(internalDataMinG, internalDataMaxG);
colorBarTopAxisG->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotWidth());
colorBarTopAxisB->setAxisLabel(imageNameG);
- QSizeF s2=colorBarTopAxisB->getSize2(painter);
- QSizeF s1=colorBarTopAxisB->getSize1(painter);
- if (!colorbarsSideBySide || !firstC) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.height()+s1.height());
+ const auto s2=colorBarTopAxisB->getSize2(painter);
+ const auto s1=colorBarTopAxisB->getSize1(painter);
+ if (!colorbarsSideBySide || !firstC) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.requiredSize+s1.requiredSize);
}
firstC=true;
}
@@ -198,18 +199,18 @@ void JKQTPRGBMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftS
colorBarRightAxisB->setRange(internalDataMinB, internalDataMaxB);
colorBarRightAxisB->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotHeight());
colorBarRightAxisB->setAxisLabel(imageNameB);
- QSizeF s2=colorBarRightAxis->getSize2(painter);
- QSizeF s1=colorBarRightAxis->getSize1(painter);
- if (!colorbarsSideBySide || !firstC) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.width()+s1.width());
+ const auto s2=colorBarRightAxis->getSize2(painter);
+ const auto s1=colorBarRightAxis->getSize1(painter);
+ if (!colorbarsSideBySide || !firstC) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.requiredSize+s1.requiredSize);
}
if (colorBarTopVisible) {
//if (!colorbarsSideBySide || !firstC) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset);
colorBarTopAxisB->setRange(internalDataMinB, internalDataMaxB);
colorBarTopAxisB->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotWidth());
colorBarTopAxisB->setAxisLabel(imageNameB);
- QSizeF s2=colorBarTopAxisB->getSize2(painter);
- QSizeF s1=colorBarTopAxisB->getSize1(painter);
- if (!colorbarsSideBySide || !firstC) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.height()+s1.height());
+ const auto s2=colorBarTopAxisB->getSize2(painter);
+ const auto s1=colorBarTopAxisB->getSize1(painter);
+ if (!colorbarsSideBySide || !firstC) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+static_cast(s2.requiredSize+s1.requiredSize);
}
firstC=true;
}
diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp
index d90803e16d..6a62170b81 100644
--- a/lib/jkqtplotter/jkqtpbaseplotter.cpp
+++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp
@@ -117,21 +117,20 @@ bool JKQTBasePlotter::deregisterSaveDataAdapter(JKQTPSaveDataAdapter *adapter)
-JKQTBasePlotter::textSizeData JKQTBasePlotter::getTextSizeDetail(const QFont &fm, const QString &text, QPainter& painter)
+JKQTMathTextNodeSize JKQTBasePlotter::getTextSizeDetail(const QFont &fm, const QString &text, QPainter& painter)
{
return getTextSizeDetail(fm.family(), fm.pointSizeF(), text, painter);
}
-JKQTBasePlotter::textSizeData JKQTBasePlotter::getTextSizeDetail(const QString &fontName, double fontSize, const QString &text, QPainter& painter)
+JKQTMathTextNodeSize JKQTBasePlotter::getTextSizeDetail(const QString &fontName, double fontSize, const QString &text, QPainter& painter)
{
- thread_local QHash s_TextSizeDataCache;
+ thread_local QHash s_TextSizeDataCache;
JKQTBasePlotter::textSizeKey dh(fontName, fontSize, text, painter.device());
if (s_TextSizeDataCache.contains(dh)) return s_TextSizeDataCache[dh];
- JKQTBasePlotter::textSizeData d;
mathText.setFontSpecial(fontName);
mathText.setFontSize(fontSize);
mathText.parse(text);
- mathText.getSizeDetail(painter, d.width, d.ascent, d.descent, d.strikeoutPos);
+ const JKQTMathTextNodeSize d=mathText.getSizeDetail(painter);
s_TextSizeDataCache[dh]=d;
//qDebug()<<"+++ textsize hash size: "<getSize1(painter, &elongateMin, &elongateMax);
- internalPlotBorderBottom+=s.height();
- if (elongateMin>0) elongateLeft=qMax(elongateLeft,elongateMin);
- if (elongateMax>0) elongateRight=qMax(elongateRight,elongateMax);
+ auto s=xAxis->getSize1(painter);
+ internalPlotBorderBottom+=s.requiredSize;
+ if (s.elongateMin>0) elongateLeft=qMax(elongateLeft,s.elongateMin);
+ if (s.elongateMax>0) elongateRight=qMax(elongateRight,s.elongateMax);
s=xAxis->getSize2(painter);
- internalPlotBorderTop+=s.height();
+ if (s.elongateMin>0) elongateLeft=qMax(elongateLeft,s.elongateMin);
+ if (s.elongateMax>0) elongateRight=qMax(elongateRight,s.elongateMax);
+ internalPlotBorderTop+=s.requiredSize;
+ double elongateBottom=0,elongateTop=0;
s=yAxis->getSize1(painter);
- internalPlotBorderLeft+=s.width();
+ if (s.elongateMin>0) elongateBottom=qMax(elongateBottom,s.elongateMin);
+ if (s.elongateMax>0) elongateTop=qMax(elongateTop,s.elongateMax);
+ internalPlotBorderLeft+=s.requiredSize;
s=yAxis->getSize2(painter);
- internalPlotBorderRight+=s.width();
+ if (s.elongateMin>0) elongateBottom=qMax(elongateBottom,s.elongateMin);
+ if (s.elongateMax>0) elongateTop=qMax(elongateTop,s.elongateMax);
+ internalPlotBorderRight+=s.requiredSize;
internalPlotBorderTop_notIncludingAxisAndOutsidePlotSections=internalPlotBorderTop;
internalPlotBorderLeft_notIncludingAxisAndOutsidePlotSections=internalPlotBorderLeft;
@@ -896,16 +901,18 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){
// read size required by secondary axes
for (const auto& ax: qAsConst(secondaryYAxis)) {
- internalPlotBorderLeft+=ax->getSize1(painter).width()+plotterStyle.secondaryAxisSeparation;
- internalPlotBorderRight+=ax->getSize2(painter).width()+plotterStyle.secondaryAxisSeparation;
+ internalPlotBorderLeft+=ax->getSize1(painter).requiredSize+plotterStyle.secondaryAxisSeparation;
+ internalPlotBorderRight+=ax->getSize2(painter).requiredSize+plotterStyle.secondaryAxisSeparation;
}
for (const auto& ax: qAsConst(secondaryXAxis)) {
- internalPlotBorderBottom+=ax->getSize1(painter).height()+plotterStyle.secondaryAxisSeparation;
- internalPlotBorderTop+=ax->getSize2(painter).height()+plotterStyle.secondaryAxisSeparation;
+ internalPlotBorderBottom+=ax->getSize1(painter).requiredSize+plotterStyle.secondaryAxisSeparation;
+ internalPlotBorderTop+=ax->getSize2(painter).requiredSize+plotterStyle.secondaryAxisSeparation;
}
if (internalPlotBorderRight0) {
- double ibMove1=xAxis->getSize1(painter).height();
+ double ibMove1=xAxis->getSize1(painter).requiredSize;
if (ibMove1>0) ibMove1+=plotterStyle.secondaryAxisSeparation;
- double ibMove2=xAxis->getSize2(painter).height();
+ double ibMove2=xAxis->getSize2(painter).requiredSize;
if (ibMove2>0) ibMove1+=plotterStyle.secondaryAxisSeparation;
for (auto& ax: secondaryXAxis) {
ax->drawAxes(painter, ibMove1, ibMove2);
- const double add1=ax->getSize1(painter).height();
- const double add2=ax->getSize2(painter).height();
+ const double add1=ax->getSize1(painter).requiredSize;
+ const double add2=ax->getSize2(painter).requiredSize;
if (add1>0) ibMove1+=add1+plotterStyle.secondaryAxisSeparation;
if (add2>0) ibMove2+=add2+plotterStyle.secondaryAxisSeparation;
}
@@ -1071,15 +1078,15 @@ void JKQTBasePlotter::drawSystemYAxis(JKQTPEnhancedPainter& painter) {
//qDebug()<<" end JKQTBasePlotter::drawSystemYAxis";
if (secondaryYAxis.size()>0) {
- double ibMove1=yAxis->getSize1(painter).width();
+ double ibMove1=yAxis->getSize1(painter).requiredSize;
if (ibMove1>0) ibMove1+=plotterStyle.secondaryAxisSeparation;
- double ibMove2=yAxis->getSize2(painter).width();
+ double ibMove2=yAxis->getSize2(painter).requiredSize;
if (ibMove2>0) ibMove1+=plotterStyle.secondaryAxisSeparation;
for (auto& ax: secondaryYAxis) {
ax->drawAxes(painter, ibMove1, ibMove2);
- const double add1=ax->getSize1(painter).width();
- const double add2=ax->getSize2(painter).width();
+ const double add1=ax->getSize1(painter).requiredSize;
+ const double add2=ax->getSize2(painter).requiredSize;
if (add1>0) ibMove1+=add1+plotterStyle.secondaryAxisSeparation;
if (add2>0) ibMove2+=add2+plotterStyle.secondaryAxisSeparation;
}
@@ -5410,12 +5417,6 @@ bool JKQTBasePlotter::textSizeKey::operator==(const JKQTBasePlotter::textSizeKey
}
-JKQTBasePlotter::textSizeData::textSizeData():
- ascent(0), descent(0), width(0), strikeoutPos(0)
-{
-
-}
-
diff --git a/lib/jkqtplotter/jkqtpbaseplotter.h b/lib/jkqtplotter/jkqtpbaseplotter.h
index 9a66785dd7..5c455b7c94 100644
--- a/lib/jkqtplotter/jkqtpbaseplotter.h
+++ b/lib/jkqtplotter/jkqtpbaseplotter.h
@@ -1428,13 +1428,6 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject {
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
/** @name Utilities: (math-markup) Text Sizing */
/**@{*/
- /** \brief internal tool class for text sizes
- * \ingroup jkqtpplottersupprt
- * \internal */
- struct JKQTPLOTTER_LIB_EXPORT textSizeData {
- explicit textSizeData();
- double ascent, descent, width, strikeoutPos;
- };
/** \brief internal tool class for text-sizess in a plot key
* \ingroup jkqtpplottersupprt
@@ -1448,14 +1441,14 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject {
bool operator==(const textSizeKey& other) const;
};
- /** \brief calculates a textSizeData for the given string \a text if it would be drawn on \a painter with font \a fm
+ /** \brief calculates a JKQTMathTextNodeSize for the given string \a text if it would be drawn on \a painter with font \a fm
* \internal
*/
- textSizeData getTextSizeDetail(const QFont &fm, const QString& text, QPainter& painter);
- /** \brief calculates a textSizeData for the given string \a text if it would be drawn on \a painter with font \a fontName
+ JKQTMathTextNodeSize getTextSizeDetail(const QFont &fm, const QString& text, QPainter& painter);
+ /** \brief calculates a JKQTMathTextNodeSize for the given string \a text if it would be drawn on \a painter with font \a fontName
* \internal
*/
- textSizeData getTextSizeDetail(const QString& fontName, double fontSize, const QString& text, QPainter &painter);
+ JKQTMathTextNodeSize getTextSizeDetail(const QString& fontName, double fontSize, const QString& text, QPainter &painter);
/** \brief calculates a text-size details for the given string \a text if it would be drawn on \a painter with font \a fontName and font size \a fontSize
* \internal
*/
diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp
index b0373fafa2..950ffc8569 100644
--- a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp
+++ b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp
@@ -1153,9 +1153,9 @@ void JKQTPCoordinateAxis::setColor(QColor c)
setTickLabelColor(c);
}
-std::pair JKQTPCoordinateAxis::getSize0(JKQTPEnhancedPainter &/*painter*/)
+JKQTPCoordinateAxis::Axis0ElementsSizeDescription JKQTPCoordinateAxis::getSize0(JKQTPEnhancedPainter &painter)
{
- return std::pair(QSizeF(0,0),QSizeF(0,0));
+ return JKQTPCoordinateAxis::Axis0ElementsSizeDescription();
}
@@ -1302,8 +1302,9 @@ JKQTPVerticalAxisBase::JKQTPVerticalAxisBase(JKQTBasePlotter* parent):
}
-std::pair JKQTPVerticalAxisBase::getSize0(JKQTPEnhancedPainter& painter) {
- if (axisStyle.drawMode0==JKQTPCADMnone) return std::pair(QSizeF(0,0),QSizeF(0,0));
+JKQTPCoordinateAxis::Axis0ElementsSizeDescription JKQTPVerticalAxisBase::getSize0(JKQTPEnhancedPainter& painter) {
+ if (axisStyle.drawMode0==JKQTPCADMnone) return Axis0ElementsSizeDescription();
+ Axis0ElementsSizeDescription res;
double ptwidth=0;
double ptwidth_r=0;
const double arrowSize=((axisStyle.drawMode0&(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))!=int(0))?(axisStyle.getArrowSize(painter, parent)/2.0):0.0;
@@ -1311,13 +1312,31 @@ std::pair JKQTPVerticalAxisBase::getSize0(JKQTPEnhancedPainter& p
if (axisStyle.drawMode0.testFlag(JKQTPCADMTicks)) { ptwidth+=axisStyle.tickOutsideLength; ptwidth_r+=axisStyle.tickInsideLength; }
if (axisStyle.drawMode0.testFlag(JKQTPCADMTickLabels)) {
ptwidth+=axisStyle.tickLabelDistance;
+ const QSizeF maxLabelSize=getMaxTickLabelSize(painter);
+ if (getTickLabelAngle()<-0.0000001)
+ res.elongateMin=maxLabelSize.height()+2;
+ else if (getTickLabelAngle()<0.0000001)
+ res.elongateMin=maxLabelSize.height()*0.6+2;
+ if (getTickLabelAngle()>0.0000001)
+ res.elongateMax=maxLabelSize.height()+2;
+ else if (getTickLabelAngle()>-0.0000001)
+ res.elongateMax=maxLabelSize.height()*0.6+2;
// find out the maximum width over all visible plot labels
- labwidth+=getMaxTickLabelSize(painter).width();
+ labwidth+=maxLabelSize.width();
}
if (axisStyle.drawMode0.testFlag(JKQTPCADMAxisLabel)) {
- ptwidth+=axisStyle.labelDistance;
- // find out size of axis label
- labwidth+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
+ const auto labSize=parent->getTextSizeDetail(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter);
+ if (axisStyle.labelPosition==JKQTPLabelMinBesides) {
+ labwidth=qMax(labwidth, labSize.width/2.0+2);
+ res.elongateMin=qMax(res.elongateMin, parent->pt2px(painter, axisStyle.labelDistance)*1.5+labSize.overallHeight);
+ } else if (axisStyle.labelPosition==JKQTPLabelMaxBesides) {
+ labwidth=qMax(labwidth, labSize.width/2.0+2);
+ res.elongateMax=qMax(res.elongateMax, parent->pt2px(painter, axisStyle.labelDistance)*1.5+labSize.overallHeight);
+ } else {
+ ptwidth+=axisStyle.labelDistance;
+ // find out size of axis label
+ labwidth+=labSize.overallHeight;
+ }
}
const double zaxispos=getZeroAxisPos();
@@ -1325,51 +1344,111 @@ std::pair JKQTPVerticalAxisBase::getSize0(JKQTPEnhancedPainter& p
const double bottom_offset=(bottom-zaxispos);
const double top=x2p(axismax);
const double top_offset=(zaxispos-top);
- const QSizeF s1(qMax(0.0,qMax(parent->pt2px(painter, ptwidth)+labwidth, arrowSize)-bottom_offset), getParentPlotWidth());
- const QSizeF s2(qMax(0.0,qMax(parent->pt2px(painter, ptwidth_r), arrowSize)-top_offset), getParentPlotWidth());
+
+ res.requiredSize=qMax(0.0,qMax(parent->pt2px(painter, ptwidth)+labwidth, arrowSize)-bottom_offset);
+ res.requiredSizeOpposite=qMax(0.0,qMax(parent->pt2px(painter, ptwidth_r), arrowSize)-top_offset);
//qDebug()<<"JKQTPVerticalAxis::getSize0(): s1="<pt2px(painter, axisStyle.labelDistance);
+ const double labelOffset0=parent->pt2px(painter, axisStyle.labelDistance);
+ double labelOffset=labelOffset0;
if (drawMode.testFlag(JKQTPCADMTicks)) labelOffset+=parent->pt2px(painter, axisStyle.tickOutsideLength);
if (drawMode.testFlag(JKQTPCADMTickLabels)) {
labelOffset+=parent->pt2px(painter, axisStyle.tickLabelDistance);
@@ -1586,28 +1678,38 @@ void JKQTPVerticalAxisBase::drawAxisLabel2(JKQTPEnhancedPainter &painter, double
getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
getParentMathText()->setFontColor(axisStyle.labelColor);
getParentMathText()->parse(axisLabel);
- const JKQTMathTextNodeSize labelsize=getParentMathText()->getSizeDetail(painter);
+
+ const auto labSize=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;
+ QRectF rect(0,0, getParentPlotWidth(), labSize.overallHeight);
+ QPointF pos0(right+labelOffset+rect.height(), bottom);
+ Qt::Alignment align=Qt::AlignBottom|Qt::AlignHCenter;
+ double rot=-90;
+ if (axisStyle.labelPosition==JKQTPLabelMaxBesides) {
+ rect=QRectF(0,0, labSize.width, labSize.overallHeight);
+ pos0=QPointF(right-labSize.width/2.0, bottom-getParentPlotWidth()-labelOffset0-labSize.overallHeight);
+ align=Qt::AlignBottom|Qt::AlignLeft;
+ rot=0;
+ } else if (axisStyle.labelPosition==JKQTPLabelMinBesides) {
+ rect=QRectF(0,0, labSize.width, labSize.overallHeight);
+ pos0=QPointF(right-labSize.width/2.0, bottom+labelOffset0);
+ align=Qt::AlignBottom|Qt::AlignRight;
+ rot=0;
+ } else if (axisStyle.labelPosition==JKQTPLabelMin) {
+ align=Qt::AlignBottom|Qt::AlignLeft;
+ } else if (axisStyle.labelPosition==JKQTPLabelMax) {
+ align=Qt::AlignBottom|Qt::AlignRight;
+ } else if (axisStyle.labelPosition==JKQTPLabelCenter) {
+ align=Qt::AlignBottom|Qt::AlignHCenter;
}
+ painter.save(); auto __finalpaintinner=JKQTPFinally([&painter]() {painter.restore();});
+ painter.translate(pos0);
+ painter.rotate(rot);
+ getParentMathText()->draw(painter, align, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+
+
+
if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
QPen p("magenta");
@@ -1885,9 +1987,8 @@ void JKQTPVerticalAxisBase::drawAxes(JKQTPEnhancedPainter& painter, int move1, i
QColor col=p.color(); col.setAlphaF(0.8f); p.setColor(col);
painter.setPen(p);
painter.setBrush(QBrush(QColor(Qt::transparent)));
- QSizeF s1, s2;
- s1=getSize1(painter);
- s2=getSize2(painter);
+ const QSizeF s1(getSize1(painter).requiredSize, getParentPlotWidth());
+ const QSizeF s2(getSize2(painter).requiredSize, getParentPlotWidth());
painter.drawRect(QRectF(QPointF(left-s1.width(), top), s1));
painter.drawRect(QRectF(QPointF(right, top), s2));
@@ -2040,22 +2141,41 @@ JKQTPHorizontalAxisBase::JKQTPHorizontalAxisBase(JKQTBasePlotter* parent):
}
-std::pair JKQTPHorizontalAxisBase::getSize0(JKQTPEnhancedPainter& painter) {
- if (axisStyle.drawMode0==JKQTPCADMnone) return std::pair(QSizeF(0,0),QSizeF(0,0));
+JKQTPCoordinateAxis::Axis0ElementsSizeDescription JKQTPHorizontalAxisBase::getSize0(JKQTPEnhancedPainter& painter) {
+ if (axisStyle.drawMode0==JKQTPCADMnone) return Axis0ElementsSizeDescription();
+ Axis0ElementsSizeDescription res;
double ptheight=0;
double ptheight_t=0;
- const double arrowSize=((axisStyle.drawMode1&(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))!=int(0))?(axisStyle.getArrowSize(painter, parent)/2.0):0.0;
+ const double arrowSize=((axisStyle.drawMode0&(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))!=int(0))?(axisStyle.getArrowSize(painter, parent)/2.0):0.0;
double labheight=0;
- if (axisStyle.drawMode1.testFlag(JKQTPCADMTicks)) { ptheight+=axisStyle.tickOutsideLength; ptheight_t+=axisStyle.tickOutsideLength; }
- if (axisStyle.drawMode1.testFlag(JKQTPCADMTickLabels)) {
+ if (axisStyle.drawMode0.testFlag(JKQTPCADMTicks)) { ptheight+=axisStyle.tickOutsideLength; ptheight_t+=axisStyle.tickOutsideLength; }
+ if (axisStyle.drawMode0.testFlag(JKQTPCADMTickLabels)) {
ptheight+=axisStyle.tickLabelDistance;
// find out the maximum width over all visible plot labels
- labheight+=getMaxTickLabelSize(painter).height();
+ const QSizeF maxLabelSize=getMaxTickLabelSize(painter);
+ if (getTickLabelAngle()<-0.0000001)
+ res.elongateMin=maxLabelSize.width()+2;
+ else if (getTickLabelAngle()<0.0000001)
+ res.elongateMin=maxLabelSize.width()*0.6+2;
+ if (getTickLabelAngle()>0.0000001)
+ res.elongateMax=maxLabelSize.width()+2;
+ else if (getTickLabelAngle()>-0.0000001)
+ res.elongateMax=maxLabelSize.width()*0.6+2;
+ labheight+=maxLabelSize.height();
}
- if (axisStyle.drawMode1.testFlag(JKQTPCADMAxisLabel)) {
- ptheight+=axisStyle.labelDistance;
- // find out size of axis label
- labheight+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
+ if (axisStyle.drawMode0.testFlag(JKQTPCADMAxisLabel)) {
+ const auto labSize=parent->getTextSizeDetail(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter);
+ if (axisStyle.labelPosition==JKQTPLabelMinBesides) {
+ labheight=qMax(labheight, labSize.getDescent());
+ res.elongateMin=qMax(res.elongateMin, parent->pt2px(painter, axisStyle.labelDistance)*1.5+labSize.width);
+ } else if (axisStyle.labelPosition==JKQTPLabelMaxBesides) {
+ labheight=qMax(labheight, labSize.getDescent());
+ res.elongateMax=qMax(res.elongateMax, parent->pt2px(painter, axisStyle.labelDistance)*1.5+labSize.width);
+ } else {
+ ptheight+=axisStyle.labelDistance;
+ // find out size of axis label
+ labheight+=labSize.overallHeight;
+ }
}
const double zaxispos=getZeroAxisPos();
@@ -2064,63 +2184,114 @@ std::pair JKQTPHorizontalAxisBase::getSize0(JKQTPEnhancedPainter&
const double right=x2p(axismax);
const double right_offset=right-zaxispos;
- return std::pair(
- QSizeF(getParentPlotWidth(), qMax(0.0,qMax(arrowSize,parent->pt2px(painter, ptheight)+labheight)-left_offset)),
- QSizeF(getParentPlotWidth(), qMax(0.0,qMax(arrowSize,parent->pt2px(painter, ptheight_t))-right_offset))
- );
+ res.requiredSize=qMax(0.0,qMax(arrowSize,parent->pt2px(painter, ptheight)+labheight)-left_offset);
+ res.requiredSizeOpposite=qMax(0.0,qMax(arrowSize,parent->pt2px(painter, ptheight_t))-right_offset);
+
+ return res;
}
-QSizeF JKQTPHorizontalAxisBase::getSize1(JKQTPEnhancedPainter& painter, double *elongateLeft, double *elongateRight) {
- if (axisStyle.drawMode1==JKQTPCADMnone) return QSize(0,0);
- double ptheight=axisStyle.axisLineOffset;
- const double arrowSize=((axisStyle.drawMode1&(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))!=int(0))?(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
- const QSizeF maxLabelSize=getMaxTickLabelSize(painter);
- if (elongateLeft) {
+JKQTPCoordinateAxis::AxisElementsSizeDescription JKQTPHorizontalAxisBase::getSize1(JKQTPEnhancedPainter& painter) {
+ AxisElementsSizeDescription res;
+ if (axisStyle.drawMode1!=JKQTPCADMnone) {
+ double ptheight=axisStyle.axisLineOffset;
+ const double arrowSize=((axisStyle.drawMode1&(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))!=int(0))?(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
+ const QSizeF maxLabelSize=getMaxTickLabelSize(painter);
if (getTickLabelAngle()<-0.0000001)
- *elongateLeft=maxLabelSize.width()+2;
+ res.elongateMin=maxLabelSize.width()+2;
else if (getTickLabelAngle()<0.0000001)
- *elongateLeft=maxLabelSize.width()*0.6+2;
- }
- if (elongateRight) {
+ res.elongateMin=maxLabelSize.width()*0.6+2;
if (getTickLabelAngle()>0.0000001)
- *elongateRight=maxLabelSize.width()+2;
+ res.elongateMax=maxLabelSize.width()+2;
else if (getTickLabelAngle()>-0.0000001)
- *elongateRight=maxLabelSize.width()*0.6+2;
+ res.elongateMax=maxLabelSize.width()*0.6+2;
+ labheight+=maxLabelSize.height();
}
- labheight+=maxLabelSize.height();
+ if (axisStyle.drawMode1.testFlag(JKQTPCADMAxisLabel)) {
+ const auto labSize=parent->getTextSizeDetail(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter);
+ if (axisStyle.labelPosition==JKQTPLabelMinBesides) {
+ labheight=qMax(labheight, labSize.getDescent());
+ res.elongateMin=qMax(res.elongateMin, parent->pt2px(painter, axisStyle.labelDistance)*1.5+labSize.width);
+ } else if (axisStyle.labelPosition==JKQTPLabelMaxBesides) {
+ labheight=qMax(labheight, labSize.getDescent());
+ res.elongateMax=qMax(res.elongateMax, parent->pt2px(painter, axisStyle.labelDistance)*1.5+labSize.width);
+ } else {
+ ptheight+=axisStyle.labelDistance;
+ // find out size of axis label
+ labheight+=labSize.overallHeight;
+ }
+ }
+ res.requiredSize=qMax(arrowSize,parent->pt2px(painter, ptheight)+labheight);
}
- if (axisStyle.drawMode1.testFlag(JKQTPCADMAxisLabel)) {
- ptheight+=axisStyle.labelDistance;
- // find out size of axis label
- labheight+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
- }
-
- return QSizeF(getParentPlotWidth(), qMax(arrowSize,parent->pt2px(painter, ptheight)+labheight)).expandedTo(getSize0(painter).first);
+ const auto size0=getSize0(painter);
+ res.elongateMax=qMax(res.elongateMax, size0.elongateMax);
+ res.elongateMin=qMax(res.elongateMin, size0.elongateMin);
+ res.requiredSize=qMax(res.requiredSize, size0.requiredSize);
+ return res;
}
-QSizeF JKQTPHorizontalAxisBase::getSize2(JKQTPEnhancedPainter& painter) {
- if (axisStyle.drawMode2==JKQTPCADMnone) return QSize(0,0);
- double ptheight=axisStyle.axisLineOffset;
- const double arrowSize=((axisStyle.drawMode2&(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))!=int(0))?(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
- labheight+=getMaxTickLabelSize(painter).height();
- }
- if (axisStyle.drawMode2.testFlag(JKQTPCADMAxisLabel)) {
- ptheight+=axisStyle.labelDistance;
- // find out size of axis label
- labheight+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
+QSizeF JKQTPHorizontalAxisBase::getQSize1(JKQTPEnhancedPainter &painter)
+{
+ return QSizeF(getParentPlotWidth(), getSize1(painter).requiredSize);
+}
+
+JKQTPCoordinateAxis::AxisElementsSizeDescription JKQTPHorizontalAxisBase::getSize2(JKQTPEnhancedPainter& painter) {
+ AxisElementsSizeDescription res;
+ if (axisStyle.drawMode2!=JKQTPCADMnone) {
+ double ptheight=axisStyle.axisLineOffset;
+ const double arrowSize=((axisStyle.drawMode2&(JKQTPCADMMinArrow|JKQTPCADMMinFilledArrow|JKQTPCADMMaxArrow|JKQTPCADMMaxFilledArrow))!=int(0))?(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
+ const QSizeF maxLabelSize=getMaxTickLabelSize(painter);
+ if (getTickLabelAngle()<-0.0000001)
+ res.elongateMin=maxLabelSize.width()+2;
+ else if (getTickLabelAngle()<0.0000001)
+ res.elongateMin=maxLabelSize.width()*0.6+2;
+ if (getTickLabelAngle()>0.0000001)
+ res.elongateMax=maxLabelSize.width()+2;
+ else if (getTickLabelAngle()>-0.0000001)
+ res.elongateMax=maxLabelSize.width()*0.6+2;
+ labheight+=maxLabelSize.height();
+ }
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMAxisLabel)) {
+ const auto labSize=parent->getTextSizeDetail(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter);
+ if (axisStyle.labelPosition==JKQTPLabelMinBesides) {
+ labheight=qMax(labheight, labSize.getDescent());
+ res.elongateMin=qMax(res.elongateMin, parent->pt2px(painter, axisStyle.labelDistance)*1.5+labSize.width);
+ } else if (axisStyle.labelPosition==JKQTPLabelMaxBesides) {
+ labheight=qMax(labheight, labSize.getDescent());
+ res.elongateMax=qMax(res.elongateMax, parent->pt2px(painter, axisStyle.labelDistance)*1.5+labSize.width);
+ } else {
+ ptheight+=axisStyle.labelDistance;
+ // find out size of axis label
+ labheight+=labSize.overallHeight;
+ }
+ }
+ if (axisStyle.drawMode2.testFlag(JKQTPCADMAxisLabel)) {
+ ptheight+=axisStyle.labelDistance;
+ // find out size of axis label
+ labheight+=parent->getTextSizeSize(getParent()->getCurrentPlotterStyle().defaultFontName, axisStyle.labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height();
+ }
+ res.requiredSize=qMax(arrowSize,parent->pt2px(painter, ptheight)+labheight);
}
- return QSizeF(getParentPlotWidth(), qMax(arrowSize,parent->pt2px(painter, ptheight)+labheight)).expandedTo(getSize0(painter).second);
+ const auto size0=getSize0(painter);
+ res.elongateMax=qMax(res.elongateMax, size0.elongateMax);
+ res.elongateMin=qMax(res.elongateMin, size0.elongateMin);
+ res.requiredSize=qMax(res.requiredSize, size0.requiredSizeOpposite);
+ return res;
+}
+
+QSizeF JKQTPHorizontalAxisBase::getQSize2(JKQTPEnhancedPainter &painter)
+{
+ return QSizeF(getParentPlotWidth(), getSize2(painter).requiredSize);
}
@@ -2247,7 +2418,8 @@ void JKQTPHorizontalAxisBase::drawTickLabel2(JKQTPEnhancedPainter &painter, doub
void JKQTPHorizontalAxisBase::drawAxisLabel1(JKQTPEnhancedPainter &painter, double left, double bottom, QSizeF labelMax, JKQTPCADrawMode drawMode) {
- double labelOffset=parent->pt2px(painter, axisStyle.labelDistance);
+ const double labelOffset0=parent->pt2px(painter, axisStyle.labelDistance);
+ double labelOffset=labelOffset0;
if (drawMode.testFlag(JKQTPCADMTicks)) labelOffset+=parent->pt2px(painter, axisStyle.tickOutsideLength);
if (drawMode.testFlag(JKQTPCADMTickLabels)) {
labelOffset+=parent->pt2px(painter, axisStyle.tickLabelDistance);
@@ -2259,27 +2431,32 @@ void JKQTPHorizontalAxisBase::drawAxisLabel1(JKQTPEnhancedPainter &painter, doub
getParentMathText()->setFontSpecial(getParent()->getCurrentPlotterStyle().defaultFontName);
getParentMathText()->setFontColor(axisStyle.labelColor);
getParentMathText()->parse(axisLabel);
- double width, ascent, descent, strikeoutPos;
- getParentMathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos);
+
+ const auto labSize=getParentMathText()->getSizeDetail(painter);
- 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;
+ QRectF rect(0,0, getParentPlotWidth(), labSize.overallHeight);
+ QPointF pos0(left, bottom+labelOffset);
+ Qt::Alignment align=Qt::AlignBottom|Qt::AlignHCenter;
+ if (axisStyle.labelPosition==JKQTPLabelMaxBesides) {
+ rect=QRectF(0,0, labSize.width, labSize.overallHeight);
+ pos0=QPointF(left+getParentPlotWidth()+labelOffset0, bottom-labSize.baselineHeight);
+ align=Qt::AlignBottom|Qt::AlignLeft;
+ } else if (axisStyle.labelPosition==JKQTPLabelMinBesides) {
+ rect=QRectF(0,0, labSize.width, labSize.overallHeight);
+ pos0=QPointF(left-labelOffset0-labSize.width, bottom-labSize.baselineHeight);
+ align=Qt::AlignBottom|Qt::AlignRight;
+ } else if (axisStyle.labelPosition==JKQTPLabelMin) {
+ align=Qt::AlignBottom|Qt::AlignLeft;
+ } else if (axisStyle.labelPosition==JKQTPLabelMax) {
+ align=Qt::AlignBottom|Qt::AlignRight;
+ } else if (axisStyle.labelPosition==JKQTPLabelCenter) {
+ align=Qt::AlignBottom|Qt::AlignHCenter;
}
+ painter.save(); auto __finalpaintinner=JKQTPFinally([&painter]() {painter.restore();});
+ painter.translate(pos0);
+ getParentMathText()->draw(painter, align, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+
if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
QPen p("magenta");
@@ -2293,7 +2470,8 @@ void JKQTPHorizontalAxisBase::drawAxisLabel1(JKQTPEnhancedPainter &painter, doub
}
void JKQTPHorizontalAxisBase::drawAxisLabel2(JKQTPEnhancedPainter &painter, double left, double top, QSizeF labelMax, JKQTPCADrawMode drawMode) {
- double labelOffset=parent->pt2px(painter, axisStyle.labelDistance);
+ const double labelOffset0=parent->pt2px(painter, axisStyle.labelDistance);
+ double labelOffset=labelOffset0;
if (drawMode.testFlag(JKQTPCADMTicks)) labelOffset+=parent->pt2px(painter, axisStyle.tickOutsideLength);
if (drawMode.testFlag(JKQTPCADMTickLabels)) {
labelOffset+=parent->pt2px(painter, axisStyle.tickLabelDistance);
@@ -2306,24 +2484,31 @@ void JKQTPHorizontalAxisBase::drawAxisLabel2(JKQTPEnhancedPainter &painter, doub
getParentMathText()->setFontColor(axisStyle.labelColor);
getParentMathText()->parse(axisLabel);
+ const auto labSize=getParentMathText()->getSizeDetail(painter);
- 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;
+
+ QRectF rect(0,0, getParentPlotWidth(), labSize.overallHeight);
+ QPointF pos0(left, top-labelOffset-rect.height());
+ Qt::Alignment align=Qt::AlignBottom|Qt::AlignHCenter;
+ if (axisStyle.labelPosition==JKQTPLabelMaxBesides) {
+ rect=QRectF(0,0, labSize.width, labSize.overallHeight);
+ pos0=QPointF(left+getParentPlotWidth()+labelOffset0, top-labSize.baselineHeight);
+ align=Qt::AlignBottom|Qt::AlignLeft;
+ } else if (axisStyle.labelPosition==JKQTPLabelMinBesides) {
+ rect=QRectF(0,0, labSize.width, labSize.overallHeight);
+ pos0=QPointF(left-labelOffset0-labSize.width, top-labSize.baselineHeight);
+ align=Qt::AlignBottom|Qt::AlignRight;
+ } else if (axisStyle.labelPosition==JKQTPLabelMin) {
+ align=Qt::AlignBottom|Qt::AlignLeft;
+ } else if (axisStyle.labelPosition==JKQTPLabelMax) {
+ align=Qt::AlignBottom|Qt::AlignRight;
+ } else if (axisStyle.labelPosition==JKQTPLabelCenter) {
+ align=Qt::AlignBottom|Qt::AlignHCenter;
}
+ painter.save(); auto __finalpaintinner=JKQTPFinally([&painter]() {painter.restore();});
+ painter.translate(pos0);
+ getParentMathText()->draw(painter, align, rect, parent->getCurrentPlotterStyle().debugShowTextBoxes);
+
if (getParent()->getCurrentPlotterStyle().debugShowRegionBoxes) {
painter.save(); auto __finalpaintinnerif=JKQTPFinally([&painter]() {painter.restore();});
QPen p("magenta");
@@ -2594,9 +2779,8 @@ void JKQTPHorizontalAxisBase::drawAxes(JKQTPEnhancedPainter& painter, int move1,
p.setWidthF(getParent()->getCurrentPlotterStyle().debugRegionLineWidth);
painter.setPen(p);
painter.setBrush(QBrush(QColor(Qt::transparent)));
- QSizeF s1,s2;
- s1=getSize1(painter);
- s2=getSize2(painter);
+ const QSizeF s1(getParentPlotWidth(), getSize1(painter).requiredSize);
+ const QSizeF s2(getParentPlotWidth(), getSize2(painter).requiredSize);
painter.drawRect(QRectF(QPointF(left, bottom), s1));
painter.drawRect(QRectF(QPointF(left, top-s2.height()), s2));
diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.h b/lib/jkqtplotter/jkqtpcoordinateaxes.h
index 3407651603..250a6a92fe 100644
--- a/lib/jkqtplotter/jkqtpcoordinateaxes.h
+++ b/lib/jkqtplotter/jkqtpcoordinateaxes.h
@@ -245,11 +245,34 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
/** \brief add a new tick label to the axis */
void addAxisTickLabels(const double* x, const QString* label, int items);
- /** \brief returns the size of the left/bottom axis in pixels */
- virtual QSizeF getSize1(JKQTPEnhancedPainter& painter, double* elongateMin=nullptr, double* elongateMax=nullptr)=0;
- /** \brief returns the size of the right/top axis in pixels */
- virtual QSizeF getSize2(JKQTPEnhancedPainter& painter)=0;
+ /** \brief return value type for getSize1() and getSize2() */
+ struct JKQTPLOTTER_LIB_EXPORT AxisElementsSizeDescription {
+ inline AxisElementsSizeDescription(double _requiredSize=0.0, double _elongateMin=0.0, double _elongateMax=0.0): requiredSize(_requiredSize), elongateMin(_elongateMin), elongateMax(_elongateMax) {}
+
+ /** \brief required space, starting at the axis line, in outward direction [pixels] */
+ double requiredSize;
+ /** \brief extra space on the min (horizontal: left, vertical: bottom) side BESIDE the axis, e.g. when labels elongate to the left/right or top/bottom of the plot rectangle [pixels] */
+ double elongateMin;
+ /** \brief extra space on the max (horizontal: right, vertical: top) side BESIDE the axis, e.g. when labels elongate to the left/right or top/bottom of the plot rectangle [pixels] */
+ double elongateMax;
+ };
+
+ /** \brief returns the sizerequirement of the left/bottom axis in pixels
+ *
+ * \param painter a JKQTPEnhancedPainter to use for determining sizes (the same that would be used for drawing!)
+ *
+ * \returns size of the additional space outside the plot rectangle, required for the axis.
+ */
+ virtual AxisElementsSizeDescription getSize1(JKQTPEnhancedPainter& painter)=0;
+
+ /** \brief returns the size of the right/top axis in pixels
+ *
+ * \param painter a JKQTPEnhancedPainter to use for determining sizes (the same that would be used for drawing!)
+ *
+ * \returns size of the additional space outside the plot rectangle, required for the axis.
+ */
+ virtual AxisElementsSizeDescription getSize2(JKQTPEnhancedPainter& painter)=0;
/** \brief draw the axes
*
@@ -672,8 +695,17 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
void setColor(QColor c) ;
protected:
+ struct JKQTPLOTTER_LIB_EXPORT Axis0ElementsSizeDescription: public AxisElementsSizeDescription {
+ inline Axis0ElementsSizeDescription(double _requiredSize=0.0, double _requiredSizeOpposite=0.0, double _elongateMin=0.0, double _elongateMax=0.0): AxisElementsSizeDescription(_requiredSize, _elongateMin, _elongateMax), requiredSizeOpposite(_requiredSizeOpposite) {}
+ /** \brief additional size, required for the axis, in the opposite direction as AxisElementsSizeDescription::requiredSize */
+ double requiredSizeOpposite;
+ inline double maxRequiredSize() const {
+ return qMax(requiredSize,requiredSizeOpposite);
+ }
+ };
+
/** \brief returns the size of the zero axis in pixels, the first part of the return-value is the lhs size and the second part the rhs size */
- virtual std::pair getSize0(JKQTPEnhancedPainter& painter) ;
+ virtual Axis0ElementsSizeDescription getSize0(JKQTPEnhancedPainter& painter) ;
/** \brief indicates whether one of the parameters has changed sinse the last recalculation of tickSpacing ... */
bool paramsChanged;
/** \brief can be used to switch off calcPlotScaling() temporarily, while modifying some properties
@@ -900,10 +932,12 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPVerticalAxisBase: public JKQTPCoordinateAxis {
JKQTPVerticalAxisBase(JKQTBasePlotter* parent);
/** \brief returns the size of the left axis in pixels */
- virtual QSizeF getSize1(JKQTPEnhancedPainter& painter, double *elongateBottom=nullptr, double* elongateTop=nullptr) override;
+ virtual AxisElementsSizeDescription getSize1(JKQTPEnhancedPainter& painter) override;
+ QSizeF getQSize1(JKQTPEnhancedPainter& painter);
/** \brief returns the size of the right axis in pixels */
- virtual QSizeF getSize2(JKQTPEnhancedPainter& painter) override;
+ virtual AxisElementsSizeDescription getSize2(JKQTPEnhancedPainter& painter) override;
+ QSizeF getQSize2(JKQTPEnhancedPainter& painter);
/** copydoc JKQTPCoordinateAxis::drawAxes() */
virtual void drawAxes(JKQTPEnhancedPainter& painter, int move1=0, int move2=0) override;
@@ -914,7 +948,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPVerticalAxisBase: public JKQTPCoordinateAxis {
protected:
/** copydoc JKQTPCoordinateAxis::getSize0() */
- virtual std::pair getSize0(JKQTPEnhancedPainter& painter) override;
+ virtual Axis0ElementsSizeDescription getSize0(JKQTPEnhancedPainter& painter) override;
/** \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
@@ -1081,10 +1115,12 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPHorizontalAxisBase: public JKQTPCoordinateAxis
JKQTPHorizontalAxisBase(JKQTBasePlotter* parent);
/** \brief returns the size of the bottom axis in pixels */
- virtual QSizeF getSize1(JKQTPEnhancedPainter& painter, double* elongateLeft=nullptr, double* elongateRight=nullptr) override;
+ virtual AxisElementsSizeDescription getSize1(JKQTPEnhancedPainter& painter) override;
+ QSizeF getQSize1(JKQTPEnhancedPainter& painter);
/** \brief returns the size of the top axis in pixels */
- virtual QSizeF getSize2(JKQTPEnhancedPainter& painter) override;
+ virtual AxisElementsSizeDescription getSize2(JKQTPEnhancedPainter& painter) override;
+ QSizeF getQSize2(JKQTPEnhancedPainter& painter);
/** copydoc JKQTPCoordinateAxis::drawAxes() */
virtual void drawAxes(JKQTPEnhancedPainter& painter, int move1=0, int move2=0) override;
@@ -1095,7 +1131,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPHorizontalAxisBase: public JKQTPCoordinateAxis
protected:
/** copydoc JKQTPCoordinateAxis::getSize0() */
- virtual std::pair getSize0(JKQTPEnhancedPainter& painter) override;
+ virtual Axis0ElementsSizeDescription getSize0(JKQTPEnhancedPainter& painter) override;
/** \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
diff --git a/lib/jkqtplotter/jkqtpimagetools.cpp b/lib/jkqtplotter/jkqtpimagetools.cpp
index 3ace19d098..d5b794ccd6 100644
--- a/lib/jkqtplotter/jkqtpimagetools.cpp
+++ b/lib/jkqtplotter/jkqtpimagetools.cpp
@@ -81,19 +81,19 @@ void JKQTPColorPaletteStyleAndToolsMixin::cbGetOutsideSize(JKQTPEnhancedPainter&
rightSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset);
colorBarRightAxis->setRange(internalDataMin, internalDataMax);
colorBarRightAxis->setAxisWidth(colorBarRelativeHeight*cbParent->getPlotHeight());
- QSizeF s1=colorBarRightAxis->getSize2(painter);
- QSizeF s2=colorBarRightAxis->getSize1(painter);
- QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter);
- rightSpace+=qMax(static_cast(s1.width()+s2.width()), static_cast(names.width()));
+ const auto s1=colorBarRightAxis->getSize2(painter);
+ const auto s2=colorBarRightAxis->getSize1(painter);
+ const QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter);
+ rightSpace+=qMax(static_cast(s1.requiredSize+s2.requiredSize), static_cast(names.width()));
}
if (colorBarTopVisible) {
//topSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset);
colorBarTopAxis->setRange(internalDataMin, internalDataMax);
colorBarTopAxis->setAxisWidth(colorBarRelativeHeight*cbParent->getPlotWidth());
- QSizeF s1=colorBarTopAxis->getSize2(painter);
- QSizeF s2=colorBarTopAxis->getSize1(painter);
- QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter);
- topSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset)+qMax(static_cast(s1.height()+s2.height()), static_cast(names.height()));
+ const auto s1=colorBarTopAxis->getSize2(painter);
+ const auto s2=colorBarTopAxis->getSize1(painter);
+ const QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter);
+ topSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset)+qMax(static_cast(s1.requiredSize+s2.requiredSize), static_cast(names.height()));
}
}
}
@@ -562,10 +562,10 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbGetOutsideSize(JKQTPEnha
colorBarRightAxis->setAxisWidth(colorBarRelativeHeight*cbParent->getPlotHeight());
modifierColorBarRightAxis->setRange(internalModifierMin, internalModifierMax);
modifierColorBarRightAxis->setAxisWidth(cbParent->pt2px(painter, colorBarModifiedWidth));
- QSizeF s1=colorBarRightAxis->getSize2(painter);
- QSizeF s2=colorBarRightAxis->getSize1(painter);
- QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter);
- rightSpace+=qMax(static_cast(s1.width()+s2.width()), static_cast(names.width()));
+ const auto s1=colorBarRightAxis->getSize2(painter);
+ const auto s2=colorBarRightAxis->getSize1(painter);
+ const QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter);
+ rightSpace+=qMax(static_cast(s1.requiredSize+s2.requiredSize), static_cast(names.width()));
if (modifierMode!=JKQTPMathImageModifierMode::ModifyNone) {
rightSpace=rightSpace+static_cast(2.0*cbParent->pt2px(painter, colorBarModifiedWidth-colorBarWidth));
}
@@ -576,10 +576,10 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbGetOutsideSize(JKQTPEnha
colorBarTopAxis->setAxisWidth(colorBarRelativeHeight*cbParent->getPlotWidth());
modifierColorBarTopAxis->setRange(internalModifierMin, internalModifierMax);
modifierColorBarTopAxis->setAxisWidth(cbParent->pt2px(painter, colorBarModifiedWidth));
- QSizeF s1=colorBarTopAxis->getSize2(painter);
- QSizeF s2=colorBarTopAxis->getSize1(painter);
- QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter);
- topSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset)+qMax(static_cast(s1.height()+s2.height()), static_cast(names.height()));
+ const auto s1=colorBarTopAxis->getSize2(painter);
+ const auto s2=colorBarTopAxis->getSize1(painter);
+ const QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter);
+ topSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset)+qMax(static_cast(s1.requiredSize+s2.requiredSize), static_cast(names.height()));
if (modifierMode!=JKQTPMathImageModifierMode::ModifyNone) {
topSpace=topSpace+static_cast(2.0*cbParent->pt2px(painter, colorBarModifiedWidth-colorBarWidth));
}
diff --git a/lib/jkqtplotter/jkqtptools.cpp b/lib/jkqtplotter/jkqtptools.cpp
index cac444b71f..39ce337c8b 100644
--- a/lib/jkqtplotter/jkqtptools.cpp
+++ b/lib/jkqtplotter/jkqtptools.cpp
@@ -140,9 +140,11 @@ JKQTPCALabelType String2JKQTPCALabelType(const QString& pos) {
QString JKQTPLabelPosition2String(JKQTPLabelPosition pos) {
switch(pos) {
- case JKQTPLabelMin: return "min";
- case JKQTPLabelMax: return "max";
- case JKQTPLabelCenter: return "center";
+ case JKQTPLabelMin: return "min";
+ case JKQTPLabelMax: return "max";
+ case JKQTPLabelMinBesides: return "minBesides";
+ case JKQTPLabelMaxBesides: return "maxBesides";
+ case JKQTPLabelCenter: return "center";
}
return "";
}
@@ -151,6 +153,8 @@ JKQTPLabelPosition String2JKQTPLabelPosition(const QString& pos) {
QString s=pos.trimmed().toLower();
if (s=="min") return JKQTPLabelMin;
if (s=="max") return JKQTPLabelMax;
+ if (s=="minbesides") return JKQTPLabelMinBesides;
+ if (s=="maxbesides") return JKQTPLabelMaxBesides;
if (s=="center") return JKQTPLabelCenter;
return JKQTPLabelCenter;
}
diff --git a/lib/jkqtplotter/jkqtptools.h b/lib/jkqtplotter/jkqtptools.h
index d0dd6061bb..d33eb398f6 100644
--- a/lib/jkqtplotter/jkqtptools.h
+++ b/lib/jkqtplotter/jkqtptools.h
@@ -504,10 +504,22 @@ JKQTPLOTTER_LIB_EXPORT JKQTPCALabelType String2JKQTPCALabelType(const QString& p
* \ingroup jkqtpplottersupprt
*/
enum JKQTPLabelPosition {
- JKQTPLabelMin=0, /*!< \brief the axis label is near the min value of the axis (left/bottom) */
- JKQTPLabelMax, /*!< \brief the axis label is near the max value of the axis (right/top) */
- JKQTPLabelCenter, /*!< \brief the label is at the center of the axis */
- JKQTPLabelPositionMax=JKQTPLabelCenter
+ JKQTPLabelMin=0, /*!< \brief the axis label is near the min value of the axis (left/bottom)
+ \image html labelstyles/JKQTPLabelMin.png
+ \image html labelstyles/JKQTPLabelMin_zeroaxis.png */
+ JKQTPLabelMax, /*!< \brief the axis label is near the max value of the axis (right/top)
+ \image html labelstyles/JKQTPLabelMax.png
+ \image html labelstyles/JKQTPLabelMax_zeroaxis.png */
+ JKQTPLabelCenter, /*!< \brief the label is at the center of the axis
+ \image html labelstyles/JKQTPLabelCenter.png
+ \image html labelstyles/JKQTPLabelCenter_zeroaxis.png */
+ JKQTPLabelMinBesides, /*!< \brief the axis label is near the min value of the axis (left/bottom), but besides the axis tip
+ \image html labelstyles/JKQTPLabelMinBesides.png
+ \image html labelstyles/JKQTPLabelMinBesides_zeroaxis.png */
+ JKQTPLabelMaxBesides, /*!< \brief the axis label is near the max value of the axis (right/top), but besides the axis tip
+ \image html labelstyles/JKQTPLabelMaxBesides.png
+ \image html labelstyles/JKQTPLabelMaxBesides_zeroaxis.png */
+ JKQTPLabelPositionMax=JKQTPLabelMaxBesides
};
diff --git a/screenshots/advancedlineandfillstyling.png b/screenshots/advancedlineandfillstyling.png
index beeffade59..9cb776ca0e 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 459273c838..6c902944de 100644
Binary files a/screenshots/advancedlineandfillstyling_small.png and b/screenshots/advancedlineandfillstyling_small.png differ
diff --git a/screenshots/barchart_customdrawfunctor.png b/screenshots/barchart_customdrawfunctor.png
index 5c91e7f291..2c53ae1e24 100644
Binary files a/screenshots/barchart_customdrawfunctor.png and b/screenshots/barchart_customdrawfunctor.png differ
diff --git a/screenshots/barchart_customdrawfunctor_hor.png b/screenshots/barchart_customdrawfunctor_hor.png
index cb86e0b568..619d1d2c87 100644
Binary files a/screenshots/barchart_customdrawfunctor_hor.png and b/screenshots/barchart_customdrawfunctor_hor.png differ
diff --git a/screenshots/barchart_customdrawfunctor_hor_small.png b/screenshots/barchart_customdrawfunctor_hor_small.png
index 212d3db385..ea65f9698d 100644
Binary files a/screenshots/barchart_customdrawfunctor_hor_small.png and b/screenshots/barchart_customdrawfunctor_hor_small.png differ
diff --git a/screenshots/barchart_customdrawfunctor_small.png b/screenshots/barchart_customdrawfunctor_small.png
index a976c1bcf9..218b52fecf 100644
Binary files a/screenshots/barchart_customdrawfunctor_small.png and b/screenshots/barchart_customdrawfunctor_small.png differ
diff --git a/screenshots/barchart_errorbars.png b/screenshots/barchart_errorbars.png
index ed7cee0aa3..eaa485a0a7 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 d153930cae..3bbb74b4d8 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 20983f5936..465df36c39 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 008e8426f6..ac187a5200 100644
Binary files a/screenshots/barchart_errorbars_small.png and b/screenshots/barchart_errorbars_small.png differ
diff --git a/screenshots/barchart_functorfill.png b/screenshots/barchart_functorfill.png
index a1a3f988a0..dbc72c405c 100644
Binary files a/screenshots/barchart_functorfill.png and b/screenshots/barchart_functorfill.png differ
diff --git a/screenshots/barchart_functorfill_hor.png b/screenshots/barchart_functorfill_hor.png
index 201430dc8b..e5862a36ec 100644
Binary files a/screenshots/barchart_functorfill_hor.png and b/screenshots/barchart_functorfill_hor.png differ
diff --git a/screenshots/barchart_functorfill_hor_small.png b/screenshots/barchart_functorfill_hor_small.png
index 43df0a41a0..f837030adc 100644
Binary files a/screenshots/barchart_functorfill_hor_small.png and b/screenshots/barchart_functorfill_hor_small.png differ
diff --git a/screenshots/barchart_functorfill_small.png b/screenshots/barchart_functorfill_small.png
index d7c4e5dc79..fc6fd108ba 100644
Binary files a/screenshots/barchart_functorfill_small.png and b/screenshots/barchart_functorfill_small.png differ
diff --git a/screenshots/barchart_twocolor.png b/screenshots/barchart_twocolor.png
index bb4f6be86f..b01432b4c5 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 8a4a82a681..3afb6512bd 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 44a903029f..bfb4b41f0c 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 91b3a64279..e3f2a7c7de 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 44b61cd261..5e93053b13 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 a1c043dce6..424ed4c9a2 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 b956df27bb..ee675a992d 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 ee74e281e2..fec6c2f5f9 100644
Binary files a/screenshots/contourplot_small.png and b/screenshots/contourplot_small.png differ
diff --git a/screenshots/datastore.png b/screenshots/datastore.png
index 92c2019516..a420befbb1 100644
Binary files a/screenshots/datastore.png and b/screenshots/datastore.png differ
diff --git a/screenshots/datastore_calccolumns.png b/screenshots/datastore_calccolumns.png
index 7b21c9225e..9808ea67ec 100644
Binary files a/screenshots/datastore_calccolumns.png and b/screenshots/datastore_calccolumns.png differ
diff --git a/screenshots/datastore_image.png b/screenshots/datastore_image.png
index dc22ff2e7c..127d3ab201 100644
Binary files a/screenshots/datastore_image.png and b/screenshots/datastore_image.png differ
diff --git a/screenshots/datastore_image_sorted.png b/screenshots/datastore_image_sorted.png
index dc22ff2e7c..127d3ab201 100644
Binary files a/screenshots/datastore_image_sorted.png and b/screenshots/datastore_image_sorted.png differ
diff --git a/screenshots/datastore_iterators.png b/screenshots/datastore_iterators.png
index 2248af867a..97aac37eb3 100644
Binary files a/screenshots/datastore_iterators.png and b/screenshots/datastore_iterators.png differ
diff --git a/screenshots/datastore_iterators_cosine.png b/screenshots/datastore_iterators_cosine.png
index 2248af867a..97aac37eb3 100644
Binary files a/screenshots/datastore_iterators_cosine.png and b/screenshots/datastore_iterators_cosine.png differ
diff --git a/screenshots/datastore_iterators_cosine_ysorted.png b/screenshots/datastore_iterators_cosine_ysorted.png
index 10f3d2f8a2..3c2a8aa7f8 100644
Binary files a/screenshots/datastore_iterators_cosine_ysorted.png and b/screenshots/datastore_iterators_cosine_ysorted.png differ
diff --git a/screenshots/datastore_iterators_small.png b/screenshots/datastore_iterators_small.png
index 66633eb3a4..8db3acc0c3 100644
Binary files a/screenshots/datastore_iterators_small.png and b/screenshots/datastore_iterators_small.png differ
diff --git a/screenshots/datastore_linkedcarray.png b/screenshots/datastore_linkedcarray.png
index 027deef084..e616955bbb 100644
Binary files a/screenshots/datastore_linkedcarray.png and b/screenshots/datastore_linkedcarray.png differ
diff --git a/screenshots/datastore_map.png b/screenshots/datastore_map.png
index 38d0dcf79e..69e80ac9e1 100644
Binary files a/screenshots/datastore_map.png and b/screenshots/datastore_map.png differ
diff --git a/screenshots/datastore_sine.png b/screenshots/datastore_sine.png
index 4187ab62a7..9f97eded54 100644
Binary files a/screenshots/datastore_sine.png and b/screenshots/datastore_sine.png differ
diff --git a/screenshots/datastore_sineimg.png b/screenshots/datastore_sineimg.png
index 352af55fb6..f8f006297e 100644
Binary files a/screenshots/datastore_sineimg.png and b/screenshots/datastore_sineimg.png differ
diff --git a/screenshots/datastore_small.png b/screenshots/datastore_small.png
index 7f62ee13d6..b6f6b7cc94 100644
Binary files a/screenshots/datastore_small.png and b/screenshots/datastore_small.png differ
diff --git a/screenshots/datastore_statistics_2d.png b/screenshots/datastore_statistics_2d.png
index 7f752edb9a..51895e9059 100644
Binary files a/screenshots/datastore_statistics_2d.png and b/screenshots/datastore_statistics_2d.png differ
diff --git a/screenshots/datastore_statistics_2d_small.png b/screenshots/datastore_statistics_2d_small.png
index fce2239a2f..0308d740b3 100644
Binary files a/screenshots/datastore_statistics_2d_small.png and b/screenshots/datastore_statistics_2d_small.png differ
diff --git a/screenshots/errorbarstyles.png b/screenshots/errorbarstyles.png
index 84a9e77c28..15c6a4297c 100644
Binary files a/screenshots/errorbarstyles.png and b/screenshots/errorbarstyles.png differ
diff --git a/screenshots/errorbarstyles_impulses.png b/screenshots/errorbarstyles_impulses.png
index bba6ab44e2..f8d38e2d02 100644
Binary files a/screenshots/errorbarstyles_impulses.png and b/screenshots/errorbarstyles_impulses.png differ
diff --git a/screenshots/errorbarstyles_impulses_horizontal.png b/screenshots/errorbarstyles_impulses_horizontal.png
index 2ec8844707..b42f582ab2 100644
Binary files a/screenshots/errorbarstyles_impulses_horizontal.png and b/screenshots/errorbarstyles_impulses_horizontal.png differ
diff --git a/screenshots/errorbarstyles_impulses_horizontal_small.png b/screenshots/errorbarstyles_impulses_horizontal_small.png
index cb179797e5..0e7428e254 100644
Binary files a/screenshots/errorbarstyles_impulses_horizontal_small.png and b/screenshots/errorbarstyles_impulses_horizontal_small.png differ
diff --git a/screenshots/errorbarstyles_impulses_small.png b/screenshots/errorbarstyles_impulses_small.png
index f4cde09a5a..8b45552579 100644
Binary files a/screenshots/errorbarstyles_impulses_small.png and b/screenshots/errorbarstyles_impulses_small.png differ
diff --git a/screenshots/errorbarstyles_small.png b/screenshots/errorbarstyles_small.png
index 7a11d3a5df..f176216a66 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 d9f6820655..3a75950472 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 52582498f7..c4f7ed9ea8 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 af6bc31f4b..f23f85bc4f 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 cd092cf367..511d7e11a7 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 964eafe607..82b33f5f28 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 6307496bd5..5007cf92e3 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 c029873e63..9a44e7da47 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 8aa42cb2c3..636db3f6a7 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 c17b618aa5..49851ab78e 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 1fb70576d9..6ddd270fd7 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 14b55bf8b6..a9f03ca036 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 ca2297b386..c0a5bbdbe8 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 0e588d987b..937a5a4656 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 4f54fac16f..1cff7d22e7 100644
Binary files a/screenshots/functionplot_small.png and b/screenshots/functionplot_small.png differ
diff --git a/screenshots/geo_coordinateaxis0.png b/screenshots/geo_coordinateaxis0.png
index f0c90855da..4d0b2fdbf4 100644
Binary files a/screenshots/geo_coordinateaxis0.png and b/screenshots/geo_coordinateaxis0.png differ
diff --git a/screenshots/geo_coordinateaxis0_small.png b/screenshots/geo_coordinateaxis0_small.png
index 0665198c58..af99536d34 100644
Binary files a/screenshots/geo_coordinateaxis0_small.png and b/screenshots/geo_coordinateaxis0_small.png differ
diff --git a/screenshots/geometric.png b/screenshots/geometric.png
index e24d71987b..c1a893e1b3 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 da1e3a09a8..871a181281 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 b12112cb66..52e6d0c91f 100644
Binary files a/screenshots/imageplot.png and b/screenshots/imageplot.png differ
diff --git a/screenshots/imageplot__scale02.png b/screenshots/imageplot__scale02.png
index 4e0a4f2c06..899ed96506 100644
Binary files a/screenshots/imageplot__scale02.png and b/screenshots/imageplot__scale02.png differ
diff --git a/screenshots/imageplot__smallscalecolor.png b/screenshots/imageplot__smallscalecolor.png
index 8f276d7573..399fdefcae 100644
Binary files a/screenshots/imageplot__smallscalecolor.png and b/screenshots/imageplot__smallscalecolor.png differ
diff --git a/screenshots/imageplot__smallscalelimitcolor.png b/screenshots/imageplot__smallscalelimitcolor.png
index 65967e7e8a..fb3d990610 100644
Binary files a/screenshots/imageplot__smallscalelimitcolor.png and b/screenshots/imageplot__smallscalelimitcolor.png differ
diff --git a/screenshots/imageplot__smallscaletransparent.png b/screenshots/imageplot__smallscaletransparent.png
index 21d327eef6..392ebec771 100644
Binary files a/screenshots/imageplot__smallscaletransparent.png and b/screenshots/imageplot__smallscaletransparent.png differ
diff --git a/screenshots/imageplot_modifier.png b/screenshots/imageplot_modifier.png
index 54996173d1..2b3a1341b0 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 37b785491a..1021bd050e 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 395c373826..9d38a20a19 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 cf24d5e15e..12a350d132 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 e5f6c0bbf0..35fe87af20 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 596a36542e..a040a09f06 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 3b37f458e4..94fcd6b82d 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 914657df10..95724883a8 100644
Binary files a/screenshots/impulsesplot.png and b/screenshots/impulsesplot.png differ
diff --git a/screenshots/impulsesplot_horizontal.png b/screenshots/impulsesplot_horizontal.png
index 7c29b89a90..4348009b71 100644
Binary files a/screenshots/impulsesplot_horizontal.png and b/screenshots/impulsesplot_horizontal.png differ
diff --git a/screenshots/impulsesplot_horizontal_small.png b/screenshots/impulsesplot_horizontal_small.png
index da07b5b94a..64f9e1a5d8 100644
Binary files a/screenshots/impulsesplot_horizontal_small.png and b/screenshots/impulsesplot_horizontal_small.png differ
diff --git a/screenshots/impulsesplot_small.png b/screenshots/impulsesplot_small.png
index 0a42e224a2..20579a3e7f 100644
Binary files a/screenshots/impulsesplot_small.png and b/screenshots/impulsesplot_small.png differ
diff --git a/screenshots/impulsesplot_symbols.png b/screenshots/impulsesplot_symbols.png
index 13ffc1fa00..5edb140c5b 100644
Binary files a/screenshots/impulsesplot_symbols.png and b/screenshots/impulsesplot_symbols.png differ
diff --git a/screenshots/impulsesplot_symbols_small.png b/screenshots/impulsesplot_symbols_small.png
index b559069357..2cb060b539 100644
Binary files a/screenshots/impulsesplot_symbols_small.png and b/screenshots/impulsesplot_symbols_small.png differ
diff --git a/screenshots/logaxes.png b/screenshots/logaxes.png
index 3bef310303..77ec344780 100644
Binary files a/screenshots/logaxes.png and b/screenshots/logaxes.png differ
diff --git a/screenshots/logaxes_nolog.png b/screenshots/logaxes_nolog.png
index 6916f0c25d..85150293a3 100644
Binary files a/screenshots/logaxes_nolog.png and b/screenshots/logaxes_nolog.png differ
diff --git a/screenshots/logaxes_nominorgrid.png b/screenshots/logaxes_nominorgrid.png
index ed3a893b7d..6f08315044 100644
Binary files a/screenshots/logaxes_nominorgrid.png and b/screenshots/logaxes_nominorgrid.png differ
diff --git a/screenshots/logaxes_small.png b/screenshots/logaxes_small.png
index d38f6b589a..6df6f04f19 100644
Binary files a/screenshots/logaxes_small.png and b/screenshots/logaxes_small.png differ
diff --git a/screenshots/mandelbrot.png b/screenshots/mandelbrot.png
index f4945086f3..f5107d7a25 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 0849746a64..bec54366b6 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 ea8169d91a..67182ff6ef 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 b1c1d1251b..877a594824 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 0edfd9d63b..100ddc5dee 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 e4947fcbd1..9e74fb6586 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 5b1662dcbb..0feca603a3 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 e3576e9bca..6006c03ea7 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 2a5c0ed975..b7f5bcae0c 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 4cc87759fe..c6907f3991 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 1f811557ff..c28449bdf4 100644
Binary files a/screenshots/paramscatterplot.png and b/screenshots/paramscatterplot.png differ
diff --git a/screenshots/paramscatterplot_small.png b/screenshots/paramscatterplot_small.png
index 34194fefff..96394f7195 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 66e7345df8..6bed9e640f 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 ce89ac0484..32c038b8f8 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 e3a3d7c094..f4a941fe52 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 7aa3626352..910ff820d5 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 9002842a94..27e893ec99 100644
Binary files a/screenshots/rgbimageplot_qt_small.png and b/screenshots/rgbimageplot_qt_small.png differ
diff --git a/screenshots/rgbimageplot_qt_upsidedown.png b/screenshots/rgbimageplot_qt_upsidedown.png
index cff1aa76d8..f22793a8ac 100644
Binary files a/screenshots/rgbimageplot_qt_upsidedown.png and b/screenshots/rgbimageplot_qt_upsidedown.png differ
diff --git a/screenshots/rgbimageplot_qt_upsidedown_small.png b/screenshots/rgbimageplot_qt_upsidedown_small.png
index 7f5638229e..f85214c4a4 100644
Binary files a/screenshots/rgbimageplot_qt_upsidedown_small.png and b/screenshots/rgbimageplot_qt_upsidedown_small.png differ
diff --git a/screenshots/rgbimageplot_small.png b/screenshots/rgbimageplot_small.png
index 56f29a778d..55562ee6c7 100644
Binary files a/screenshots/rgbimageplot_small.png and b/screenshots/rgbimageplot_small.png differ
diff --git a/screenshots/second_axis.png b/screenshots/second_axis.png
index c24d981ec4..d8391aedfb 100644
Binary files a/screenshots/second_axis.png and b/screenshots/second_axis.png differ
diff --git a/screenshots/second_axis_hor.png b/screenshots/second_axis_hor.png
index c9d4728e42..e6b097a514 100644
Binary files a/screenshots/second_axis_hor.png and b/screenshots/second_axis_hor.png differ
diff --git a/screenshots/second_axis_hor_small.png b/screenshots/second_axis_hor_small.png
index 472514a278..209b5f0a0d 100644
Binary files a/screenshots/second_axis_hor_small.png and b/screenshots/second_axis_hor_small.png differ
diff --git a/screenshots/second_axis_small.png b/screenshots/second_axis_small.png
index e83688e8a6..1c5f8de544 100644
Binary files a/screenshots/second_axis_small.png and b/screenshots/second_axis_small.png differ
diff --git a/screenshots/stepplots.png b/screenshots/stepplots.png
index d9d91f675b..47d8bd71e6 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 b17883fbbd..622178ea5a 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 0f4af91fe2..b6d5750a95 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 59d3e862cb..f4bb9dc8c9 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 35ea7e6c4a..d08a75740e 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 43972d31e5..dd9288d80a 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 92eb7ec95d..11bf985bcd 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 ccaebe3233..51dd463223 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 3f4c27798f..3d785d346b 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 a7ffa8e612..35e189ff9c 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 902187a20d..16ccd42b9a 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 b52ef17abb..290db25977 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 1314bb860e..535aeff0ef 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 1ab595648f..7bfd06edce 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 b66fcca1e2..347d4c36cf 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 4de984e574..0ddcf72b48 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 6117985089..9cbc5990e4 100644
--- a/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp
+++ b/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp
@@ -443,15 +443,15 @@ void doListLabelPosition(const QDir& outputDir, int iconsize, QColor backgroundC
JKQTBasePlotter plot(true);
plot.setXY(0,100,0,100);
- plot.setWidgetSize(iconsize*5,5*iconsize);
+ plot.setWidgetSize(iconsize*7,5*iconsize);
plot.setShowKey(false);
plot.setGrid(true);
plot.setExportBackgroundColor(QColor("lightgrey"));
plot.getXAxis()->setShowZeroAxis(false);
plot.getYAxis()->setShowZeroAxis(false);
- plot.getXAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMTicks|JKQTPCADMAxisLabel|JKQTPCADMTicksTickLabels);
+ plot.getXAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMTicks|JKQTPCADMAxisLabel);
plot.getXAxis()->setDrawGrid(false);
- plot.getYAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMTicks|JKQTPCADMAxisLabel|JKQTPCADMTicksTickLabels);
+ plot.getYAxis()->setDrawMode1(JKQTPCADMLine|JKQTPCADMTicks|JKQTPCADMAxisLabel);
plot.getYAxis()->setAxisLabel("y-axis-label");
plot.getXAxis()->setAxisLabel("x-axis-label");
@@ -461,12 +461,34 @@ void doListLabelPosition(const QDir& outputDir, int iconsize, QColor backgroundC
const JKQTPLabelPosition lt=static_cast(lti);
plot.getXAxis()->setLabelPosition(lt);
plot.getYAxis()->setLabelPosition(lt);
- plot.setPlotLabel("labelPos = "+JKQTPLabelPosition2String(lt));
+ plot.setPlotLabel("");//JKQTPLabelPosition2String(lt));
QString ltn=JKQTPLabelPosition2String(lt);
if (ltn.size()>0) ltn[0]=ltn[0].toUpper();
plot.redrawPlot();
plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).save(outputDir.absoluteFilePath("JKQTPLabel"+ltn+".png"), "png");
}
+
+ plot.setXY(-30,100,-40,100);
+ plot.getXAxis()->setShowZeroAxis(true);
+ plot.getYAxis()->setShowZeroAxis(true);
+ plot.getXAxis()->setDrawMode1(JKQTPCADMnone);
+ plot.getXAxis()->setDrawMode2(JKQTPCADMnone);
+ plot.getXAxis()->setDrawMode0(JKQTPCADMLine|JKQTPCADMTicks|JKQTPCADMAxisLabel|JKQTPCADMMaxFilledArrow|JKQTPCADMMinFilledArrow);
+ plot.getXAxis()->setDrawGrid(false);
+ plot.getYAxis()->setDrawMode0(JKQTPCADMLine|JKQTPCADMTicks|JKQTPCADMAxisLabel|JKQTPCADMMaxFilledArrow|JKQTPCADMMinFilledArrow);
+ plot.getYAxis()->setDrawMode1(JKQTPCADMnone);
+ plot.getYAxis()->setDrawMode2(JKQTPCADMnone);
+
+ for (int lti=0; lti<=JKQTPLabelPositionMax; lti++) {
+ const JKQTPLabelPosition lt=static_cast(lti);
+ plot.getXAxis()->setLabelPosition(lt);
+ plot.getYAxis()->setLabelPosition(lt);
+ plot.setPlotLabel("");//JKQTPLabelPosition2String(lt));
+ QString ltn=JKQTPLabelPosition2String(lt);
+ if (ltn.size()>0) ltn[0]=ltn[0].toUpper();
+ plot.redrawPlot();
+ plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).save(outputDir.absoluteFilePath("JKQTPLabel"+ltn+"_zeroaxis.png"), "png");
+ }
}
void plotStyle(const QSettings& style, QSize examplePlotSize, const QString& examplePlotFilename, QSize samplePlotSize, const QString& samplePlotFilename ) {