changeset 26547:b52f6b0667eb

Enable axes box when drawing 2-D stem plots for Matlab compatiblity (bug #55481). * __stem__.m: If hold state is not on, then modify 2-D axes and turn 'box' property 'on'.
author Rik <rik@octave.org>
date Tue, 15 Jan 2019 12:54:22 -0800
parents aea4e66eb331
children 58ad6355ece8
files scripts/plot/draw/private/__stem__.m
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/draw/private/__stem__.m	Mon Jan 14 12:54:32 2019 +0000
+++ b/scripts/plot/draw/private/__stem__.m	Tue Jan 15 12:54:22 2019 -0800
@@ -173,9 +173,13 @@
         set (h, args{:});
     endif
 
-    if (! strcmp (hold_state, "add") && have_z)
-      set (hax, "view", [-37.5 30],
-                "xgrid", "on", "ygrid", "on", "zgrid", "on");
+    if (! strcmp (hold_state, "add"))
+      if (! have_z)
+        set (hax, "box", "on");
+      else
+        set (hax, "view", [-37.5 30],
+                  "xgrid", "on", "ygrid", "on", "zgrid", "on");
+      endif
     endif
     set (hax, "nextplot", hold_state);