[LEGH,OBJH,OUTH,OUTM] = clickableLegend([AX],{[string1],...
[stringN]},'group',grps,'displayedLines',lines, ...)clickableLegend is a wrapper around the Matlab function LEGEND that provides the added functionality to turn on and off (hide or show) a graphics object (line or patch) by clicking on its text label in the legend. Call with no inputs to place a clickableLegend on the current plot. Its usage is the same as the Matlab function. For further information please see the LEGEND documentation.
|
Parameters |
Description |
|
AX [scalar] |
(Optional) Axes handle for legend |
|
string1..stringN [string] |
(Optional) Strings for legend labels. Also string1 could be a cell array containing all labels. |
|
grps [vector] |
(Optional) Must be preceded by keyword 'groups'. A vector specifying the group membership for every line object. The grouping parameter lets you have a group of lines represented and controlled by one entry in the legend. |
|
lines [vector] |
(Optional) Must be preceded by the keyword 'displayedLines'. A vector of indices corresponding to the lines or groups that should be displayed initially. |
|
Return Values |
Description |
|
LEGH [scalar] |
A handle to the legend axes |
|
OBJH [vector] |
A vector containing handles for the text, lines, and patches in the legend |
|
OUTH [vector] |
A vector of handles to the lines and patches in the plot |
|
OUTM [cell] |
A cell array containing the text in the legend |
legend
|
Copyright (c) MZA Associates 2009. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|