Mercurial > octave
changeset 28728:aabebd95488b stable
__gnuplot_draw_axes__.m: Improve, but not fully fix, colorbar size with gnuplot (bug #40686)
* __gnuplot_draw_axes__.m: Use "set size noratio" to undo aspect ratio lock
imposed earlier if certain conditions are met.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 12 Sep 2020 13:49:50 -0700 |
parents | 0a4dcea2987a |
children | f8917a743f00 9342688e86b4 |
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:52:03 2020 -0400 +++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m Sat Sep 12 13:49:50 2020 -0700 @@ -1750,6 +1750,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;