Adding Legends

A Legend is a small display that provides captions, summarizes formats or otherwise explains what is seen in a window or in a print layout. Legends appear to float over the window and are always on top of other items in the window.

 

images\sc_legend_label_eg.gif

 

Legends may use simple, default styles or they may consist of complex and sophisticated items. Legends will often show object formats for drawings, surface colors by height for surfaces, thematic formats for labels (if one is present), and colors in images.

 

Although legends are part of a component like a drawing, they are an accessory item like a north arrow or scale bar associated with that component and are not the same as the actual contents of the component like the points, lines and areas that make up a drawing. Legends are not edited using tools such as painting tools for an image or the various editing tools available for drawings. Instead, legends are edited using settings in the Legend dialog.

 

Except for layouts, each component has one legend. A component remembers the settings for its legend as part of the properties of that component. Print layouts may contain multiple legends, including even multiple copies of the legend for each component that appears as an element in the layout.

 

An entire legend or any part of a legend may be composed for us automatically by the system or we can manually specify all or any part of a legend. Automatically-created legend items may be dynamically updated if the information they show, such as thematic formatting, changes. Dynamic and static parts of legends may be mixed, so that part of a legend (such as a title) may be manually specified while other parts, such as the colors and values for thematic formatting, may be dynamically generated by the system.

 

To add a legend:

 

1. Open the component.

2. Choose View - Legend to open the Legend dialog.

3. Check the Show Legend box and change the settings as desired. Press OK.

 

The default alignment is to place the legend in the right bottom corner of the window. If the window is resized or the view panned or zoomed the legend will stay in place in the right bottom corner of the window. To place the legend in any position, choose None in the Align box of the Legend dialog. The legend may then be dragged with the mouse to any desired position in the window, where it will stay no matter how the drawing or map is panned or zoomed.

 

By default, legends will be created showing elements for all types of objects using a simple style. Legends for maps will show elements for all components in the map.

 

To change a legend:

 

1. Double click the legend, or right click on the legend and choose Properties, or choose View - Legend.

2. Adjust the settings in the Legend dialog as desired and press OK.

 

In addition to Properties, the context menu that appears when right clicking on a legend also allows us to Hide the legend or to choose Align for different alignment.

 

Legend Styles

 

Manifold legends use a simple style that provides two main options:

 

·      Caption or no Caption - Entering text into the Caption box adds a main caption, that is, title, to the top of the legend using inverted foreground / background colors to set it apart. When caption text is added Manifold will automatically add an additional panel to the top of the legend.

·      Standard style or Transparent - Using a transparent style replaces the usual background color with no color.

 

Except for the above two adjustments to overall style, legends use a single style that consists of a series of elements, which are one or more lines of items in the legend. Although elements are by default stacked vertically...

 

images\sc_legend.gif

 

...the clever use of vertical separator elements can force legends to have a more horizontal appearance, as seen below.

 

images\eg_addlegend_18.gif

 

Within the legend the appearance of each item will be controlled by first, the choice of what type of element is used and second, by the various options specified for that type of element. Different types of elements have different options, in some cases rather extensive and elaborate options.

 

For example, text elements can have their fonts, size and attributes (such as boldfacing) controlled, while elements that show a sample of area formatting can be either manually controlled or automatically derived from the thematic formatting of a drawing. There are many different types of elements that may appear in a Manifold legend as well as many different display options within various types of elements.

 

Example

 

The following examples show different combinations of use of caption together with use of standard or transparent style. To the right of each legend is a screenshot of the Legend dialog used to create it (only the relevant part of the Legend dialog is shown).

 

images\sc_legend_nocap_std.gif images\dlg_legend_nocap_std.gif

 

The default setting is no text in the Caption box so no caption appears. The default setting is Standard in the Style box so the legend appears as a rectangle of background color within a border of foreground color.

 

images\sc_legend_caption_std.gif images\dlg_legend_caption_std.gif

 

