Adding Legends

A legend is text that describes aspects of a visualization. For example, a legend might show the plot line or plot points. If multiple plots are present the legend may show which colors and linestyles represent which plots. An inserted legend will include items selected at the time of insertion. If no specific dataset is selected, the legend will include all datasets in the plot.

To add a legend to your plot, select Insert  New Legend.

Figure 14-6: A Simple Sine Plot with Default Legend Added

plotlegend.gif

You can add new information to your existing legend, or you can also use the Insert → Legend option can be used over again to add more legends. For example, in the theory plot with newtheory overplot displayed in the previous section, you can add a legend for each plot:

  1. Select the newtheory plot by clicking once on the line.
  2. Select Insert → New Legend. A new legend appears on top of the previous legend (this new legend can be selected and repositioned).
  3. Figure 14-7: Plot and Overplot in iPlot with Legend Added for Each

    overplotlegend.gif

You can double-click on the legend to bring up a property sheet to alter its settings. Through the property sheet, you can also access the Visualization Browser, which can be used to navigate through other legends and objects within the visualization. In the previous example the names of the legends have been altered to reflect the data names. For more information on editing settings in the Visualization Browsers, see The Visualization Browser.