Example: Formatting Tricks

The visualization capabilities of Manifold using the Style panel 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.   By presenting miscellaneous techniques we can stimulate creativity in using Style.

 

The key idea for most of these tricks is to make duplicates of data so that multiple versions of the same data can be stacked as layers in a map with each drawing formatted differently and, if necessary, offset using the Shift template in the Transform panel.   tech_tina_sm.png

 

Important: While there are effects that can be achieved by using multiple drawings based on the same table with each drawing formatted differently, when we use Shift we must make sure to copy both the table and the drawing so that what is shifted is a different data set from the original.

 

The examples below assume we are familiar with using the Style panel to change formatting in drawings.

Using Rotation to Create Diamonds and Inverted Triangles

We can use the  Point rotation property in the Style panel to create custom effects for point symbols.

 

il_spatial_overlay01_05.png

 

The three illustrations below show the same drawings as the illustration above, but with default formatting altered by using the Style panel and overall background color set using Contents - Layers.

 

il_format_eg01_01.png

 

In the above illustration thematic formatting is used to control the Point rotation of the point symbols, with thematic formatting also used to specify the background color of areas.  Contents - Layers was used to set black background color for the drawings.

 

il_format_eg01_02.png

 

In the above illustration points are all set to use the same icon and color, with thematic formatting also used to specify the background color of areas.  Contents - Layers was used to set light beige background color for the drawings.  This illustrates how the square icons look without rotation.

 

il_format_eg01_04.png

 

In the above illustration when square icons are used for points but with a Point rotation of 45 they appear as diamonds.  Area borders are set to use a dotted line style and the same color is used for all areas.   Contents - Layers was used to set light blue background color for the drawings.

 

il_format_eg01_03.png

 

In the above illustration all points use a Point rotation of 180 degrees to flip the default triangle style used for points,

 

Using Shift to Create a Drop Shadow

We will create a drop shadow effect to give the appearance of three dimensionality to areas seen in a map.    This is a limited effect as it tends to look best in only a limited range of zoom levels, but for that limited purpose it looks very good.

 

We begin with a drawing called Regions of the regions of France shown as areas, seen in a map below.   We have used the Layers panel to set the background color to a calm beige.

 

eg_format_tricks01_01.png

 

In the Project pane we ctrl-click on the Regions drawing and we ctrl-click as well on the Regions Table 2 used by the drawing to highlight both components.  

 

eg_format_tricks01_02a.png

We then press Ctrl-C to copy both.

 

eg_format_tricks01_02.png

We press Ctrl-V to paste and two new components, copies of the ones we copied, appear in the Project pane named Regions 2 and Regions Table 2.  The properties for the Regions 2 drawing have been automatically adjusted so it uses the Regions Table 2 table.

 

eg_format_tricks01_03a.png

 

We drop the new Regions 2 drawing into the map.   Since it is an exact copy, including formatting, of the Regions drawing there is no visual change in the map.  With the Regions 2 the active layer, in the Contents pane we choose the Style panel.

 

 

eg_format_tricks01_03b.png

 

We use the Style panel to change the color and fill color for areas to black.

 

eg_format_tricks01_03.png

 

The Regions 2 layer now appears as a completely black display.   It exactly covers the Regions drawing underneath.

 

eg_format_tricks01_04.png

 

We drag the Regions 2 layer tab to the right, so the Regions 2 layer is rendered below the Regions layer.   The Regions 2 drawing is a copy of the data in the Regions drawing so the two line up perfectly and the Regions 2 drawing cannot be seen since it is under the Regions drawing layer.

 

We click the Regions 2 layer tab to ensure the Regions 2 drawing is the active drawing.  In the Contents pane we choose the Transform panel.

 

eg_format_tricks01_05.png

 

We choose the Shift template and use Shift X and Shift Y values of 10000 and -10000 respectively.   This moves the Regions 2 drawing down and to the right relative to the Regions drawing by the specified amount.

 

eg_format_tricks01_05a.png

 

Manifold immediately shows a preview using blue preview color to show how the Regions 2 objects will be shifted.   How do we know the right amount to use?   We can experiment and see what the preview looks like in the map.  We press Update Field.

 

eg_format_tricks01_06.png

 

The map updates and we see that the lower drawing, the all-black Regions 2 drawing, has been shifted to the right and down, thus providing a 3D-like effect of a drop shadow or solid edge, as if the areas were cut out of some material with thickness.

 

eg_format_tricks01_06a.png

 

We can see how the technique works by zooming far into the upper edge of the areas.   The lower, black layer has been shifted relative to the upper layer.   The effect breaks down when the display is zoomed too far into the scene but it works remarkably well to generate screen shots that can later be utilized in graphics editors.

 

We can also extend this technique by using additional layers.

 

eg_format_tricks01_06b.png

 

In the illustration above, zoomed in slightly to show the effect better in a small illustration, we have made two more copies of the Regions drawing and in both we have deleted all areas but the area for the Centre region.  The lower Centre 2 drawing has been formatted with black fill color and gray outline color.   The upper Centre drawing has been formatted a light green and then Shifted upwards by 10000 Y units and to the left by -10000 X units.  The result emphasizes the Centre region as if it has popped out from the other regions.   

 

To create the illustration above, we have also pressed the Symbol button for areas in the Regions drawing to drill down into the Symbol dialog and to set the Stroke width for areas to 0.2, resulting in thinner area border lines.

 

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.

 

Wasteful of Storage? - When drawings are created using the same geom in the same table they require essentially zero extra storage.   We can style each drawing differently to get the effects seen above.  

 

Take it easy - Stacking layers using different formats is a great way to create useful effects but, when overdone, can result in ugly and confusing displays.  Use with restraint.

 

See also

Getting Started

 

User Interface Basics

 

Maps

 

Editing Tables

 

Drawings

 

Style

 

Style: Drawings

 

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: 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 panel.

 

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