Skip to content

legend

Plot legend (only for line plots)

legend('show')

  • Showing plot legend.

legend('hide')

legend('off')

  • Hiding plot legend.

legend('toggle')

  • Toggling legend on / off.

legend(s1, s2, ..., sN)

  • Showing plot legend with names s1, s2, ..., sN, where N is the total number of lines in plot.
  • s1, s2, ..., sN are arrays of characters.
  • Error occurs if N is larger than total number of lines.

Discussions

  • If the hold state is off, execution of the next plot function will turn off the legend.
  • The user-interface provides functionality of turning on or off legend for an individual line.
  • Command syntax, such legend show is not supported.