Legends

Legends provide a visual guide to symbology used in maps, drawings, images, and labels.  

 

For example, the simple legend in the illustration at right shows how different categories of roads are color coded based on the value of the fclass attribute, an attribute found in OpenStreetMap data.  The styles shown in the legend have been automatically taken from the Style settings for the roads layer.

 

Legends can be created for map windows or for layouts.  A legend in a map window takes the contents it shows from the map window.  Legends which appear within layouts take the contents they show from a map, drawing, image, or labels frame within the layout.

Dynamic and Static Legends

There are two types of legends, dynamic legends and static legends:

 

 

 

See the First Look - Legends in Maps and Layouts video for a quick introduction to new legend capabilities.

Legends in Map Windows

Every map window has a virtual Legend layer in the Layers pane when the focus is on that opened map window.  Only one legend can be added to a map window.  Dynamic legends are a very easy way to add a simple legend to a map window.  While dynamic legends are very convenient and easy to use, they allow limited customization.

 

To add a legend to the map window, click the Legend virtual layer on.  The Layers pane is also an essential interface for setting legend modes that specify which layers are shown in the legend and for customizing the legend by changing settings in the Legend dialog.

 

Add a dynamic legend to a map window:

 

  1. Open the map window.

  2. With the focus on the map window, in the Layers pane click the Legend layer on.

  3. By default, visible layers will appear in the legend.  To control which layers appear in the legend, click the Layers pane filter button and set legend modes as desired.

  4. To customize the legend, double-click the Legend virtual layer in the Layers pane and set options in the Legend dialog.

 

Dynamic legends ignore virtual layers (North arrows, scale bars, grids, and background) as well as any image layers that have not been thematically formatted.  This avoids creating legend entries for image server layers like Bing or Google streets layers.  

 

Legends in maps can be sized for width, but will automatically take their height from the the height available in the map window as well as the vertical room required for their contents. If the contents of the legend are larger than can fit into the height set by the map window, the Legend will automatically clip the lower parts of the legend that cannot fit into the available height.

 

Dynamic legends in a map window will be automatically updated with changes in the map from which they take their contents, for example, layers being turned off and on for display in the Layers pane, changes in legend modes for those layers, or changes in Style for map layers.

 

 

To turn on a legend in a map window, with the focus on the open map window turn on the virtual Legend layer that is in the Layers pane for every map window.

 

 

That immediately pops open the virtual layer that provides a legend, with the legend configured using default settings.

 

Use legend modes in the Layers pane to choose which layers appear in the legend and how they appear.   Double-click the the Legend virtual layer in the Layers pane to launch the Legend dialog, to customize the legend.

Dynamic Legends in Layouts

Dynamic legends in layouts are a special type of frame that can be added to the layout, just like any frame, using a Create Legend command.  Dynamic legends are a very easy way to add a simple legend to a layout.  While dynamic legends are very convenient and easy to use, they allow limited customization.

 

We can add as many dynamic legend frames to a layout as we like.  Each dynamic legend frame will take its contents from whatever is the topmost map frame that is immediately below the legend frame in the layout.   If there is no map frame immediately below the legend frame in the layout, the dynamic legend will take its contents from whatever is the topmost map frame in the layout.   

 

Add a dynamic legend to a layout window:

 

  1. Open the legend in a window.

  2. With the focus on the legend window, choose the Create Legend tool from the drop-down menu for the cursor mode button in the main toolbar.

  3. In the layout click the approximate center of the legend frame you would like to create.   The legend will take its contents from the topmost map frame below it.  

  4. To customize a legend in a layout, alt-click the legend frame to pick it, and then in the Info pane click the Legend [...] browse button to launch the Legend dialog.

  5. After customizing settings in the Legend dialog, click the OK button to close the dialog and then press the Update Frame button in the Info pane.

  6. To control which layers from the map frame appear in the legend, open the map in a window and with the focus on the map window click the Layers pane filter button and set legend modes as desired.

 

Dynamic legends in a layout will be automatically updated with changes to legends in the map from which they take their contents, for example, layers being turned off and on for display in the Layers pane, changes in legend modes for those layers, or changes in Style for map layers.

 

 

To add a dynamic legend to a layout, open the layout and click on the Create Legend tool in the cursor mode button in the main toolbar.  

 

 