If we enter some text into the Caption box the caption appears in an inversely-colored section of the legend.

 

images\sc_legend_caption_trans.gif images\dlg_legend_caption_trans.gif

 

If we switch to Transparent in the Style box the background color and surrounding box disappear.

 

images\sc_legend_nocap_trans.gif images\dlg_legend_nocap_trans.gif

 

Removing text from the Caption box removes the caption portion of the legend. Although there are many cases when transparent style is useful, as can be seen from this example it is probably not a good idea to use transparent style for legends that consist of fine text appearing against a busy background.

 

Example

 

We will add a simple legend to the Mexico sample drawing and then modify it.

 

images\eg_insert_legend_01.gif

 

We open the Mexico drawing in a drawing window. To add a legend we choose View - Legend from the main menu.

 

images\eg_insert_legend_02.gif

 

In the Legend dialog we check the Show legend box. The dialog appears with default legend elements. Thinking ahead a bit, we change the Align box to None so that later we will be able to move the legend about as desired by dragging it to whatever position we want in the drawing window.

 

Press OK. (To save space, the entire dialog is not shown in the illustrations for this example.)

 

images\eg_insert_legend_03.gif

 

A legend with no alignment specified initially appears in the upper left corner of the drawing window.

 

images\eg_insert_legend_03a.gif

 

We can move it in an instant to a new position by clicking and dragging it to whatever location we desire.

 

images\eg_insert_legend_03b.gif

 

This assumes, of course, that the mouse is not occupied by being in the middle of some other command.

 

To change the legend, we can choose View - Legend again from the main menu or we could right-click on it and choose Properties to launch the Legend dialog...

 

images\eg_insert_legend_03c.gif

 

...or we can simply double click on the legend as a shortcut to launching the Legend dialog.

 

images\eg_insert_legend_04.gif

 

Within the Legend dialog we can check the Customize Legend box to enable editing of legend elements. With this box checked we can now select individual legend elements and change them as we see fit.

 

For example, we can click on the Mexico Drawing text element at the top of the dialog to select it for editing. The colored background bar shows which element is selected for editing.

 

images\eg_insert_legend_05.gif

 

Pressing the Delete Element button in the toolbar will delete this element.

 

images\eg_insert_legend_06.gif

 

This simplifies the legend to only one element, an element that shows an area sample that has Areas as the text.

 

The text for this item is generated using an escape sequence, an expression in [ ] brackets for which the system automatically generates the relevant text. In this case, the default text is element is the escape sequence [Type / Column] which the system will fill in with the type of object, Areas in this case, as well as the column used for formatting if thematic formatting is in play. Since this drawing does not use thematic formatting there is no mention of a column in the automatically generated legend text.

 

Suppose we would rather have the text be Provinces - we can make that change by clicking into the Text box to change the text.

 

images\eg_insert_legend_07.gif

 

We enter the text Provinces and then we press OK.

 

images\eg_insert_legend_08.gif

 

The result is a simplified legend positioned where we want containing the text we want.

 

The art of creating legends in Manifold is simply the above procedure, at times greatly elaborated to create whatever legend we want. We learn to use the Legend dialog to add and delete elements to legends as desired. We can have some elements created for us by Manifold or we can add elements manually using a very wide range of options or we can combine automatically-created elements with manually-added elements in the same legend. Different types of components, such as images or drawings, will have different options enabled in the Legend dialog. Individual types of elements will also have different options available, such as a range of display styles for color wells or a wide range of font controls for text elements.

 

We can pick and choose from different legends by copying and pasting elements between legends. We can have Manifold automatically assemble legends for complex components like maps and then flatten those legend elements into individual, non-automatic elements we can customize as we like. We can use escape sequences to insert text that the system automatically generates for us in a wide range of circumstances. The result of combining all of these options is the ability to create legends of great flexibility while retaining the convenience of having the system create simple legends for us automatically.

 

See Also

 

Legends

Legend Text Escape Sequences