Example: Format the Size of City Points by Population

A common way to make visual data easier to understand 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 what GIS people call thematic formatting.  It is easy to do in Manifold using the Style panel in the Contents pane.   This example is repeated in the Manifold Future - Example: City Sizes by Population video.

 

Before proceeding with this topic, please review the Example: Style Panel Quickstart topic.

 

We open a map that has two drawings as layers, a Cities drawing showing cities as points using default formatting and a Regions drawing showing regions of France as areas that have been formatted using a process similar to that in the  Example: Format a Drawing using the Style Panel topic.

 

eg_format_point_size01_01.png

 

If we right-click on the Cities drawing in the Project pane and choose Properties we can see the properties of the drawing.

 

eg_format_point_size01_02.png

 

Since there has been no formatting applied with Style beyond default formatting, there are no Style properties as yet in the Cities drawing's properties.   The properties show that the drawing takes its data from the Cities Table, using the Geom field in that table for geometry data.

 

We open the Cities Table to take a look.  It gives the Name of each city along with a Pop field that gives the population for each city.  

 

eg_format_point_size01_03.png

 

We will format the Cities drawing so the size of the point icon for each city is determined by the population of the city, with larger populations resulting in larger icons.   To do that we click on the Cities tab in the map to make the Cities drawing the active drawing.   We then open the Style panel in the Contents pane.

 

Our first move will be to replace the neutral, default, gray fill color for points with a brighter color so we can see the points better.

 

eg_format_point_size01_04a.png eg_format_point_size01_04.png

 

We click on the Fill Color button's color well.  Manifold uses fill color and background color as synonyms, since various Manifold products have used both terms. In the palette menu that appears (not illustrated) we  choose a bright green color.  The new color automatically takes effect in the drawing.

 

eg_format_point_size01_05.png

 

The points now have a bright green fill color and are more visible.  We now will specify the size of points so they automatically change size in accordance with the population.

 

eg_format_point_size01_06.png

 

We click on the Size style property button for points, and then we click on the field picker menu labeled (no field selected).

 

eg_format_point_size01_07.png

 

The field box pull down menu will be loaded with the fields in our table.   We will choose Pop to use that field to control the Size setting for points.

 

eg_format_point_size01_08.png

 

The Style panel automatically opens up additional controls to allow us to specify how we want the Pop field to control the thematic formatting of point size.    Thematic formatting is normally arranged by grouping similarly valued points into ranges and then applying a point size to all points within each range.  A more limited number of intervals for sizes of points makes it easier to see when points are different sizes. By default, intervals will appear in the intervals list, using values for beginning and ending populations for each interval that are computed based on the actual distribution of populations for cities in our table so that the numeric intervals between each interval bound are about the same, that is, equal intervals.

 

The first decision is how we want points grouped.   We do not want equal intervals since cities in France tend not to be evenly distributed in population from smaller cities to large.  Instead, we want to assign groups so that each has about the same number of cities in it.   

 

eg_format_point_size01_09.png

 

In the Method pull down menu we choose equal count, which means we would like to group points into ranges where each range has approximately the same number of points.  The beginning and ending numbers for each interval will be recomputed automatically so that each interval as approximately the same number of cities in it.

 

eg_format_point_size01_10.png

 

The dialog presents us with five ranges with a value of 5 in each for the point size.   We can double-click into each point size value and change it to something else.   We start by double-clicking into the first entry to change it to 4 for the point size.  We can then press Enter and move on to the next range we would like to change.

eg_format_point_size01_11.png

 

We double-click into the second point size value and change it to 6.   We can continue in that way to assign a point size value desired for each interval.

 

eg_format_point_size01_12.png

 

In the illustration above we have assigned point sizes for the five ranges from 4 for the smallest populations to 12 for the largest.  That should be a good first try to see how the map will look.   If we like, we can assign different values when repeating this example to suit our tastes.   We press Update Style.

 

eg_format_point_size01_13.png

 

The drawing immediately updates to use a different point size for points depending upon the size of the population for each city.

 

At this point we have fulfilled our primary objective for this example, to show how to format the size of points based on the value of a field.   We will keep going in the example to show additional features that we might utilize in real life when working with this data set.

Creating a Better Looking Display

If we do not like round point icons, we can change the style of points to something else, such as a square.

 

eg_format_point_size01_14.png  eg_format_point_size01_14a.png

 

To do that we click on the Symbol property button for points and then in the drop down menu choose a square symbol.   The drop down menu shows a list in the illustration above.  We could click the grid button in the drop down menu's toolbar to switch to a grid display that shows many more symbols.  With over 1300 symbols in the drop down menu we can scroll down in the menu to see many more, or we could use the filter box to enter part of a name to see only symbols with that part in their name.  

 

