Thematic Formatting

Thematic formatting is the process of automatically coloring objects in drawings based on the value of data fields in tables associated with the drawing. This capability is called "thematic mapping" in some GIS systems. Manifold refers to the process as thematic formatting since is simply changing the formatting of objects in a drawing or a map based on the value of a data field.


Manifold can use thematic formatting to automatically change:


·      Foreground color

·      Background color

·      Style

·      Size

·      Rotation (for point styles and labels)


All four of the above formatting characteristics may be simultaneously changed via thematic formatting at the same time for areas, area borders, lines or points. In one drawing, for example, the foreground color of areas may be changed using one field while the style of areas may be changed using a different field. In the same drawing the style and size of points may be changed using other fields.


Uses for Thematic Formatting



Change Foreground or Background Color: Color adjacent areas in maps with different colors so they more obviously stand apart. This effect uses the Color dialog for drawings.



Change Size: Make points larger or smaller automatically to show larger or smaller populations, profit, number of customers or other data.



Change Color: Color countries, provinces or other regions to show differences in population or other data fields.



Change Point Style: Change point styles to show different characteristics at different locations. See Custom Point Styles for information on adding point styles created from images like those seen above.



Change Area Style: Change area styles to set areas apart or show trends with different patterns.



Change Size: Make lines thicker or thinner to show differences in data such as traffic volume associated with each line.


All of the above illustrations are the same map and the same data with different thematic formats.


Thematic formatting chooses a data field associated with the drawing and then assigns all the objects being formatted into the desired number of intervals based on that field. Objects can be assigned to intervals using several different methods. We can then specify how each interval should be formatted.


To Create a Thematic Format


1. Choose the drawing to be formatted by clicking it open or by clicking on its layer in a map.

2. In the Format toolbar , click on the display characteristic to be formatted: for areas, lines or points choose the foreground color, background color, style or size.

3. In the pull-down choice dialog that appears, choose Theme.

4. In the thematic formatting dialog, choose the controlling Field to be used.

5. Choose the Method to be used to construct intervals. Equal Count, for example, will assign approximately the same number of objects to each interval.

6. Choose the number of Breaks between intervals. This specifies the number of intervals as well.

7. Change the Align to value if even numbers of tens, hundreds, thousands, etc, values are desired for intervals. Change the Range if the default entire range needs to be extended or contracted.

8. Press the Tally button to create the given number of intervals. If interval numbers different than those created by the Method are desired, double-click into the interval numbers to change them.

9. Either use a preset color palette or click into the interval color boxes to change colors to whatever range is desired. To use a palette, select it in the Palette box and press Apply to apply the preset to the intervals. Check the Preview box to try out different combinations and see how they look in the drawing without committing the changes.

10. When satisfied, press OK.


When a formatting characteristic, such as foreground or background color, style, size or rotation has been thematically formatted the corresponding color or sample well in the format toolbar will change appearance to show that characteristic is now specified by a thematic format.


images\btn_thematic_color_eg01.gif images\btn_thematic_color_eg02.gif Color samples, like the two different examples shown, will attempt to show the range of colors used in the thematic format. Obviously, there is not enough room in a small toolbar sample to show many colors, so not all colors in a complex format will appear. The idea is to provide enough colors to refresh our memory of the thematic format specified.


images\btn_thematic_style_eg01.gif Characteristics such as style or size will be represented by the thematic format icon. When we see this icon in a format toolbar we know that the corresponding formatting characteristic is specified by a thematic format.


Thematic Format Dialog


The thematic formatting dialog is used to apply colors, styles and sizes automatically based upon the contents of a controlling field. Not all controls will be enabled for all types of formatting. For example, when changing styles or sizes the Interpolate, Lighten, Darken and Grayscale controls will not be enabled.




In the Values pane the numbers at left are the numeric breaks between intervals. The color wells at right show the coloration that will be applied to each interval. The small numbers immediately to the left of the boxes show how many objects fall into that interval. In the example above we thematically format provinces in Mexico by their populations using the Spectrum palette. The Natural Breaks method has assigned 7 provinces to the interval containing provinces with populations less than 580000 and only 3 provinces occur in the interval from 580000 to 1051000. There are 11 provinces in the next interval and so on.


