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.
The addition of 'AutoUpdate' to legend in R2017a breaks the
functionality of append. With 'AutoUpdate' turned off we can restore
the functionality of legtools, but turning it back on causes our
appended legend entries to be deleted. Clearing out the undocumented
'PlotChildrenExcluded' legend property seems to prevent this from
occuring
This is untested in versions < R2017a
See #15
Copy file name to clipboardExpand all lines: Readme.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ Append string(s), `newStrings`, to the specified `Legend` object, `legendhandle`
18
18
19
19
The legend will only be updated with the new strings if the number of strings in the existing legend plus the number of strings in `newStrings` is the same as the number of plots on the associated `Axes` object (e.g. if you have 2 lineseries and 2 legend entries already no changes will be made).
20
20
21
+
**NOTE**: For MATLAB R2017a or newer, the `legend` object's [`'AutoUpdate'`](https://www.mathworks.com/help/matlab/ref/matlab.graphics.illustration.legend-properties.html#bt7bgi4-1-AutoUpdate) property *must* be set to `'off'` before adding additional lineseries to the plot.
22
+
21
23
#### Examples
22
24
##### Adding one legend entry
23
25
% Sample data
@@ -154,4 +156,4 @@ For a single dummy legend entry, `plotParams` is defined as a cell array of stri
0 commit comments