Subscribe to the GIS Tools mailing list, one of several low volume mailing lists alerting you to changes to this site.

Your email address:

 More Info
Scalebar Docs
· Introduction
· Selecting a Style
· Positioning the Scalebar
· Specifying Units
· Displaying the Scale As Text
· Controlling the Number of Intervals
· Text Attributes
· Scalebars With Multiple Units
· Adding a Wrapper to Your Scalebar
· The Scalebar Gallery
Download the AML
Home Page | GIS Tools | Resume | Travel | Site Map
gis tools

Specifying the Number of Intervals on your Scalebar

A very important factor in how your scalebar looks is the number of intervals drawn. The Ultimate Scalebar has two basic classes of scalebars, and the number of intervals is calculated differently for each.

  • Full Interval: Bar styles 1, 3, 5, 6, 7, and 8. The number of intervals is the total number of sections that appear on the scalebar.

    8 Intervals
    This scalebar has 8 intervals.

  • Split Interval: Bar styles 2 and 4. The number of intervals is the total number of sections that appear on the first half of the scalebar.

    4 Intervals
    This scalebar has only 4 intervals.

You can specify the number of intervals on your scale bar by setting the global variable .scalebar$intervals before running the AML. If this variable is not set, then a default value of 5 will be used.

Controlling Which Numbers Appear

In conjunction with the number of intervals, you can control what values will appear as your major scalebar label, the largest number appearing on your scalebar. For example, if you want only to see a multiple of 10 as the major scalebar label, then you can set .scalebar$validintervals to 1 or 10. If you want to allow the program to have more flexibility in choosing a major scalebar interval, which will allow the scalebar to be drawn closer to your specified length, you could set .scalebar$validintervals to a space-delineated list of values, such as 1 2 4 6 8. If you change the default valid interval list to one incompatible with the number of intervals on your scalebar, you may get unaesthetic decimal numbers appearing on the minor intervals.

Generally, the fewer numbers you allow to serve as your major scalebar label, the less flexibility the program will have in rendering your scalebar, so the more your actual bar length may differ from what is specified on the command line.

Ultimately, the choice of intervals and values are a matter of aesthetics. Some good combinations of values for .scalebar$intervals and .scalebar$validintervals that I have found are summarized in the following table:

5 or 10 1  2.5  5  7.5
2 or 4 or 8 or 16 1  2  4  6  8
3 or 6 or 9 or 12 3  6  9
2 or 4 or 5 or 10 1  2  3  4  5  6  7  8  9

Top of page | Next: Changing Text Attributes
Green Tea

Comments or questions to: