Style: Formatting Drawings and Labels

The Edit - Style dialog works similarly when used to format drawings or labels.    We will cover drawings first; the same techniques also apply to labels.

Formatting Drawings

Using Style we can set the display characteristics, called the format, such as colors, icons, patterns, size and more, of points, lines and areas in drawings.   

 

Style settings applied to drawings are usually known as formatting, the specification of foreground color and background color for objects as well as the styles and sizes of areas, area borders, lines and points, including the rotation angle of icons used to show points.   All style settings can be automatically controlled by the values of fields in the record for that object, a process known as thematic formatting.

 

To change the format of a drawing:

 

  1. Open the drawing or click onto the drawing's tab in an open map window.
  2. Choose Edit - Style
  3. Click on the Style property to be changed.
  4. Enter the value desired for that property into the Value box or choose from options presented by the Value box.
  5. Press Apply.

 

To change the thematic format of a drawing:

 

  1. Open the drawing or click onto the drawing's tab in an open map window.
  2. Choose Edit - Style
  3. Click on the Style property to be changed.
  4. In the Source box choose the field to control thematic formatting.
  5. Choose the Method for grouping records.
  6. Press Full Range (almost always done) or manually specify the Range desired.
  7. Choose the number of Breaks, that is the number of groups for formatting.
  8. Press Tally to generate groups in the pane below.
  9. For each group, enter the desired style property value for that group.
  10. Press Apply.

 

By varying the settings of a few, basic style properties we can create a seemingly infinite variety of appearances.  The four drawings below use the same map with the same drawings but with different Style settings for the drawings.   The overall background color is set in the Layers pane.

il_spatial_overlay01_05.png il_format_eg01_01.png

eg_format_point_size01_30.pngil_format_eg01_02.png

Style Properties for Drawings

Color

The primary color applied in point and line styles that use a single color.  Also applied to the borders of areas, for the borders of point styles that use two colors, as the hatch line color in area styles and as the primary color in line styles that use two colors.

Color, fill

The fill or secondary color.  Applied to the interior of area and point styles that use two colors.  Also applied as the secondary color in area styles and line styles that use two colors.

Area style

Choose from styles which color areas using a single fill color or using two colors in hatch patterns.

Area border style

The line style for the borders of areas using the same choices as offered for Line style.  

Area border size

The thickness of the border line for the area.  May be fractions such as a size of 1.5 or 2.8.

Line style

Choose from a style using one color, the default, or from dashed styles using two colors.

Line size

Thickness of the line.  May be fractions such as a size of 1.5 or 2.8.

Point style

Choose from icons for points that use two colors, the default, or from styles that use one color.

Point rotation

The rotation of the selected point style in degrees.

Point size

The size of points.   May be fractions such as a size of 1.5 or 2.8.

 

Thematic Formatting

Thematic formatting is a GIS term that means "changing the format based upon the value of a field."  A classic example 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.    

 

il_style_drawings_controls.png

Controls for Thematic Formatting

The following controls appear when a field is chosen as the Source to guide formatting of a given Style property.

 

(Style properties list)

A list of available Style properties.  The highlighted property is the property to which the thematic format will be applied.

Source

The field that is the source of the values to be used in the thematic format.

Method

The method used to classify records into different intervals based upon the value in the  Source field for that 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.

Full Range

Set the Range automatically to the range of values from lowest to highest that currently exist in the field.

Breaks

The number of bounds to specify.  The number of intervals will therefore be one less than the number of Breaks.

Tally

Compute the number of intervals and values to use for the bounds based on the Method and the number of Breaks.

(intervals list)

A list of bounds that define intervals, with the color or other Style property value to use for each.   These may manually be edited, deleted or added to.

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.

Apply

Apply any changes in the dialog to the component on which it operates.

Close

Close the dialog.   If Apply has not be pressed after any changes have been made then Close will abandon such changes.

Editing, Deleting and Adding Bounds and Intervals

We may edit the bounds which define interval as follows:

 

 

For a step by step example of the above see the Example: Add, Delete and Edit Thematic Formatting Intervals topic.

Grouping Methods for Intervals

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 Point size would result in too little visual difference in most cases to provide the benefit desired.   Instead, we normally break up the population ranges into five or six groupings based upon intervals of values in the controlling field and then assign a different Point 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.

 

direct format

Appears as an option for numeric Style properties such as Point rotation and Point size.  Take the number in the field and use it directly as the value for the Style property.  

 

  • The Default box specifies the value to use if there is a NULL value in a record for the field.
  •  The Scale box specifies the value to use to multiply the number in the field to compute a scaled Style value.  

 

For example, if we are specifying the Point Size for cities by population where the population varies from 10000 to 100000 we could use a Scale of .0001 to achieve a Point size ranging from 1 to 10.

