You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 5, 2019. It is now read-only.
Calling legtools.append with a non-string input is not caught by input validation.
For example:
% Sample data
x = 1:10;
y1 = x;
y2 = x + 1;
% Plot a thing!
figure
plot(x, y1, 'ro');
lh = legend('Circle', 'Location', 'NorthWest');
% Add a thing!
hold on
plot(x, y2, 'bs');
legtools.append(lh, 12)
Throws the following error:
While setting the 'DisplayName' property of 'Line':
Value must be a string.
Error in matlab.graphics.illustration.Legend/setStringImpl
Error in matlab.graphics.illustration.Legend/set.String_I
Error in matlab.graphics.illustration.Legend/set.String
Error in legtools.append (line 58)
lh.String = newlegendstr;
Error in testcode (line 16)
legtools.append(lh, 12)