In the layout click approximately where the legend frame should appear.

 

 

A small legend frame of default size appears at the clicked spot, using the default legend style.   The legend takes its contents from whatever is the topmost frame directly below the frame in the display stack.  If there is no frame directly below the legend, the legend takes its contents from whatever is the topmost frame in the layout.

 

The legend frame is already picked for editing, as if we had Alt-clicked the frame.  The Info pane will automatically be brought to the foreground, ready for any changes to the legend frame or to launch the Legend dialog.  In the Layers pane for the layout, a new Legend frame appears as well.

Static Legends in Layouts

Static legends are collections of individual layout frames, like text frames and sample frames, which together create the desired legend effect.  Those individual layout frames can be customized using an extensive range of controls.

 

The easiest way to create static legends is to start with an automatically created dynamic legend, and to then use the Layers pane context menu command to split that dynamic legend into individual sample frames.   We can then customize those individual sample frames, using helper commands to align them and otherwise organize them into exactly the fully customized legend we want.

 

We can also combine using a dynamic legend with individual layout frames, like text frames and sample frames, to combine the ease of use of dynamic legends for most of the legend with the extensive customizability available by using static frames.

 

Add a static legend to a layout window:

 

  1. Add a dynamic legend to the layout.

  2. With the focus on the layout window, in the Layers pane right-click the dynamic legend and choose Split into Samples.

  3. A new Legend folder will appear, with individual frames within it that together duplicate the effect of the dynamic legend.

  4. Edit the frames as desired using layout frame style settings in the Info pane and alignment commands.

  5. Add new frames to customize the legend using create commands.

 

Working with static legends requires skillful use of an ensemble of user interface elements: basic layout mouse moves, the Layers pane, pick and selection workflow in the layout window, layout frame style settings in the Info pane, and create and alignment commands in layouts.  

Legends in Layouts are Frames

Legends in layouts are frames, just the other elements that are in a layout.  Dynamic legends in layouts are a single, special frame that is a legend frame.     Suppose we add a dynamic legend to a layout, placing the legend above a map window.  

 

 

The actual legend is drawn on the fly within the legend frame, that is seen in the above illustration as a thin line rectangle.

 

 

If we imagine the legend seen in 3D perspective view, we could see that it consists of a single frames. The legend within the legend frame is opaque, with the rest of the frame being transparent.  All of the graphical elements, like samples for area colors and text numbers for the values of intervals, are rendered within a single frame.  The dynamic legend within the legend frame has some vertical room to get bigger as changes in the map, such as changing legend modes in the Layers pane for the map, add or remove elements within the legend, making it vertically larger or smaller.

 

 

The Layers pane for the layout shows the two frames that are in the layout:  the map frame, and above it in the display stack, the legend frame.

Convert a Dynamic Legend to a Static Legend

If we like, we can convert the dynamic legend into a static legend by splitting it into samples.

 

 

In the Layers pane for the layout, right-click onto the Legend frame and choose Split into Samples.   A new Legend folder will be created, containing within it eight frames that together duplicate the look of the dynamic frame.  The original Legend frame is still the layout, but it has been turned off.

 

 

The eight frames, two text frames and six sample frames, are an ensemble that have been arranged so that when seen together they look like the original dynamic legend.   

 

Static legends usually consist of multiple frames that  are positioned next to each other, aligned to each other, and stacked to create desired effects.   To make it easier to manage legend frames in the Layers pane, the frames are grouped within one or more folders, which makes it very easy to select the entire legend with a single click or to turn it on/off with a single click.

 

 

If we imagine the legend seen in 3D perspective view, we could see that it consists of a larger, background text frame that is used as a base frame, plus seven smaller frames that have been placed above the base frame in the display stack.   The smaller frames have been sized and positioned to provide the same visual effect of the padding used in the original dynamic legend to provide some free space between the borders of the legend and the contents within.

 

The larger base frame's edges are the same as the visible border of the base frame.  There is no extra space above or below since the base frame is just a standard text frame, with blank text, which is used to provide a filled-in background color (white) and a border (black).

 

 

The frames in static legends are various types of frames, such as text frames and sample frames.  The base frame in the illustration above is a text frame that has no text in it.  Sample frames are a specialized type of layout frame that are designed to show formatting for images, for points, lines, or areas in drawings, and for text labels.   Sample frames are used to show the style of objects in drawings.

 

