Thematic formatting is a GIS term that means "changing the format based upon the value of a field." In Manifold, whenever we click a style property button we can choose a field that will control that style property. We can vary by field any style property, such as colors, size, rotation, symbol, or even combinations of different properties.
A classic example using Fill Color is to vary the color of objects depending on the value of a field. At the left above, we see areas in Mexico that all use the same Fill color. At right, we see areas in Mexico where each area has a different Fill color depending on the Population field for that area, using a spectral palette where blue colors are less population and red indicates greater population.
A classic example using Size is making city points bigger or smaller based upon the population of the city as shown in the Example: Format the Size of City Points by Population topic.
Open the drawing or click onto the drawing's tab in an open map window.
Open the Style pane.
Click the button for the style property to be changed.
Click the pull-down menu for fields, choose the field to control thematic formatting.
Choose the Method for grouping records.
Choose the number of Breaks, that is the number of intervals for formatting.
Press Tally to generate a list of intervals in the pane below.
For each interval row, double-click into the sample (color, symbol, or number) and enter the desired value for that interval, OR...
To apply a palette if thematically formatting colors, press the Palette button and choose a palette.
Press Update Style to apply the thematic format to the drawing.
The default desire in most cases is to simply click a button and to change a style property. Therefore, clicking a style button by default will show a drop down menu providing typical, one-click choices. To see a field choice box allowing choice of a field for thematic formatting, simply click back into the Style pane outside of the drop down menu.
If we have already applied a thematic format to a style property we usually want to tinker with that thematic format, so clicking a button that has a thematic format on it will immediately display the thematic format arrangement. We can get a drop down menu with one-click choices by just clicking the button a second time.
To choose a field that will guide thematic formatting, click into the field picker box, initially loaded with (no field selected) and choose the desired field. The drop down menu in the field picker box will be loaded with all of the fields in that drawing's table that can be used to control formatting. When we choose a field, the pane will be populated with additional controls that allow us to choose how that field should control that style property.
Clicking a style property button and then choosing a field in the field picker box will automatically configure the Style pane with thematic formatting controls that make sense for the data type of that field. For example, if we choose a field that contains text, then only unique values will be available as a method since numeric methods such as exponential intervals do not make sense with text.
To create the display above, we apply a thematic format to the Fill color as shown below. This is the simple case of varying only one style property at a time. Later, we will see how to vary multiple properties at a time using a field.
The following controls appear when a field is chosen to control a given Style property.
Buttons without any extra sub-icons apply that same setting throughout the entire layer. Clicking the button will show a drop down menu providing typical, one-click choices. To see a field choice box allowing choice of a field for thematic formatting, simply click back into the Style pane outside of the drop down menu. |
|
Buttons that show a small "field" sub-icon have their style property controlled by a field, using thematic formatting. The color, symbol, or number shown as a sample is the first style in the range of thematic formatting styles.
Clicking the button will show the thematic formatting arrangement and controls in the Style pane. To get a drop down menu providing typical, one-click choices, simply click the button again. |
|
Field |
The field that is the source of the values to be used in the thematic format. Choose a field from the drop down menu to display controls for thematic formatting.
The Field box lists felds from the drawing's table in alphabetical order. In lists with many fields, keyboarding the first letter of a desired field will jump to the first field name in the list that starts with that letter. |
Method |
The method used to classify records into different intervals based upon the value in the Field for each record. |
Range |
The range over which intervals will be computed. An arbitrary range may be specified to allow choice of methods such as equal intervals in anticipation of records to be added that fall outside the range of values within existing records. |
Breaks |
The number of intervals to compute. |
Tally |
Compute the number of intervals and values to use for the bounds based on the Method and the number of Breaks. |
Fill |
How values found in the records should be assigned, that is, filled into, the intervals in which they occur. See the examples for Fill rules below. |
Palette - Choose a palette to apply to color wells in the intervals. Enabled only if a color style property is part of the thematic format. |
|
Delete - Enabled when one or more rows in the Intervals List are selected. Deletes the selected rows. |
|
Refresh - Enabled when statistics have not been computed for intervals. Click to manually compute statistics, such as the number of records or percent of records in each interval. Normally only enabled for very big data sets, where it makes sense to hold off on computing non-essential information until actually desired. With smaller data statistics are computed so fast we do not notice. |
|
Fill |
How values found in the records should be assigned, that is, filled into, the intervals in which they occur. See the examples for Fill rules below. It is only a coincidence that the same word, fill, is used for this caption as is also used for the Area Fill Color style property. |
<Intervals List> |
Thematic formatting works by grouping data into intervals using the specified number of Breaks and the desired grouping Method. Each interval, that is, group of records, can then have the desired format assigned to it. The Intervals List shows all intervals produced by the Tally button for the specified Method and number of Breaks. Each interval shows the color or other style property to use for that interval. Intervals may be manually edited, deleted, or added. |
<Selecting interval rows> |
Ctrl-click an interval row to select that row. Shift-Ctrl-click to select all rows in a swath to the last selected row. Ctrl-I to invert selected status for all rows. Ctrl-A to select all rows. Shift-Ctrl-A to deselect all rows. |
<Right-click a selection> |
Right-click a color well in a selected row to call up a context menu to apply changes to all selected rows. Typical choices for colors include:
|
<Click a sample well> |
Click on a sample well to apply a color or number to clear any thematic format in use for that style property and instead to apply a fixed color or number. Changing a sample well, such as a color, for an interval row will apply that change to all selected rows. |
Update Style |
Apply any changes to the drawing. To apply a thematic format once we are happy with all settings we must click the Update Style button. |
In the illustration above, we clicked the Fill color button for Areas and then chose the Population field as the Field. We choose natural breaks as the Method with six Breaks. When we pressed the Tally button, the system arranged the data into six intervals, with each interval bounded by the population numbers given.
We then clicked the palette button to apply a colorful palette (CB Spectral) to the color wells, to set the color automatically for each interval from the palette without having to manually choose the color for each interval.
When we press Update Style to apply a thematic format for the first time, the Style property button will switch to show the first color in the thematic intervals together with a small "field" sub-icon. The sub-icon indicates a thematic format controls that Style property. The first color from the thematic format list is used as a sample color in the button. There is no attempt to show a "palette" effect in the button because it is too small to show a useful range in cases where the thematic format is a range of numbers, as in sizes, or a range of symbols.
First color applied to exceptions: The first color will be applied to any objects that do not fit into the specified intervals, which is also a reason the first color from the thematic intervals is used in the style button. Objects might not fit for a variety of reasons, for example, in the case of thematic field values that are NULLs. Another example is in the case of unique values formatting, if an object was added after the unique values thematic intervals were specified and the object has a field value that is not one of those specified unique values.
The Fill method interpolate means that for population values that fall between the numbers that bound each interval the color used will be smoothly interpolated between the samples given for the bounds. For example, areas with populations between 1660800 and 2620600 will be displayed in shades of color interpolated between pale green and orange according to their populations.
When we pressed the Update Style button, the thematic format was automatically applied to color all areas in the Mexico drawing by their populations, interpolating colors from the palette intervals for each individual area in accordance with its population. Once we get familiar with thematic formatting we can apply such thematic formats in a matter of seconds.
For a detailed example, see the Example: Style Pane Quickstart topic, which provides a step-by-step, tutorial introduction to using the Style pane to apply color, symbology, size and rotation to areas, lines and points in drawings.
Using illustrations from the Example: Format the Size of City Points by Population topic we can show how the context menu pops up when right-clicking color boxes within selected intervals, showing how to reverse the order of colors for intervals.
We click anywhere in the intervals list to make sure the keyboard focus is on that list, and then we press Ctrl-A to select all intervals. Next, we Right-click onto any of the color wells to call up a context menu of commands to apply to the color wells.
We choose Reverse in the context menu. That reverses the order of colors in the intervals, putting blue at the top and red at the bottom. We press Update Style to apply the change.
Coloring the border of an area a slightly darker version of the fill color is such a common task that we can apply a palette to both Stroke and Fill colors simultaneously, automatically applying a darker version of the colors to the Stroke color.
Consider a drawing of areas, as seen above, taken from the Open Street Map PBF format file showing building footprints in Boston, as used in the PBF .pbf, OSM, O5M topic. By default, the areas use a border that is black stroke color, of thickness 1 point, with a light gray fill color.
Using Style, we can click on the Symbol button for areas, drill down into the dialogs, and change the Stroke width from 1 to 2 to make the area borders thicker. We normally would prefer thinner area borders, but for the sake of this example a thicker border line more clearly shows the border color.
In the Style pane, we click on the Total Style button to specify multiple parameters at once. We choose the id field to specify a thematic format based on that attribute field. At this point we could double-click into each of the area samples in the intervals list to specify multiple style parameters at once. Or, as seen above, we can choose a palette and that palette automatically will be applied to both stroke color and fill color.
We choose the CB Paired palette and immediately see a preview of how the areas will look, with the Fill color using the palette's colors and the Stroke color using a slightly darker version of those colors. We press the Update Style button to apply that Style to the drawing.
The drawing immediately is re-displayed to use the specified palette colors, with the Fill color in the areas being the colors specified by the palette, as interpolated to match each id value, and the Stroke color for each area being a slightly darker version of the color. For example, we can see in the green areas how the borders are a darker green shade of the green color used for fill.
Back in the Style pane, if we like we can click on the Stroke color button for areas and then click on the Fill color button for areas to see the colors that have been assigned. When we chose the CB Paired palette for the Total Style thematic format, the system automatically assigned the desired colors to both Stroke color and Fill color thematic formats.
We may edit the bounds which define intervals as follows:
Edit a bound by double-clicking onto the number to change it. Press Enter to accept the edit.
Delete a bound, and thus the interval for which it is a bound, by Ctrl-clicking the row to highlight it. Next, press the Delete key to delete the row.
Add a bound by clicking the asterisk * character in the last row and then double-click in to open an editing box that allows specifying a value for the new bound. Enter the value and then press Enter to create a new bound and thus an additional interval.
For a step by step example of the above see the Example: Add, Delete and Edit Thematic Formatting Intervals topic.
When varying formatting it can be confusing to use too many different formats in the same drawing. For example, if we have 1000 cities each with a different population then attempting to use 1000 different values of Size for the city points would result in too little visual difference in most cases to provide the visual distinction desired. We therefore normally group cities into five or six groupings based upon the controlling population field and then assign a Size to each such interval. That will result in the use of only five or six different sizes of points in the drawing so it will be immediately clear which cities are larger and which are smaller.
equal intervals |
Calculate bounds so each interval spans approximately the same part of the total range of values that occur in the field.
For example, given a Range of 0 to 100 with Breaks equal to 6 the five intervals thus created would be 0 to 20, to 40, to 60 to 80 and finally to 100. Each range would interval would be about the same size, a difference of 20 in range. |
equal count |
Calculate bounds so each interval contains about the same number of records.
For example, if many values of the given field were evenly scattered between 0 and 25 but only one record had a value of 100, creating five intervals with equal count could create intervals from 0 to 5, to 10, to 15 , to 20 and then a final interval to 100. The final interval would be a range of 80 values but it would still contain a count of records equal to the other four intervals which each covered a range of only five values. |
exponential intervals |
Assign interval values so that each interval contains an exponentially increasing number of values. |
natural breaks |
Find groupings of values by the given field and assign bounds so groups of values tend to fall into the specified number of breaks. |
standard intervals |
Assign values of bounds so that each interval represents one standard deviation. |
unique values |
Given the number of breaks, find the most frequently occurring unique values within that number. For example, if we have 5 breaks the five most frequently occurring values will appear as intervals. Manifold allows up to 100 unique values as breaks. |
The method we use to classify records into different intervals depends upon the contents of the data and upon our tastes and intent as to how we want to use the formatting characteristic used in the thematic formatting.
Tech Tip: If we want to assign an individual value for a Style property such as Fill Color to each record we can choose equal intervals as the Method with two breaks and then use interpolate as the Fill rule. A continuous range of colors interpolated between the two colors will be assigned.
Consider a drawing of cities thematically formatted by population where intervals have been computed using the equal count method, with the intervals list as follows.
Intervals in the list are defined by the lowest value found in the data at the top of the list, the highest value found in the data at the bottom of the list with intervals in between such that each interval's lowest bound is the value given for that interval. Each interval starts with the lower bound given and then continues up through increasing values of the field in the data until we hit the next defining value, which is the lowest bound for the next interval.
In the illustration above the lowest value found in the data is 20000. That interval, assigned a light blue color, continues upward from the lowest value until we hit 24900, which is the lower value bound for the next interval, assigned a green color. That interval continues until we hit 33300, the lower bound for the interval colored yellow. That interval continues until we reach 50200, the lower bound for the last interval that has been assigned a salmon color. The last interval starts at that lower bound of 50200 and continues up to the largest value in the data, 2125200. By default only that largest value will be colored red. By default, all values less than the very largest, even just one less at 2125199, if such a value existed in the data, would be colored using the salmon color assigned to the last interval that starts at 50200.
Fill Rules specify how values found in the data between those values which specify the bounds of intervals such as the numbers 20000, 24900, 33300, 50200 and 2125200 seen above. Fill rules specify how a value such as 28000, which falls between 24900 and 33300 should be colored. The default setting is to use closest lower value so it would be colored green. If we changed that to use closest higher value it would be colored yellow.
closest lower value |
Assign the format specified for the lower bound of the interval. The previous fill rule used will persist, so it could be by default some other fill rule is loaded. |
closest higher value |
Assign the format specified for the upper bound of the interval. |
lowest value |
Assign the format specified for the very lowest value found in the data set. |
highest value |
Assign the format specified for the very highest value found in the data set. |
interpolate |
Assign a format that is interpolated between the formats used for the lower bound and the upper bound of the interval, proportionately interpolating based on the value for the record. |
In each of the following examples of formatting the Fill Color style property for cities points we provide the intervals list using equal count as well as an example table of cities giving the population of each. The map window shows the resulting format. The example table of cities provides a partial list of all of the cities used in the layer, showing a sampling of those seen in the map view illustrated.
closest lower value
|
Assign the format specified for the lower bound of the interval.
The city of Tours with a population of 132800 falls into the highest interval, from a population of 50200 to the largest value of 2125200. The format color is taken from the color assigned to the lower bound of 50200, a salmon color.
|
closest higher value
|
Assign the format specified for the upper bound of the interval.
The city of Tours with a population of 132800 falls into the highest interval, from a population of 50200 to the largest value of 2125200. The format color is taken from the color assigned to the upper bound of 2125200, a red color.
|
lowest value
|
Assign the format specified for the very lowest value found in the data set.
The format color for the city of Tours, like all the other cities is taken from the color assigned to the very lowest value of 20000, a blue color.
|
highest value
|
Assign the format specified for the very highest value found in the data set.
The format color for the city of Tours, like all the other cities is taken from the color assigned to the very highest value of 2125200, a red color. The largest value of population occurs for Paris, not seen in the map view.
|
interpolate
|
Assign a format that is interpolated between the formats used for the lower bound and the upper bound of the interval, proportionately interpolating based on the value for the record.
When a population does not match exactly one of the upper or lower bounds for the interval into which it falls, the interpolate rule creates a color ramp that smoothly interpolates from the lower color to the upper color and then assigns an interpolated color on the ramp proportional to the population's location in the range from the lower to higher bound.
Near Tours, the city of Vierzon with a population of 29700 falls between the green color of the lower bound of 25100 and the yellow color of the upper bound at 33400 so the interpolate rule assigns a yellowish-green color. Compare that to the pure green color assigned by the default closest lower value rule as seen in the illustration for closest lower value, repeated below:
Interpolation of other Style properties is done similarly. For example, if point Size was assigned using interpolate and a population fell halfway between a lower bound using a Size of 10 and a Size of 14 then a Size of 12 would be assigned by interpolate. |
Undo for Changes - Suppose we love the ability to instantly change fill color for areas, but when a change we make results in an ugly effect we want to get the previous color back? For now, make a copy of a drawing before any changes (takes but a second in the Project pane). Upcoming builds will provide a "Back" capability to get back the prior color.
Transparent colors - The first "color" in drop down color menus, represented by a box with an X, is transparent color. Using that color for an object makes invisible those parts of the object using transparent color. Setting Stroke color to transparent makes the entire object disappear. If we want to make objects disappear in a particular interval we can set the Stroke color to transparent in the thematic format. To render a style without using Stroke color, use the Symbol button to drill into the Symbol menu and set the Stroke width parameter to a very small width, such as 0.1. Use transparent color with care. See the discussion in the Example: How Not to Format a Drawing topic.
First interval and NULLs - NULLs are not values, so a thematic format based on values is not a good match to data sets that include NULLs. Objects with NULLs in a field used for thematic formatting are formatted using the default first interval format. It is likely that future editions of Manifold will provide a separate default formatting choice in the Style pane, perhaps with a separate choice for formatting NULLs.
Nomenclature - The word format is traditionally used in GIS to mean display characteristics. A more contemporary word is style, hence the name of the dialog in Manifold. In this documentation we normally use the words style and format as interchangeable synonyms, albeit with style used more often to refer to patterns, such as icons for points or hatch patterns for areas, with format being a broader term to refer to any display characteristic.
Many fields - Drop down lists of fields for thematic formatting of drawings will show up to the first 4000 fields in the drawing's table. It is not productive to create tables with thousands of fields so the 4000 fields in a drop down list limitation should not be an issue in any rational use.
Why only 100 unique values? - The purpose of thematic formatting is to provide a visual way of understanding differences. Humans get confused long before 100 different shades of color are used, and cannot tell which of various points or areas in nearly identical shades, scattered about in a map, are different. Use a different method of grouping and coloring if different shades are desired for many different objects.
Point Styles and Pixels - When using point styles that include precisely vertical or horizontal lines, with some choices of border stroke width and point size we can encounter visual effects where some point symbols seem sharper than others when seen on a computer monitor. That is a result of thinner lines being interpolated slightly differently for rendering on the grid of pixels that makes up the display screen. We can deal with that easily, as discussed in the Style: Symbol Sizes and Pixels topic.
Manifold 9 - Style Pane Quickstart - Points - A fast and easy introduction to the new Style and formatting capabilities for Pionts in Manifold Release 9 and Viewer. Learn how to rapidly change colors, symbology, sizes and rotations including the use of vector symbols, fonts and even bitmap images. The new system is "always on" and immediately shows changes in the main workspace for rapid, easy choice of exactly the visual effect we want. This video gets right to the basics used every day.
Manifold 9 - Style Pane Quickstart - Lines - Learn how to use the spectacular new style capabilities for lines in Manifold Release 9 and Manifold Viewer to create an endless variety lines quickly and easily. See how to add arrowheads or other symbols to the ends of lines, how to customize lines with repeating symbols, how to start lines with custom symbols and how to add accessory left and right lines for exactly the right effect.
Manifold 9 - Style Pane Quickstart - Areas - New area style capabilities in Release 9 and Viewer make it easy to rapidly create spectacular visuals that get the story across with clarity and compelling effect. Learn how to use point and click controls to fill areas, control borders, draw "inner area" effects and "outer area" effects for a seeming infinite range of options, all available with a rapid click of the mouse. Use bitmap images for area effects too!
Style: Symbol Sizes and Pixels
Example: Change Point Style - Using new Style pane controls to change point style, either very rapidly one property at a time, or using the total Style button to compose a new style with changes to several properties at once.
Example: Style Pane Quickstart - A tutorial introduction to using the Style pane to apply color, symbology, size and rotation to areas, lines and points in drawings.
Example: Format a Drawing using the Style Pane - In this example we provide a first, step by step look at how to format areas in a drawing using the Style pane. We can specify the same formatting for all areas or use a field to automatically set formatting, a process usually known as thematic formatting.
Example: Format the Size of City Points by Population - A common GIS task is to format the size of points in a drawing based on some value. For example, the size of points that represent cities might be formatted based on the value of the city's population, with cities that have larger populations being marked by larger point icons. This is an example of thematic formatting and is easy to do using the Style pane.
Example: Add, Delete and Edit Thematic Formatting Intervals - This topic provides a step by step example of adding, deleting and editing intervals in the Style pane that are used for thematic formatting.
Example: Style Properties in the mfd_meta Table - Style properties for drawings such as colors for areas are stored in human readable JSON values as properties in the mfd_meta system table. This example shows how we can copy formatting from one drawing to another by simply copying values between records in the mfd_meta table.
Example: Formatting Tricks - The visualization capabilities of Manifold using Style can be exploited to provide many visual effects. This topic provides some examples of how to use Style in unexpected ways to create a range of more elaborate effects.
Example: How Not to Format a Drawing - When using Style to format a drawing it is a really bad idea to use the same color for objects that is used for the background color. It can also be a bad idea to use transparent color. This topic illustrates why.
Example: Style Overrides - Working with style overrides to individually style areas, to use or not use style overrides, to find all records using style overrides and to clear style overrides.