changeset 27750:597e50809a9c

plotyy.m: Fix incorrect parenting of second axes object (bug #57313) * plotyy.m: Copy parent of axes #1 when creating second axes object.
author Rik <rik@octave.org>
date Wed, 27 Nov 2019 08:16:33 -0800
parents b3ad1b9417c0
children 8ac3222bf951
files scripts/plot/draw/plotyy.m
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/draw/plotyy.m	Tue Nov 26 15:37:50 2019 +0100
+++ b/scripts/plot/draw/plotyy.m	Wed Nov 27 08:16:33 2019 -0800
@@ -79,7 +79,8 @@
         && isaxes (get (hax, "__plotyy_axes__")) == [true; true])
       hax = get (hax, "__plotyy_axes__");
     else
-      hax = [hax; axes("nextplot", get (hax(1), "nextplot"))];
+      hax = [hax; axes("nextplot", get (hax(1), "nextplot"), ...
+                       "parent", get(hax(1), "parent"))];
     endif
 
     [axtmp, h1tmp, h2tmp] = __plotyy__ (hax, varargin{:});