The (default) color well shows the color that will be used by default for objects that are newly created that do not fit into any of the existing thematic categories. This is most important in cases where a thematic format has been created based upon individual values and then, after the format has been created, a new value is introduced when a new object is created.


Thematic Format Dialog Controls



The data field that controls the thematic format. All data fields available with this drawing will be available in this list box. Also available will be intrinsic fields that are automatically computed by the system.


The method used to classify records into different intervals.


Preset color combinations that may be applied to intervals. Press Apply to apply the palette to the selected intervals. Palettes are scalable and will be interpolated to apply the color range to a greater or lesser number of intervals.


Apply - Apply the chosen palette to the Values pane. This allows scrolling through the palettes without changing colors until we press Apply. Pressing Apply only changes the color scheme in use for values. It does not change the thematic formatting of the drawing until the OK button is pressed. To see a preview of how the applied colors will look, use the Preview check box.


Reverse - Reverse the formats used in the values box from high to low.


Interpolate - Change the colors or sizes used in the values boxes by interpolating between the top and the bottom boxes. A quick way of creating smooth gradients of colors or sizes.


Lighten - Lighten all colors. Each click on the Lbutton lightens the colors a bit more.


Darken - Darken all colors. Each click on the button darkens the colors a bit more.


Grayscale - Convert all colors to grayscale.


Move Up - Enabled when the Unique Values method is used and an interval (value) has been selected. Move this value up in the range of intervals shown.


Move Down - Enabled when the Unique Values method is used and an interval (value) has been selected. Move this value down in the range of intervals shown.


Load from File - Load a previously saved theme from an XML file. Works with all field types except lookup fields. See the Custom Palettes and Themes topic for information on how the XML file is structured.


Save to File - Save this theme to an XML file. Works with all field types except lookup fields. See the Custom Palettes and Themes topic for information on how the XML file is structured.


A display of intervals created using the specified Method. The Values pane is updated with each press of the Tally button. If a Palette is used, the color wells will be updated with each press of the Apply button. The values may also be changed by double-clicking into any value to edit the number. The (default) color well allows editing the default value that will be applied to any objects outside the thematic format specified, such as, for example, if a new object is added with a value outside the range of a range of Unique Values that have been specified.

(interval numbers in the Values pane)

Double-click on an interval number to set it manually. For a different arrangement of intervals, choose the desired Method and the desired number of Breaks and press Tally.

(color wells in the Values pane)

Double-click on a color, style or size sample to change it. Choosing a Palette and pressing Apply will apply the palette colors to the Values pane's color wells. Press Interpolate to create a smooth gradient of color from the topmost well to the lowest. Press Reverse to reverse the order of colors.

Continuous Shading

Interpolate colors shown in the wells so that values between the numbers shown for the intervals will result in color shades that are taken from a continuous gradient of color.

Align to

Select the number of digits to align Values to even values of tens, hundreds, thousands, etc.


Shows the lowest and highest values that occur in the controlling field. Change the values to specify the range over which intervals will be tallied. Values outside the range will be assigned to uppermost and lower intervals that bracket the intervals over which the method specified is tallied.


Reset the Range to the lowest and highest values that occur in the controlling field.


The number of breakpoints between intervals.


Re-compute intervals by specified method using given number of breakpoints.


Temporarily shows the effect of the format when Apply is pressed.




Equal Count

Assign interval values so that each interval contains the same number of objects.

Equal Intervals

Assign interval values so that each interval contains the same range of values.

Exponential Intervals

Assign interval values so that each interval contains an exponentially increasing number of values.

Natural Breaks

Find clusters or groupings of objects by the given field and assign break values so that each cluster is in a different interval.

Standard Intervals

Choose break values so that each interval represents one standard deviation.

Unique Values

Used with text and enumerated fields. Assign a break value for each unique value that occurs in the field.


Thematic Formatting Capabilities


Thematic formatting uses data fields to independently control:


·      Foreground color

·      Background color

·      Style

·      Size


The above characteristics may be thematically formatted independently for areas, lines and points. In effect, it is as if we can set twelve different thematic formats for each drawing (four different types of formatting characteristics times three types of objects results in twelve different thematic formats available per drawing). If desired, we can use one data field to vary the size of points, another data field to vary the color of the points and yet a third field to vary the style of point used.