To see what the Symbol button does, see the Example: Style Panel Quickstart topic.

 

eg_format_point_size01_15.png eg_format_point_size01_16.png

 

The drawing immediately updates to show points using a square symbol.

Thematic Formatting Color by Population Value

It is often the case we can produce a more comprehensible display by simultaneously applying thematic formatting to two different style attributes at the same time, such as point size and point color.   When both color and size are used as visual cues that can help make complex data more understandable.

 

We will now thematically format the fill color of the points using the same pattern of ranges that we used to control the thematic formatting of point size.  There are two ways to do this.   We can simultaneously apply the same thematic format to both sizes and to colors, as shown in the Example: Style Panel Quickstart topic,  or we could independently specify thematic format for color alone.  In this example we will do the latter, to present a simpler example.

 

eg_format_point_size01_17.png

 

The colors of points when using two color symbols are set by the Stroke Color, style property, which is the border color together with the Fill Color style property, which is used to color the interior of points.    Manifold uses stroke color, border color, and foreground color as synonyms, and also  fill color and background color as synonyms.

 

We click on the Fill Color style property button, and then we click on the field picker box, initially captioned (no field selected).

 

eg_format_point_size01_18.png

 

We choose Pop as the field to use.

 

eg_format_point_size01_19.png

 

As before, we choose equal count as the Method, leaving 5 as the number of Breaks.

 

eg_format_point_size01_20.png

 

Intervals appear with black in the color wells, since no thematic format has as yet been assigned.   The quickest way to assign colors to all of the intervals is to click the Palette button.   That calls up submenus with the names of palettes we can use (not illustrated).

 

eg_format_point_size01_21.png

 

When choosing a range of colors for values from small to large it is best to follow some sort of plan, such as colors of the spectrum from cool blue to hot red, or for increasing intensity and saturation within the same shade of color.  In the Color Brewer palette sub-menu, we have chosen a spectrum-like set of colors from red to blue, the CB Spectral palette.  Immediately as we choose the palette it is applied to the intervals.  We press Update Style.

 

eg_format_point_size01_22.png

 

Right away the map window updates so that cities are now marked not only by icons that vary in size by population but also that vary in color by population.   If we do not like the colors produced by our choices in the range color wells,  we can change those colors and then press Update Style again to see if we like the new colors better.   Such tinkering and adjustment to taste is a key part of the creative process for producing an appealing and understandable display.   Manifold provides commands that make it easier to try different combinations of colors.

 

We can reverse the order of colors for the Fill color in moments.

 

eg_format_point_size01_22b.png

 

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.

 

eg_format_point_size01_23.png

 

We then right-click onto any of the color wells to call up a context menu of commands to apply to the color wells.

 

eg_format_point_size01_23a.png

 

We choose Reverse in the context menu.

 

eg_format_point_size01_24.png

 

That reverses the order of colors in the intervals, putting blue at the top and red at the bottom.  We press Update Style.

 

eg_format_point_size01_25.png

 

The map immediately updates to use the new palette to color points by population, a more balanced look between blue, green and other tones, including those used in the Regions drawing.

 

Looking at the illustration above we might decide that it is pretty but that we have too much going on.   If too many factors are varied at the same time it could be easy for viewers to miss the message we want to convey with a display.   In the above illustration the main message we would like to convey is the variation in populations in cities.  The main message we want to convey is not the colorful background of regions.  We could create a more understandable display that better conveys our desired message by changing the Regions drawing to use the same color for all regions.

 

eg_format_point_size01_25a.png

 

To do that we click on the Regions drawing tab in the map to make the Regions layer the active drawing.   

 

eg_format_point_size01_26.png

 

The Style panel immediately changes context to display style properties settings for the Regions drawing.   The Fill Color button shows a field icon symbol to indicate that fill color is controlled by a field.   We click the Fill button twice (once to call up the thematic format, and the second click to switch to an array of colors) to immediately call up a menu of colors.  Choosing a color will replace the thematic format with a fixed color for all areas.

 

 

eg_format_point_size01_27.png

We choose one of the standard web colors, a beige color called Bisque.

 

eg_format_point_size01_28.pngeg_format_point_size01_29.png

 

The moment we choose that color the button updates to show it and the map also updates to show that color as the fill color for areas in the Regions drawing.

 

The map is still busier than we would like, a result of the contrast between the black color of area borders and the light brown of the fill color for areas.  We can tone that down by choosing a Stroke color other than black for areas, that is, for the color used for area borders.  

 

We will choose a darker brown for Stroke, in the same general range of color tonality as the Bisque used for the fill color for areas but darker and less saturated.  We click on the Stroke button and choose the color desired (not illustrated).

 

eg_format_point_size01_30.pngeg_format_point_size01_31.png

 

