This repository was archived by the owner on Apr 5, 2019. It is now read-only.
This repository was archived by the owner on Apr 5, 2019. It is now read-only.
objtodelete never set in legtools.remove #10
Closed
Description
When attempting to remove legend entries where there are no objects generated by legtools.adddummy
present, legtools.remove
will throw an error.
For example:
% Set up figure
x = 1:10;
y1 = x;
y2 = x + 1;
figure
plot(x, y1, x, y2);
lh = legend('y1', 'y2');
legtools.remove(lh, 2);
Throws the following error:
Undefined function or variable 'objtodelete'.
Error in legtools.remove (line 137)
delete(objtodelete);
Error in testcode (line 9)
legtools.remove(lh, 2);
objtodelete
is used by legtools.remove
when searching for dummy lineseries objects generated by legtools.adddummy
. In the case where no objects are present, this variable is never defined, so attempting to delete
it will throw an error.
See: #7