For example, we can increase or decrease the size of points representing cities based on the value of their population fields. The greater the population, the larger the point.



The illustration above shows cities in Texas where each city has a population field in the associated table. In the default format all points are the same size.



If we click on the Size button for points in the format toolbar and then choose Theme we can alter the size by the population field. Manifold will draw thematically formatted points by drawing the largest points first and then the next largest and so on to the smallest so that the smaller points are not covered by the larger points.



If we click on the Background Color button for points in the format toolbar and choose Theme we can also alter the background color of the points by their population. This results in a map where both the size of the point and the color of the point are changed depending on the population.



If desired, we can change Style with a thematic format. This is handy when preparing maps for black and white printers. Style can also be used to automatically vary point and line styles as well as area styles.



All of the different characteristics at once can be thematically formatted. The above illustration shows foreground color, background color and style thematically formatted. To assure that maps do not confuse the viewer it is usually wise to use the same data field in the same manner for all thematic formats applied to the same class of objects. That is, if thematically formatting the background color in areas based on a state's population, refrain from simultaneously thematically formatting the foreground color using the number of houses in the state.


The Controlling Field


Thematic formatting works with drawings that have a table associated with them. The thematic format is controlled by the value of a specified field in the table. This field is most often a numeric field, but it can be a text or other type field as well. Intrinsic fields will appear in the list box as available choices for controlling fields. Intrinsic fields are automatically computed by Manifold for each object in the drawing.


Intervals are created and objects are assigned to them using the given method. For example, the intervals can be created with breakpoint numbers so that each interval ends up with an equal number of objects. This is a useful method to use if we wish to avoid a situation where there are six intervals / color settings but all the objects end up in only one interval so our map is colored with only one color.


If the controlling field is a text field the only choice available for methods is Unique Values


Breaks and Intervals


Thematic formatting divides the objects into intervals that are set by the number of breaks. Each break is a value that specifies between the border between two intervals. The minimum value and the maximum values are always taken from the lowest and highest value in the data set. The break point values specify how the range from minimum to maximum is to be split up into intervals.


The following examples use a map of the United States that's linked to a table that has a series of fields giving educational achievement for each state. We will use a field that gives the percentage of the population that has advanced degrees (that is, some graduate degree beyond college).





If we specify three breaks as shown above we end up specifying four intervals. The first interval is the range from the minimum value in the table (the red box) to the first break point (at about 7.63%). The red color will be used to color the first interval. The blue color will be used to color the second interval starting at the blue break point of 7.63% and so on.


Methods: Automatically Choose Break Values


Once we choose the number of breaks we want we can either have Manifold choose the values for each break point or we can set the value for each break manually. Manifold has several different methods it can use to automatically choose values for each break.


The numbers for the three breaks shown above were computed by Manifold using the Equal Intervals method. This method chooses numbers for the breaks such that the total range from minimum to maximum value for the controlling field is split into intervals of equal size. In this example, because we have four intervals each equal interval represents one quartile of the distribution of values in the range from minimum to maximum.




We've added the boxes and color bar to the illustration above to illustrate how colors are used within intervals.


The red box shows the interval from the minimum found in the data set (in this case, about 4.45% of the population) to the first break at about 7.63%. The minimum, red color is used to color states from the minimum to the first break. From 7.63% onward the blue color specified at the 7.63% break is used to color the interval. The green color specified for the second break takes over at 10.82% and is used to color objects until we get to the third break, after which yellow will be used.


Note that the Equal Intervals method makes the intervals the same size: that is, the range from 7.63 to 10.82 is the same size as from 10.82 to 14.01. In this example, because there are four intervals each equal interval represents one quartile. The number of objects in each interval can be quite different. In the above map, there are very many states with educational attainment in the lowest interval. There is only one "state," the District of Columbia in the last interval. Yellow does not appear in the above map because the District of Columbia is too small to be visible at the zoom level shown.


Applying Palettes


The Palette box contains color schemes that may be applied to color wells in the Values pane.




The default theme uses default color for all intervals.




images\btn_theme_apply.gif To apply a palette, choose it in the Palette box and press Apply. In the example above we have chosen the Savannah palette and will now press the Apply button.




