Mercurial > octave
changeset 28468:e5ab4194f45d
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.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 13 Jun 2020 07:28:38 -0700 |
parents | 159b6a1eb408 |
children | 4d7232bcf6c1 |
files | scripts/plot/util/private/__gnuplot_draw_axes__.m |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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")