The lowest legend frame is called a base frame.  It is just a text frame like any other text frame, but by convention when a frame intended to be used as a background frame is created as part of a legend it is called a base frame.

 

 

The Layers pane shows all of the frames in the layout.   Icons next to each frame used in the legend tell us what type of frame that is:

 

A small Ab icon indicates a row in the Layers pane is a text frame..

A small icon with a line in a box indicates a row in the Layers pane is a sample frame.

A schematic legend icon indicates a row in the Layers pane is a dynamic legend frame.

Folders within layers pane conveniently group the various frames within the legend.  We can collapse or expand them as desired to make it easier to navigate and to manage the many frames used in a legend

 

The lowest layer in this layout is a map from which the legend was created. The original dynamic legend is the Legend frame that is now turned off for display.   The ensemble of new frames that comprises the static legend is in the new Legend folder.

 

The lowest legend frame in the Legend folder is a text frame with no text in it and thus no name, since the name of a text folder is taken from the text it contains.  The various sample frames in the legend show the thematic format used to style the Buildings layer.  The uppermost text layer is called Buildings : Elevation, a caption created from Buildings, the name of the drawing in the map and Elevation, the name of the field in the drawing's table that controls the thematic formatting shown in the sample frames.  

 

The lowest legend frame is called a base frame.  It is just a text frame like any other text frame, but by convention when a frame intended to be used as a background frame is created as part of a legend it is called a base frame.   The base frame is drawn with the border option turned on for the frame.  In this case, the border has been made thicker, using a Stroke of 2, in the original dynamic legend, so the base frame in the static legend created from the dynamic legend inherited that thicker setting for the border.

 

Other text frames and sample frames in the legend by default do not show borders.   The margin lines shown are drawn as guidelines but do not appear in the printout.

 

 

When viewed in the layout, the various frames that make up the legend are aligned to give a finished look.  The illustration at left above shows the default margin guidelines that appear in layouts, to show the boundaries of frames even if they do not have borders.  

 

 We can click the Margins button to turn off margin guidelines to see what the legend will look like when printed, as seen in the illustration at right above.  If we wanted border lines to appear for the area sample frames, we can easily change the border color for those frames from transparent (the default, so border lines are not visible) to black.

 

 The legend shown above is a very simple static legend.  Static legends can be very elaborate and sophisticated, with virtually every aspect of the display being customized.

 

Tips for Working with Static Legends

Working with static legends requires skillful use of an ensemble of user interface elements: basic layout mouse moves, the Layers pane, pick and selection workflow in the layout window, layout frame style settings in the Info pane, and create and alignment commands in layouts.

 

 

 

 

 

 

 

Skills and info for working with static legends are covered in user manual topics for layouts:

 

Layouts

 

Layouts: Layers Pane

 

Layouts: Info Pane

 

Layouts: Create Commands

 

Layouts: Alignment Commands

 

 

Legends: Tutorial Example - A step by step, illustrated tutorial showing how to create a legend for a map.

 

Legends: Raster Images - All about creating legends for images (rasters).

 

 

Notes

Style overrides excluded - Legends will capture formatting in the Style pane, but will not capture style overrides used to style objects individually if such have been applied.

 

More than just maps - Legends can be created for any visual display window that can host multiple layers, such as drawing windows, image windows, or labels windows in addition to map windows. When this documentation refers to a "map window" in the context of creating legends for map windows or for map window frames in layouts, it also intends to refer to all such visual display windows as well.

 

 

See Also

Cursor Mode

 

Maps

 

Selection

 

Layers Pane

 

Info Pane

 

Layouts

 

Layouts: Info Pane

 

Layouts: Create Commands

 

Layouts: Legends

 

Layouts: Alignment Commands

 

Legend Mode

 

Legend Dialog

 

Legends: Tutorial Example - A step by step, illustrated tutorial showing how to create a legend for a map.

 

Legends: Raster Images - All about creating legends for images (rasters).

 

Style

 

Style: Thematic Formatting

 

File - Page Setup

 

File - Print

 

File - Print Preview

 

Example: Layout Properties - Editing properties which appear in the mfd_meta table for a layout changes the content of that layout.   We can exploit that effect to create standardized layouts which are then re-cycled for different content.