equal intervals

Calculate bounds so each interval spans approximately the same part of the total Range.  

 

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 clusters or groupings of values by the given field and assign values of bounds so that each cluster is in a different interval.

standard intervals

Assign values of bounds so that each interval represents one standard deviation.

unique values

Appears with text fields. Assign a break value for each unique value that occurs in the field.  Limited to the first 100 unique values found.

 

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 to each record we can choose equal intervals as the Method with two breaks and then use interpolate as the Fill rule.  Or, we

Intervals and Fill Rules

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.

il_style_fill_intervals.png

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 25100, which is the lower value bound for the next interval, assigned a green color.  That interval continues until we hit 33400, 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, 25100, 33400, 50200 and 2125200 seen above.   Fill rules specify how a value such as 28000, which falls between 25100 and 33400 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.

Fill Rules

closest lower value

The default.  Assign the format specified for the lower bound of the interval.

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.

hide

Do not show values that do not exactly match one of the bounding values which specify intervals.

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.

 

Examples of Fill Rules

In each of the following examples of formatting the Color, fill style attribute for cities points we provide the intervals list using equal count as well as a table of cities giving the population of each.    The map window shows the resulting format.

 

closest lower value

 

 

il_style_fill_sorted_map_cities.png

The default.  Assign the format specified for the lower bound of the interval

.il_style_fill_intervals.png

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.

il_style_fill_closest_lower.png

 

closest higher value

 

 

il_style_fill_sorted_map_cities.png

Assign the format specified for the upper bound of the interval

.il_style_fill_intervals.png

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.

il_style_fill_closest_higher.png

 

lowest value

 

 

il_style_fill_sorted_map_cities.png

Assign the format specified for the very lowest value found in the data set.

il_style_fill_intervals.png

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.

il_style_fill_lowest.png

 

highest value

 

 

il_style_fill_sorted_map_cities.png

Assign the format specified for the very highest value found in the data set.

il_style_fill_intervals.png

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.

il_style_fill_highest.png

 

hide

 

 

il_style_fill_sorted_map_cities.png

Do not show values that do not exactly match one of the bounding values which specify intervals.

il_style_fill_intervals.png

None of the cities in the map view exactly match one of the interval bounds in the intervals list above. The population of Tours at  132800 matches none of them, so like all the other cities the fill color is hidden, that is, formatted using transparent color.

il_style_fill_hide.png

If we pan and zoom the map to the region around Paris we can see that some of the cities points do exactly match a bound in the intervals list.  Paris itself, for example, exactly matches the largest value of 2125200, a red color.

il_style_fill_hide2.png

 

interpolate

 

 

il_style_fill_sorted_map_cities.png

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.

il_style_fill_intervals.png

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.

il_style_fill_interpolate.png

Near Tours, the city of Saumur with a population of 29900 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 below.

il_style_fill_closest_lower.png

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 Point size of 10 and a Point size of 14 then a Point size of 12 would be assigned by interpolate.

 

 

Color and Color, fill Apply to All Objects

Area , Line and Point style properties apply to area, line and point objects respectively, but Color and Color, fill properties apply to all objects in a drawing whether they are areas, lines or points.

il_format_examples01_01.png

 

Consider a drawing that has areas, points and lines as seen above.   We open Edit - Style to take a look at the style properties applied.

il_format_examples01_02.png

The Color value is a blue color.

il_format_examples01_03.png

The Color, fill value is a light purple.  

 

If we take a closer look at the pixels in the drawing we can see that the Color and the Color, fill colors are applied to the points, lines and areas.

 

il_format_examples01_04.png

The Color is applied to area borders, point icon borders and to the solid line that uses a Line style consisting of one color.    The Color, fill value is applied as a fill color for areas and for the insides of point icons.

 

We can change styles for areas, lines and points to see how Color and Color,Fill are assigned.

il_format_examples01_05.png

 

In the above illustration we choose a Point style that uses one color and a Line style and an Area style that use two colors.  The Line style is a dotted style and the Area style uses a hatched pattern of diagonal lines.

 

il_format_examples01_06.png

If there is only one color used by a style that is always the default Color value.  Any second color used as a fill or as an alternating color in a dashed or hatched style by default is the Color, fill value.  

 

Style: Formatting Labels

When opened with the focus on a Labels window or Labels layer in a map, the Style dialog allows us to set the display characteristics, called the format, such as font, size and style of labels.

 

Style settings applied to labels apply to all labels in the drawing.  To vary the formatting for labels, use thematic formatting to vary style properties per label based on the value of a field in that label's record.  Thematic formatting for labels is done exactly the same as thematic formatting for drawings.

 

