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.




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




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.  




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.




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.




We click on Size style property button for points.  We can either click on the left side of the button onto the sample well and then ignore the resulting menu, or we can click directly onto the right side of the button to indicate we want to go straight to choosing a field to control the setting.




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.




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.   




 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.




The dialog presents us with five ranges with a value of 0 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.



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.




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.



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.




To do that we click on the Style property button for points and choose a square symbol from the resulting menu.   To see what the Symbol option 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.




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


We click on the right side of the Color style property button.




We choose Pop as the field to use.




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




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).




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.




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 add the formatting for the size property by Ctrl-clicking on the size property.




That adds the column for the size property to the intervals list.




Next,  we can click anywhere in the intervals list to make sure the focus is on that list, and then we press Ctrl-A to select all intervals.  We then right-click onto any of 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.




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


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.




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




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 left side of the button to immediately call up a menu of colors.  Choosing a color will replace the thematic format with a fixed color for all areas.




We choose Custom to launch the standard Windows color picker dialog (not illustrated) that we will use to choose a light brown color.




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 Color other than black for areas, that is, for the color used for area borders.  


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




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.




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.  




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.   




We can then create labels from the Regions field of that new centroid points drawing and add it to the Map to create the display 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.  




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.




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 engine used in 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.   




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.




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.




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.




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




We change the Color to white.  The Regions drawing immediately updates to use white color for area borders.





The Map window also updates to show the new, white 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.




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




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


The Cities window immediately updates to show the new style, 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. 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.  



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

Getting Started


User Interface Basics




Editing Tables








Contents Pane


Contents - Layers


Contents - Record


Contents - Style


Example: Style Panel Quickstart - A tutorial introduction to using the Style panel 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.



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.