Adding Legends

About Legends

A graph can have multiple legends. There are two main categories of legends:
Global Legend
applies to all cells in the graph. You specify which plots you want in the legend when you create the legend.
Cell Legend
applies to a cell in the graph. By default, a cell legend contains all plots in the cell. There are two types of cell legends:
  • You can add a discrete legend to any of the cells in a graph. A discrete legend is created within the cell.
  • If the plot is a contour plot with a contour type of fill or gradient, then you can add a gradient legend to the cell. A gradient legend appears alongside the contour plot.

Add a Global Legend to a Graph

A global legend applies to all the cells in the graph. You specify which plots you want in the legend when you create the legend.
To add a global legend to a graph:
  1. Select Insertthen selectGlobal Legend, or click Global legend icon in the toolbar. The Global Legend dialog box opens. The dialog box contains a list of all the plots in all the cells of the graph.
    Global Legend dialog box
  2. Select the check box next to each plot that you want to include in the legend. If you have multiple plots and want to include all plots, select the check box in the heading of the first column.
  3. To edit a label, do the following:
    1. Double-click the label.
    2. Type the text that you want.
    You can edit a label if a small arrowhead small arrow appears next to the label. When the Edit Legend Label contains the text Group Values for a plot, then the values included in the legend come from a group variable on a plot and cannot be edited.
  4. Specify the order in which plots appear in the legend as follows:
    1. Click a plot name to highlight it.
    2. Click the up arrow to move the plot up, or click the down arrow to move the plot down.
  5. Click OK. The legend appears at the bottom of the graph.
You can later make the following changes to the legend:
  • To change the contents of the legend, right-click the legend and select Legend Contents.
  • To change the location of the legend as well as other properties, right-click the legend and select Legend Properties.
  • To remove the legend, right-click the legend and select Remove Legend.

Add a Legend to a Cell in a Graph

To add a legend to a cell, click and drag the appropriate legend icon from the Insets panel to the cell.
Discrete Legend icon
Click and drag the Discrete Legend icon to the cell. The legend is placed near the location where the icon was dropped. By default, all plots in the cell are displayed in the legend.
Gradient Legend icon
If the plot is a contour plot with a contour type of fill or gradient, then click and drag a Gradient Legend icon to the cell. The gradient legend is displayed on the right side of the cell.
You can later make the following changes to the legend:
  • To change the contents of a discrete legend, right-click the legend and select Legend Contents.
  • To change the location of a legend as well as other properties, right-click the legend and select Legend Properties.
  • To remove a legend, right-click the legend and select Remove Legend.