To change the format of labels:

 

  1. Open the labels component or click onto the label component's tab in an open map window.
  2. Choose Edit - Style
  3. Click on the Style property to be changed.
  4. Enter the value desired for that property into the Value box or choose from options presented by the Value box.
  5. Press Apply.

 

To change the thematic format of labels:

 

  1. Open the labels component or click onto the label component's tab in an open map window.
  2. Choose Edit - Style
  3. Click on the Style property to be changed.
  4. In the Source box choose the field to control thematic formatting.
  5. Choose the Method for grouping records.
  6. Press Full Range (almost always done) or manually specify the Range desired.
  7. Choose the number of Breaks, that is the number of groups for formatting.
  8. Press Tally to generate groups in the pane below.
  9. For each group, enter the desired style property value for that group.
  10. Press Apply.

 

Style Properties for Labels

Color

The primary color applied to label text and for the borders of a label box.

Color, fill

The secondary color applied to labels when a Label style uses two colors, for example, as the fill color for a label box or as the drop shadow or aura around the text.

Label style

Choose from the default style that uses Color only or from styles which use both Color and Color, fill.

Label font

Choose the font using standard Windows dialogs.  The font size setting from the Windows dialog is ignored in favor of using the Style dialog's Label font size setting.

Label font size

The size of the font, duplicating a setting also available

 

Label Styles

Following are examples of available label styles using black as the Color, white as the Color, fill, Seguoe UI, Semibold as the Label font and Label font size value of 10.   The displays of Label style value samples have been enlarged better to show the use of Color, fill in light gray color in the sample.

 

il_icon_label_style_01.png

eg_style_labels01_01a.png

The default style provides a single color font with no label effects.

il_icon_label_style_02.png

eg_style_labels01_02a.png

This style provides a drop shadow effect when shown on a lighter background and using a Color, fill that is slightly darker than that light background.  On a dark background it provides a highlighting drop shadow effect.

il_icon_label_style_03.png

eg_style_labels01_03a.png

Similar to the drop shadow effect but using the Color, fill secondary color as a halo. When labels must be seen against either light or dark backgrounds use this style with dark Color and light Color, fill.

il_icon_label_style_04.png

eg_style_labels01_04a.png

Use Color for the text and box borders and Color, fill as the fill color for the box.

il_icon_label_style_05.png

eg_style_labels01_05a.png

Similar to the box style but without the border box.

 

Positioning Labels

Labels are centered upon the position of points.   To offset labels, use the technique illustrated in the Example: Formatting Tricks topic.il_standard_colors.png

 

When creating labels for line or area objects, the label will be placed somewhere on one of the coordinate locations that defines the line or area.    That usually is not a good location as we normally want the label centered upon the line or area in some way.   To do that we first use the Transform dialog to create centers for the lines or areas and then we can create labels for the points that the centers template creates.

 

Notes

Standard colors and transparent colors - When we double-click into a color well to change a color Manifold will provide a list of standard colors for our convenience.   The first "color," represented by a hatched pattern, is transparent color.  Using that color for an object makes invisible those parts of the object using transparent color.

 

To choose a different color, click on the color.  To specify some color not on the standard colors list, click on Custom to open a typical Windows color-setting dialog.

 

Use transparent color with care.   See the discussion in the Example: How Not to Format a Drawing topic.

 

Nomenclature - The word format is traditionally used in GIS to mean display characteristics.  A more modern 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.

 

Rotation - It doesn't make sense to choose a Point rotation value that ends up presenting the selected Point style with the same appearance.   For example, choosing a Point rotation value of 90, 180 or 270 will make no visual difference in the appearance of a square, which looks the same rotated 180 degrees as it does without any rotation.

 

Why the same Color and Color, fill for All? -  Why are the same two colors used for all objects in a drawing?   Why not allow different primary and fill colors for areas, lines and points in a drawing?   The main answer to that is that having the same colors, by default, for objects in a drawing provides a common visual cue that makes it much easier at glance to know which objects are in which layer in a map that has many layers.  The secondary answer is that if we want to, we can specify different colors for areas, lines and points in the same drawing.   The Example: Multiple Primary and Fill Colors in a Drawing topic shows how.

 

See Also

Maps

 

Drawings

 

Labels

 

Style

 

Example: Format a Drawing using the Style Dialog - In this example we provide a first, step by step look at how to format areas in a drawing using the Style dialog.  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 dialog.

 

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 dialog that are used for thematic formatting.

 

Example: Multiple Primary and Fill Colors in a Drawing - At first glance that the same Color and Color, Fill values apply to areas, lines and points in a drawing may seem a limitation.   It is easy to use different Color and Color, Fill settings for different objects with different colors for areas, for lines and for points.   This example shows the simple procedure to use.

 

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.