Displaying the Scale As Text
It is easy to add the text "Scale 1:nnn" to your scalebar. There are three global variables that control the placement and appearance of the scale text: .scalebar$scalestyle, .scalebar$scaleradix, and .scalebar$scaleround.
The scale text can be displayed either above or below the scalebar. It is always centered with respect to the bar itself, regardless of other settings such as the unit style.
Set the global variable .scalebar$scalestyle to 1 to draw the scale text above the scalebar, and 2 to draw it below. To disable it completely, set .scalebar$scalestyle to 0, which is the default.
To add a radix to the scale, set the variable .scalebar$scaleradix to your radix character. For example, if your scale is 1:1,000,000, setting .scalebar$scaleradix to ',' (with or without the quotes) will yield:
To use a space for a radix, set .scalebar$scaleradix to ' ' (a space between two single quotes). That will yield:
Finally, you can round off the scale denominator by setting the variable .scalebar$scaleround. The denominator will then round to the nearest multiple of .scalebar$scaleround.
For example, if your mapscale were 1:156,793.6679, and .scalebar$scaleradix were set to ',', you could use .scalebar$scaleround to get the following:
Overriding The Default Mapscale
Most of the time when you are using the scalebar, you will want it to draw at the same scale as the current ArcPlot session. Occasionally, however, you may want to override this behavior. For example, if you are creating a map legend composition or .GRA file to place on your map, the ArcPlot mapscale setting may not be the same as that used for the rest of the map. An easy way to get a correct scalebar in this situation is to use the .scalebar$mapscale parameter. If this variable contains a value, it will be used as the mapscale. Otherwise, the scalebar will be drawn using the underlying mapscale. If you set .scalebar$mapscale to 2400, for example, the scalebar will be drawn at 1:2400 regardless of the current ArcPlot mapscale setting.
Entire site © 1996-2004 by Christopher Eykamp