changeset 29591:0023c109e1b0

struct2hdl.m: Fix bug loading plotyy figures (bug #60488). * struct2hdl.m: Use row,column indexing rather than linear indexing to avoid a logic flaw.
author Rik <rik@octave.org>
date Sun, 02 May 2021 07:28:15 -0700
parents d1a2ea05688b
children d11dfe2813fa
files scripts/plot/util/struct2hdl.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/struct2hdl.m	Sun May 02 13:25:50 2021 +0200
+++ b/scripts/plot/util/struct2hdl.m	Sun May 02 07:28:15 2021 -0700
@@ -275,10 +275,10 @@
       plty = s.properties.__plotyy_axes__;
       addproperty ("__plotyy_axes__", h, "data");
       tmp = [p [s.handle; h]];
-      tst = ismember (tmp(1:2:end), plty);
+      tst = ismember (tmp(1,:), plty);
       if (sum (tst) == numel (plty))
         for ii = 1:numel (plty)
-          plty(ii) = tmp(find (tmp == plty(ii)) + 1);
+          plty(ii) = tmp(2, find (tmp(1,:) == plty(ii)));
         endfor
         for ii = 1:numel (plty)
           set (plty(ii), "__plotyy_axes__", plty);