Add a Scale bar to a map window by clicking on the Scale bar virtual layer in the Layers pane.
This topic discusses the use of a scale bar virtual layer in a map. For info on adding scale bar frames to Layouts, see the Layouts: Scale Bars topic.
The Layers pane shows three virtual layers at the top of the layers pane display stack for map, drawing, image, and labels windows. Virtual layers are off by default.
Click on the corresponding virtual layer's on/off box to turn on a North arrow, a scale bar, a legend, or a grid as part of the display in the window.
Clicking the Scale Bar layer on adds a default scale bar to the active window. Given the dark colors in the map, we will want to configure the scale bar for better visibility. We will want to change at least the font color, so the text caption is more visible against the dark background.
Configure a scale bar in a map by double-clicking the Scale Bar virtual layer in the Layers pane. That opens the Scale Bar dialog.
The Scale Bar dialog allows setting the following parameters:
(Preview pane) |
Shows a preview of the current settings used in the dialog. The background color is light blue by default, to allow either very light or dark shapes to be visible. Change the background color of the preview pane by clicking the square box in the upper right corner of the preview pane. |
(Shapes gallery) |
Choose a Scale bar shape from a gallery of popular shapes. Hovering the mouse over a shape will show the name of that shape in a tooltip. |
Foreground and stroke color for shapes and text. |
|
Fill color and the color for halos. |
|
Buttons that show a small "box" sub-icon indicate that color has been changed from the default. |
|
Stroke |
Stroke width for the shape |
Text |
Check to show text caption with the number of units. |
Font for text. Fully configurable for typeface, effects, bold, etc. |
|
Font size for text. |
|
Position |
Horizontal and vertical position of the Scale bar shape relative to the map. |
Margin |
Horizontal and vertical margins between the Scale bar shape and the map's edges. |
Size |
Approximate desired size of the scale bar shape in horizontal and vertical dimensions. The actual size is computed based on the units and current scale. Default: 144 pt x 8 pt. |
Halo |
Width of background color halo for shape and text. Default: 1pt. Setting Halo to 0 turns off the halo. |
Length |
Uncheck the Auto box to manually specify the length of the scale bar in the unit of measure specified in the Unit box. If the Auto box is checked (the default), or if the space allocated for the space bar in the Size parameter is too small to show the desired length, the length of the scale bar will be computed automatically based on the specified size, unit and the current scale. The width of the scale bar is slightly reduced so that the reported length is rounded to no more than two significant digits. |
Unit |
Unit of measure shown in the text caption. Default: coordinate system unit for the map window, specified by choosing (auto). |
Apply |
Press to apply the current dialog settings to the map. |
We configure a default scale bar by setting desired parameters.
Double-clicking the Scale Bar virtual layer in the Layers pane to open the Scale Bar dialog.
Specify options as shown above. The foreground color is white and the background color is black, so the text caption will appear in white with a very thin black halo outline.
We would like the scale bar to show a length of 500 kilometers, so we have unchecked the Auto box, changed units to Kilometer, and specified 500 for the Length. After a bit of trial and error pressing the Apply button, we have adjusted the Size to 110 points, to provide enough room to show a scale bar that is 500 kilometers in length at the scale we intend to use.
Press the OK button.
The Scale bar now appears using the shape specified, along with a legible caption using kilometers as units. The slight halo in black we have added is not visible against the dark colors of the ocean, but if the view panned and zoomed to have lighter colors behind the scale bar, the halo would help see the white scale bar and text against a very light background.