The moment we choose the new color the button updates to show it and the map updates to use that color for area borders.

 

That is a calmer and better effect.  We can zoom in to take a closer look.

 

eg_format_point_size01_32.png

 

Zooming into the map we can see how the point icons show where cities are located.  At a glance we can see which cities are larger and which are smaller.   The cluster of cities in the top center shows cities that are suburbs of Paris.  

 

eg_format_point_size01_33.png

 

Zooming into the Paris cluster we can see how there is one big, red icon (the biggest!) showing Paris, surrounded by numerous suburban cities which each in their own right have large populations.  

Additional Layers and Labels

To label the map by region we can use the Transform dialog's Center template to create centroid points for the areas in the  Regions drawing, using the Add Component button to save the centroid points into a drawing and an associated table called Regions Table Center.   

 

eg_format_point_size01_34.png

 

We can then create labels from the Regions field of that new centroid points drawing and add it to the Map to create a display similar to that seen above, which positions the names of the regions at the centroid of each area.  

 

 

Unicode Text

Manifold can also handle Unicode in tables and to display labels.  

 

eg_format_point_size01_35.png

 

The above labels are taken from a drawing created using the table below, where the Chinese field is the data type nvarchar to handle Unicode characters.

 

eg_format_point_size01_36.png

 

The Chinese text in the above example are sample words taken from the web and are not a Chinese translation of the city names.  For example, "Saumur" does not translate into Chinese as the character for "dragon," although no doubt the Plantagenet kings, including Richard the Lion Hearted, who held the great fortress of Saumur, would be pleased to think it did.   But 弧度 as appears in the first line of the table does translate into 'Radian', the parallel spatial database engine that powers Manifold System.

Everything is a Table, Including Style

One more move:  we right-click onto the Cities drawing in the Project pane and choose Properties.   

 

eg_format_point_size01_37.png

 

Comparing this to the much shorter properties dialog at the beginning of this topic we see that adding formatting to the Cities drawing has added various Style properties.  These are all human-readable in JSON format.  They can be edited in the Properties dialog if we like or edited where properties appear as values in the mfd_meta table of all properties, as shown in the Example: Style Properties in the mfd_meta Table  topic.

The Style Dialog and Many Windows

One of the most appealing aspects of Manifold is how multiple windows can show the same components at the same time with live views.  Change formatting for a drawing in one of the windows using Style, and all of the windows showing that drawing will update to use the new format.

 

That capability together with the capability of dialogs like Style to stay open and alive while we work with other windows and components makes it possible to have multiple windows open at the same time, allowing us to change Style in a highly interactive way depending on how the changes look in the drawing when it is seen in different settings in combination with different layers.  This greatly facilitates small adjustments as we tinker with the look of our displays.

 

Consider a simple example using the map we have created.

 

eg_format_point_size01_38.png

 

Seen zoomed in to the regions surrounding Paris, the map uses a Cities layer and a Regions layer.    For a more appealing display, we have rotated the square symbols in the Cities label by 45 degrees, as seen below in the Style panel, to create diamonds.

 

eg_format_point_size01_38a.png

 

Formatting changes that we make to either drawing in any window using the Style panel will immediately apply to all windows that show that drawing as a layer.

 

eg_format_point_size01_39.png

 

We can click open the Regions drawing in its own window as seen above.    We will start by changing the Stroke property of the Regions drawing.

 

eg_format_point_size01_40.pngeg_format_point_size01_41.png

 

We change the Stroke color to a darker gray.  The Regions drawing immediately updates to use darker gray color for area borders.

 

eg_format_point_size01_42.pngeg_format_point_size01_43.png

 

 

The Map window also updates to show the new, darker gray borders used in the Regions drawing.    Having a different map window open that shows the same drawings can be a very convenient way to see how formatting effects look at different pan and zoom levels or in combination with other layers.

 

We now open the Cities drawing in its own window.

 

eg_format_point_size01_44.png

 

We will change the square symbol (seen rotated 45 degrees above) used for points to a triangle symbol.

 

eg_format_point_size01_45.pngeg_format_point_size01_46.png

 

The Style panel automatically shows settings for whatever is the active layer in the active window.   We change the Symbol property for points from a square to a triangle.

 

The Cities window immediately updates to show the new symbol, a racy effect.

 

eg_format_point_size01_47.png eg_format_point_size01_48.png

 

At the same time, the Map window also updates to show the new, triangle point style used in the Cities drawing.   There is no change in the Regions drawing since that was not the subject of the formatting change.

Thinner Symbol Borders

Suppose we look at the last illustration above and we think the black border around the triangle symbol is a bit too thick.  That is easy to alter.

 

We click the Symbol button for points, and in the drop down menu we choose More...

 

