Now Playing: Plot Legends (5:28)
In this session, we will discuss legends in NCSS plots. We will use the scatter plot format window as an example representing all NCSS plots with legends. Many of the plots will have different legends than that of the scatter plot, but the principles and many of the options will be the same. The scatter plot format window is opened by clicking the plot format button of the scatter plots procedure, or, on the plots tab of any other procedures that provide a scatter plot, such as the regression procedures.
The first tab for the legend has a checkbox to specify whether or not a legend is shown. Any of 25 locations can be selected for the position of the legend. From that position, the legend can be shifted any number of pixels in any direction. You can also increase or decrease the margin around the frame of the legend.
The titles of the legend can be entered directly, or replacement codes can be used by enclosing them in braces. For example, enclosing the letter ‘G’ in braces will produce the name of the grouping variable when the procedure is run. The frame and the fill of the legend can also be customized.
The layout tab is used to specify the locations of the entries within the legend. Any number of columns may be used, and the entries may be specified to go across the columns or down the columns. Various margins can be used inside the legend to construct the desired appearance. Even the space before and after each entry can be controlled.
The legend entry order is used when more than one type of entry type is in the same legend. For example, if you also wish to include the trend lines in the legend, this order would specify whether the trend lines appear first, or the group entries appear first. The groups tab is used to specify the symbols and text associated with the group entries. A useful drop-down at the top allows you to only show a legend when there is more than one group. The overall label color can be set to either the font to the left, or to the color of the corresponding symbol.
The symbols size can be based on the font size or the actual size of the symbol in the plot. The symbols sizes can be adjusted as a group by a specified percentage as well. The symbols can be represented by the symbols themselves, colored squares, or can be omitted. For example, you may wish to omit the symbols and set the color of the label text to the symbol fill.
In the bottom section of the groups tab, each legend entry may be included or excluded, or may be customized individually. For a given legend entry, you may override any aspect of the entry by checking the box next to the attribute you wish to override. For example, the label could be changed for one of the groups, and the symbol size could be made larger.
The trend lines tab is more specific to the scatter plot legend. The items in the box match the lines that have been chosen for the scatter plot. You can decide whether each line is to be included in the legend, and whether to have separate entries for each group or a single entry for all groups. Each of these entries can also be customized individually.
The extra lines and extra symbols tabs are used to specify legend entries corresponding to plot extras that have been added from the extras major tab. The legend entries for these items can be customized in a similar manner to the groups. You can see that there is great flexibility in getting your legend to look exactly as you wish for it to appear on the graph. This concludes our discussion of the legends in NCSS plots.