Skip to content

Commit

Permalink
Merge pull request #1101 from mmuetzel/octave-6
Browse files Browse the repository at this point in the history
Restore compatibility with Octave 6.x or newer
  • Loading branch information
egeerardyn committed Oct 25, 2021
2 parents f299888 + 303829b commit cf27b2d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/matlab2tikz.m
Original file line number Diff line number Diff line change
Expand Up @@ -1132,9 +1132,14 @@ case guitypes()

switch getEnvironment()
case 'Octave'
% See set(hlegend, "deletefcn", {@deletelegend2, ca, [], [], t1, hplots}); in legend.m
delfun = get(legendHandle,'deletefcn');
entries = delfun{6};
if isappdata(legendHandle,'__peer_objects__')
% Octave version 6.x or newer with refactored legend
entries = getappdata(legendHandle,'__peer_objects__')
else
% See set(hlegend, "deletefcn", {@deletelegend2, ca, [], [], t1, hplots}); in legend.m
delfun = get(legendHandle,'deletefcn');
entries = delfun{6};
end

% Bubble-up legend entry properties from child to hggroup root
% for guessable objects
Expand Down

0 comments on commit cf27b2d

Please sign in to comment.