changeset 31033:bb9c7512e090

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 26 May 2022 19:47:47 +0200
parents 8629bb61ef17 (current diff) 0938366560cf (diff)
children a357490263f6
files scripts/plot/util/subplot.m
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/subplot.m	Thu May 26 13:12:31 2022 -0400
+++ b/scripts/plot/util/subplot.m	Thu May 26 19:47:47 2022 +0200
@@ -288,7 +288,7 @@
               ## appdata "__subplotposition__", use the existing axes.
               found = true;
               hsubplot = child;
-            else
+            elseif (exist ("rows", "var"))
               ## Check if this axes is a subplot with the same layout and
               ## index as the requested one
               rcn = getappdata (child, "__subplotrcn__");
@@ -648,6 +648,18 @@
 %!   delete (hf);
 %! end_unwind_protect
 
+## Mixed rcn and position mode
+%!test <*62526>
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   h1 = subplot (2, 2, 1);
+%!   h2 = subplot ("position", [0.5 0.5 0.3 0.3]);
+%!   h3 = subplot (223);
+%!   assert (get (hf, "children"), [h3; h2; h1]);
+%! unwind_protect_cleanup
+%!   delete (hf);
+%! end_unwind_protect
+
 ## Align mode
 %!test
 %! hf = figure ("visible", "off");