Colors will be applied to the interval color wells as seen above. Palettes will usually have a wide range of colors available. Only some colors from the palette will be used if the number of intervals is small.


images\btn_theme_reverse.gif To change the order in which colors are used we can press the Reverse button.




The Reverse button reorders the colors so that the uppermost color is now the lowest and vice versa. Note how the blue color well is now at the bottom of the range.


images\btn_theme_interpolate.gif We can also use the Interpolate button to rapidly create a gradient of colors from white to blue.




Interpolate is a handy way of creating gradients. It creates a smooth range of color from the top box to the bottom box. A rapid way of creating custom gradients is to double-click into the top box and choose a color and then choosing a color for the bottom box and pressing Interpolate. The Interpolate button works for colors and size gradients but does not work for styles.


Rounding Intervals with Align to


We often would like to have intervals that begin and end at even number values. This can be accomplished with the Align to setting.




To align intervals to even thousands, for example, we choose 3 digits in the Align to box and then press Tally.




The interval numbers will be changed to even thousands and the objects in each interval will be re-computed using the method assigned, as adjusted for the aligned values of the intervals.


Very important: Re-tallying intervals, even by just aligning them to even numbers, requires a re-application of the color intervals. For example, the illustration above was created by reapplying Interpolate after changing the Align to value. The usual workflow is to create the intervals desired (including any Range, Breaks and Align to options) and then apply colors.


Lighten and Darken


Some of the standard palettes provided may result in garish colors depending on the setting. For example, the Spectrum palette provides a continuous range of rainbow colors that may be too bright in some drawings.


images\btn_theme_lighten.gif Use the Lighten button to automatically lighten colors.




images\btn_theme_darken.gif Use the Darken button to darken colors.


Using Range


An important use of Range is to assure that two drawings that appear together in a map have the same formatting over the same range of values. By default, Manifold takes the lowest and the highest values that occur in a drawing and uses those values to compute methods. Using Range can override these values.


Suppose for example we have a drawing of counties in California with a percent achievement scale on a standardized test where each county has a value on a scale from 0% to 100%. Suppose we also have a drawing for Oregon with results from the same test.


If the California drawing has test results that range from 5% to 85% and we thematically format it using Equal Intervals into 4 breaks the default formatting calculation will use the range 5 to 85. Using this range will create 4 intervals of 5 to 25, 25 to 45, 45 to 65 and 65 to 85.


If the Oregon drawing has test results that range from 10% to 90% and we thematically format it using Equal Intervals into 4 breaks the default formatting calculation will use the range 10 to 90. Using this range will create 4 intervals of 10 to 30, 30 to 50, 50 to 70 and 70 to 90.


If we use the same colors for both California and Oregon, counties with a test result of 27% will have different colors in the California and Oregon drawings, providing an inconsistent visual presentation if the two drawings are shown together in a map. We can avoid this inconsistency by telling Manifold to use a Range of 0 to 100 when thematically formatting the California and Oregon drawings.


If we use a Range of 0 to 100 and Equal Intervals with 4 breaks then each break will be the same in both drawings. Each drawing will have 4 intervals of 0 to 25, 25 to 50, 50 to 75 and 75 to 100 and all counties in both drawings will be colored using the same scheme.


Another use for Range is to exclude unusually high or low values from the main thematic coloring. For example if we have a lot of data that is evenly dispersed through the range 30 to 80 and but a handful of scattered values from 0 to 30 and from 80 to 100, we might tell Manifold to use an Equal Count method using a Range of 30 to 80. Intervals will be assigned so the bulk of data is divided into even intervals between 30 and 80 with the scattered values in the lowest and the highest intervals. The lowest and highest intervals can then be clicked by hand and changed to less prominent colors.


Continuous Shading


If we check the Continuous shading box, the color for each state will be drawn from its field value as interpolated between the colors specified at the breaks.




Without checking the Continuous shading box, all states use one of the colors specified for the intervals. Without the Continuous shading box checked it looks like the entire country is not highly educated with California, Colorado and New Mexico in the West and a handful of states in the Northeast providing some slightly elevated educational achievement. A very few states in the East have educated populations shown in green color.




