changeset 28729:f8917a743f00

maint: merge stable to default.
author Rik <rik@octave.org>
date Sat, 12 Sep 2020 13:50:24 -0700
parents 533993e3f115 (current diff) aabebd95488b (diff)
children f8e925ded48f
files scripts/plot/util/private/__gnuplot_draw_axes__.m
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m	Sat Sep 12 14:55:48 2020 -0400
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m	Sat Sep 12 13:50:24 2020 -0700
@@ -1754,6 +1754,15 @@
     fputs (plot_stream, "set view 0,0;\n");
   endif
 
+  ## Undo the aspect ratio lock imposed by the gnuplot command sequence:
+  ##   "set view equal xy; set view map"
+  ## See bug #40686: "Incorrect colorbar size"
+  if (nd == 3
+      && strcmp (axis_obj.dataaspectratiomode, "manual")
+      && axis_obj.dataaspectratio(1) == axis_obj.dataaspectratio(2))
+    fprintf (plot_stream, "set size noratio;\n");
+  endif
+
   if (bg_is_set)
     fputs (plot_stream, ['if (GPVAL_TERM eq "qt") unset obj 1;' "\n"]);
     bg_is_set = false;