eg_format_point_size01_49.png

 

That opens the entire Symbol dialog.  We can change the Stroke width from the default of 1 point to 0.5 points.   We could also use a % character to set the width of the stroke line as a percentage of the size of the symbol.   For now, we will keep it simple and use 0.5 to mean one half point width.  We press OK.

 

eg_format_point_size01_50.png

 

The result is a thinner border, the stroke part of the symbol, around the triangular symbols. tech_yoshi_sm.png

 

Tech Tip:   Operations using multiple windows with undocked panes or other dialogs are a good reason to have more than one monitor.  We should have at least two monitors and, ideally, three monitors to have plenty of desktop real estate to spread out multiple windows and dialogs.  

 

Notes

Historical regions - The illustrations in this topic use data from the US government, which show the regions of France as they were before 1 January 2016, when regions in France were reduced from 22 to 13.

 

Selected Cities - Most populated places in France have populations much less than 20000 residents.  The table we used for this example was trimmed to exclude all populated places with populations less than 20000.

 

Tinker Time - The tinkering we did toward the end of this example, to adjust colors to taste, is a classic part of the creative process in GIS and data presentation.  The process is fun and addictive, so it is easy to spend more time tinkering with colors and formatting than on the data analysis.

 

Trademarks -  多种 and 弧度 are trademarks of Manifold Software Limited.

 

See also

Maps

 

Drawings

 

Labels

 

Style: Drawings

 

Style: Labels

 

Style: Thematic Formatting

 

Style: Overrides

 

Example: Change Point Style - Using new Style panel 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 Panel Quickstart - A tutorial introduction to using the Style panel in the Contents pane to apply color, symbology, size and rotation to areas, lines and points in drawings.

 

Example: Format a Drawing using the Style Panel - In this example we provide a first, step by step look at how to format areas in a drawing using the Style panel.  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: Add, Delete and Edit Thematic Formatting Intervals - This topic provides a step by step example of adding, deleting and editing intervals in the Style panel 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.

 

Videos

Manifold Future - Future Tour Part 1 - This video shows how to download and use a portable installation for Manifold Future.  The video also shows the Contents, pane, layers and layer opacity, one click use of data source favorites, using your own archival favorite and getting record values instantly.  If you are using Viewer or Radian Studio, download and use the Future version to get access to all these powerful new features.

 

Manifold Future - Future Tour Part 2 Editing - The video shows how to create new objects, how to add fields and vertices and move vertices around, how to edit existing objects and how to use simple selection methods to choose vertices to move together, including moving all objects.

 

Manifold Future - Future Tour Part 3 Editing - The editing tour continues with a look at how to create branched objects, including how to create areas with holes and islands, how to add branches to lines and how to add coordinates between vertices in existing objects.  We finish up by creating an area that traces over a pond in the Luxembourg Gardens in Paris using a Google satellite view, and then we add a hole to that area and two additional islands.

 

Manifold Future - Future Tour Part 4 Edit Attributes, Move a Point - We use Manifold Future to see how to view attributes of objects in drawings, including use of the new Edit dialog to view long, multi-paragraph text fields.  We edit fields and see how easy it is to preview edits and either accept them or abandon them. We switch to editing the geometry of objects in a drawing, viewing the coordinate locations and using mouse moves to reposition points. We edit the location of a point to correct an error in a drawing, using Google Satellite view to provide context for the correction.  Fast and easy, with previews all the way!

 

Manifold Future - Future Tour Part 5 Unicode Attributes and IME -  We take a tour through Manifold Future attribute editing, showing how to edit attributes in a drawing using the Record panel Values

tab and the expanded Edit dialog, including advanced Unicode facilities and use of the built in Input Method Editor (IME) to input text in Japanese language.

 

Manifold Future - Future Tour Part 6 Cell Context Menu - A short video showing a fast and easy way to copy between cells in tables using the context menu.  Also... one step undo of pending changes,  setting the value of a cell to NULL and more. The context menu on cells is such a simple thing but it makes repetitive editing of tables much faster and easier.

 

Manifold Future - 5 Minute Style Quickstart - A five minute, fast and easy introduction to the new Style and formatting capabilities in Manifold Future. In just five minutes learn how to rapidly change colors, symbology, sizes and rotations for area, line and point objects in drawings.

 

Manifold Future - Example: Style Panel Quickstart - A video that repeats the Example: Style Panel Quickstart topic..  The video shows how to format points using the Style panel, including simultaneous formatting of multiple style properties using the same thematic format setup. See how to use free meteorology symbols from a popular, free font, how to use letters and other symbols as point symbology and more.

 

Manifold Future - Example: City Sizes by Population - A video that repeats this Example: Format the Size of City Points by Population topic.