When the Continuous shading box is checked, each state gets a color that is interpolated between the colors specified for each break. The Continuous shading box allows us to specify a relatively small number of breaks and colors yet still see some visual differences within the intervals. Using continuous shadings is the reason we have a color box available to set the color value for the "maximum" value. This box is used only when the Continuous shading box is checked since without continuous shadings each interval is colored with the color box of the break point that starts the interval.




With the Continuous shading box checked we see that the situation is more complex that it initially appeared. Most states are still in the low-achievement range with Arkansas leading the way in low educational achievement. The blue states are now seen to divide into two classes of states: lower-end states like California that are more like the low-achieving mass of states, and a few higher-end states like Colorado, Virginia, New York and Massachusetts. States in the latter group have more in common with highly educated states like Connecticut than they have with California. That they were grouped by color with California is an accident of choosing three break points to divide the entire range into four equal intervals.





A better way to reveal groupings is to use the Natural Breaks method. This method allows Manifold to find clusters of similar values within the field and to choose break points so that each cluster is in an interval. The above example shows Natural Breaks working with 5 breaks to create six intervals.


The natural breaks thematic map shows the highly irregular distribution of populations with higher education in the US. Most states fall into one of four groupings having less than 7% of the population having higher degrees. For the most part, states are clustered into different levels of mediocrity around the 5.7% level. A handful of states fall into a cluster above 8.27% and are shown in green.


The Manifold Natural Breaks algorithm works remarkably well. People who are familiar with these states would say that California, Washington, Illinois and New Hampshire are definitely in the same bucket when classing states by percentage of highly educated people. Note: the educational attainment thematic maps shown in this topic are based on Census Bureau percentages of advanced degrees in 1990.


Interval Styles in Legends


Legends will automatically adapt to the status of the Continuous shading box.




Legends for thematic formats not using continuous shading will show the range of values to which each color applies.




If the Continuous shading box is checked the legend will show the discrete values and colors between which a continuous range of colors is interpolated.


Automatic legends will use the same number of digits beyond the decimal point that are specified for that column in table column formatting.


Example: Use Thematic Formatting to Show Territories


Suppose we have a Territory field in our table of US States. This is a text field and contains the name of the sales territory that includes that state. Sales territories have names like "Northeast" and "West Coast".


Step 1: Click open Thematic Format Dialog.


Click open the drawing to be formatted, or click on the drawing's layer tab in a map to make it the active layer. Click on the format toolbar's Background Color well for areas. Choose Theme to launch the thematic formatting dialog.


Step 2: Choose the Controlling Field and Method




In the thematic formatting dialog, choose Territory as the controlling field and Unique Values as the method. The breaks and intervals part of the dialog will automatically change to the list of unique values found for the territory field. There are only six different strings (that is, six different territories) found in this particular example.


Step 3: Choose Colors to be Used




Double-click into each color well and choose a color or use one of Manifold's preset color arrangements. Click OK.




The resultant thematic format colors the background colors of each state area by the value found in the Territory field.


Example: Use Thematic Formatting to Show Population


We open a drawing of Mexico showing provinces.




The drawing's table has a field called Population that we would like to use to color the provinces by their populations.




The "body" color of the provinces is set by their background color. Click on the format toolbar's Background Color well for areas. Choose Theme to launch the thematic formatting dialog.




Choose Population as the controlling Field. Choose Equal Count as the Method. This will assign approximately the same number of provinces to each population interval. Choose the Red to Yellows palette and press Apply.




Those are nice colors, but we note that the lower population intervals are colored red and higher population provinces will be colored yellow. We would like to reverse this so that provinces with higher populations will be colored red. To do so we press the Reverse button.




From experience we know that the very bright colors used in the Reds to Yellows palette will result in a garish map. To lighten the colors we press the Lighten button twice.




That results in a more muted palette that will still show variations in the provinces well.




The final product is a drawing of Mexico that shows provinces colored by the contents of their Population field. Provinces with higher populations are colored red. Those with lower populations are colored yellow. Right away it is obvious that much of the population of Mexico is clustered in a small band of provinces in the middle of the country. Regions such as southern Baja California and the provinces to the East are less populated.


Fixed Interval Palettes


