Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix position #1065

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 3 additions & 10 deletions src/matlab2tikz.m
Original file line number Diff line number Diff line change
Expand Up @@ -1048,21 +1048,14 @@ case guitypes()
% Get legend handle associated with current axis

legendhandle = [];
[env, envVersion] = getEnvironment();
env = getEnvironment();
switch env
case 'Octave'
% Make sure that m2t.legendHandles is a row vector.
for lhandle = m2t.legendHandles(:)'
if isVersionBelow(envVersion, [4,2,2]) % Octave commit 5865d2fef424
lhandleProp{1}='UserData';
lhandleProp{2}='handle';
else
lhandleProp{1}='__appdata__';
lhandleProp{2}='__axes_handle__';
end
ud = get(lhandle, lhandleProp{1});
ud = get(lhandle, 'UserData');
% Empty if no legend and multiple handles if plotyy
if ~isempty(ud) && any(axisHandle == ud.(lhandleProp{2}))
if ~isempty(ud) && any(axisHandle == ud.handle)
legendhandle = lhandle;
break
end
Expand Down