# HG changeset patch # User Rik # Date 1592058518 25200 # Node ID e5ab4194f45d00a81abc3e94d98cba5eb4f1c34a # Parent 159b6a1eb4083170a766cca614bb9a380b15346f Allow 2-D view() commands to work with gnuplot (bug #58526). * __gnuplot_draw_axes__.m: For 2-D plots, check whether view property is anything other than default [0, 90]. If it is, switch number of dimensions 'nd' to 3. diff -r 159b6a1eb408 -r e5ab4194f45d scripts/plot/util/private/__gnuplot_draw_axes__.m --- a/scripts/plot/util/private/__gnuplot_draw_axes__.m Fri Jun 12 22:13:04 2020 +0200 +++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m Sat Jun 13 07:28:38 2020 -0700 @@ -56,6 +56,10 @@ endif nd = __calc_dimensions__ (h); + if (nd == 2 && (any (get (h, "view") != [0, 90]))) + ## view() only works correctly on 3-D axes in gnuplot (bug #58526). + nd = 3; + endif if (strcmp (axis_obj.dataaspectratiomode, "manual") && strcmp (axis_obj.xlimmode, "manual")