Previous Topic   Next Topic   Contents   Graphics Menu

Legend Dialog


A color legend bar can be created with the Legend Dialog.

Horizontal/Vertical
The legend bar may be either Horizontal or Vertical.

Position/Thickness
Its Position and Thickness are specified in percents of the plot (i.e., subwindow) size. The position is from the bottom (horizontal legend) or left (vertical) of the plot. A value can typed directly or incremented by +1 or -1 with the arrows to the right of the edit fields. (Note the LEGEND text command specifies these quantities in fractions---from 0 to 1---of the plot, rather than percent.) There is no option for choosing the length of a horizontal legend or the height of a vertical legend.

Labels
The fields in the Labels box control the number of tick marks on the legend and the values written below those ticks. The Minimum and Maximum are the values at the ends of the legend. The legend contains N + 1 ticks and numbers, where N is the Number of Divisions. Sabrina adjusts the number of decimal points used, up to 4, to accurately display the values. Scientific notation (i.e. 1.234e-9) is used where necessary. It is the userís responsibility to choose values that result in numbers that do not need to be rounded. The Minimum value may be greater than the Maximum. When the color coding uses logarithmic scaling, the fields should contain the logarithms of the limits and an appropriate label written.

Color Indices
The Color Indices are indexes into Sabrinaís primary color arrays. The legend bar consists of blocks of these colors from Start to End. The Start color corresponds to the Minimum value.

Preview
The Preview button shows the legend without committing it to the plot. (It draws the legend on the screen, but not in the backing store bitmap; the legend does not appear when the bitmap is copied to the screen.) The previewed legend is automatically updated when the Position and Thickness values are changed.

Sabrina, rather than the window manager, must implement backing store for the preview feature to work correctly. If necessary, include the resource
       Sabrina*ForceBackingStore:

Clear

Clear removes the previewed legend from the screen plot.

Apply
Apply commits the legend to the plot (after which it cannot be Cleared or altered by changing values on the dialog) and dismisses the dialog.

Cancel
Cancel removes any previewed legend and dismisses the dialog.