Palettes in Manifold occur in two forms:


·      Relative palettes, where colors from the palette will be "stretched" and interpolated as necessary for use in the number of breaks specified in the Format dialog. The examples above all use relative palettes.

·      Fixed palettes, where colors are associated with specified intervals. When a fixed palette is used in thematic formatting, applying the palette will automatically create as many intervals as are required by the numbers specified for the palette.


Fixed palettes are most frequently used to color surfaces that show terrain elevations. They allow a standard color scheme to be applied for specific elevations that is the same from surface to surface. Manifold includes a few fixed palettes for use with surfaces. Altitudes are predictable since the general elevation of the Earth is known and covers a fairly narrow range. Standardized palettes may therefore be created for altitudes and incorporated into Manifold.


Fixed palettes are less frequently used with thematic formatting in drawings since normally the range of values that may be displayed in thematic rendering covers a very wide range. It is usually faster to create fixed intervals by specifying the Breaks option, tallying the desired number of intervals and then applying a relative palette. We can then "clean up" the breaks to desired interval numbers.


However, for some applications such as land classification a specific, fixed palette may be desired for use in thematic formatting. Use the customization features noted below to create fixed palettes that have ranges of values that correspond to colors desired.


Saving and Loading Themes


images\btn_save.gif Press the Save button to save a theme to an XML format file. Themes for color, size or style may be saved.


images\btn_open.gif Press the Load button to load a theme from an XML format file. When attempting to load a theme file for a different type of theme (for example, trying to load a theme file that saved a thematic format for different point styles when working in a thematic format dialog to set color) the system will load the formatting breaks from the saved theme and will reset formatting to default.


Loading a saved theme file will also reset the Method to a method that makes sense for the type of field (column) being used as follows:


·      When loading a file containing value-based formatting such as Unique Values the system sets the formatting method to Unique Values since this method is supported by columns of any type.

·      When loading a file containing interval-based formatting such as Equal Intervals the system checks if the current column supports interval-based formatting (that is, if the current column is not a Date, Text or Boolean type field) and if the current formatting method is value-based. If so, it sets the formatting method to Equal Intervals.




Palettes used in thematic formats may be customized, and new palettes may be added to Manifold. See the Customization topic.



The Color Dialog


The Color dialog makes it easy to automatically apply a thematic format to a drawing that colors each adjacent area using a different color.


When applied to a drawing that contains adjacent areas, the color dialog will add an integer field called Color to the table. (If a field exists that is already named Color the system will create the new field using a name like Color2). The drawing is then examined using Manifold's internal graph theoretic algorithms to assign a small number to each area in the Color field so that no two adjacent areas have the same value in their Color field.


The Color field is then used in a thematic format to specify both foreground and background color. The colors used are made slightly darker in the foreground color so that the borders of area styles will be distinct.


It's easy to change the color scheme after applying the color dialog to automatically color areas. Simply click on the color well to be changed for areas and choose theme and then apply one of the preset color schemes. The color applied by the color dialog is simply a thematic format using the Color field with a unique values method.


Note that the word theme is used both for the application of a palette of colors to a drawing or a theme and is also used as the name of the theme component. We apologize for this minor lexicographic inconsistency, but it seems clear which is which in actual usage.


ColorBrewer Palettes


Users with experience in thematic formatting know that it can be sometimes difficult to choose colors for thematic formatting that do not result in a miserably garish display. Manifold includes ColorBrewer palettes, beginning with a CB in the name of the palette, which are arrangements of colors that have been cleverly picked by Cynthia Brewer to work well together. Using one of the CB palettes almost always results in a pleasant and legible effect. See the Miscellaneous topic and for more info on the ColorBrewer project.


The CB palettes are each designed with a fixed number of colors, the number of colors being indicated by the number at the end of the palette name. For example, CB Pastel 4 is a palette of four colors. The number of colors should be the same as the number of breaks used in the thematic format. So, for example, if we use the default 5 breaks when formatting a map by, say, population using the Natural Breaks method we should use CB Pastel 5 as the CB palette so that there are five colors in use.


See Also


See the Color topic for fast "four-color" coloring of drawings.


Thematic Formatting Example

Thematic Formatting and Labels

Rotating Labels