changeset 30971:58ca24f0d038

maint: merge stable to default
author Rik <rik@octave.org>
date Sat, 30 Apr 2022 08:20:13 -0700
parents 29573bab8328 (current diff) 7d5cb3dd312d (diff)
children 767c9131cf64
files
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/newplot.m	Fri Apr 29 22:27:28 2022 -0700
+++ b/scripts/plot/util/newplot.m	Sat Apr 30 08:20:13 2022 -0700
@@ -155,7 +155,6 @@
   set (cf, "nextplot", "add");  # Matlab compatibility
 
   do_reset = true;
-  deleteall = false;
   if (isempty (ca))
     ca = get (cf, "currentaxes");
     if (isempty (ca))
@@ -163,6 +162,9 @@
       do_reset = false;
     endif
     deleteall = true;
+  else
+    set (cf, "currentaxes", ca);
+    deleteall = false;
   endif
 
   anp = get (ca, "nextplot");