In previous versions of Surfer, the only base layers that have symbology could be included in the legend. Now, all vector base layers are included in the legend. For example, import multiple SHP files as base layers for pipelines, tenements, drainage lines, and field boundaries and they’ll each be included in the legend.
Create a legend that automatically displays all objects in all vector base layers.
What is this new feature
This feature gives you the ability to automatically create legends including all base layer features in your map.
Include samples in the legend for every base layer in your map
Draw features in your base layers and include them in the legend
Eliminate the need to manually create legends to include this information
How to use it
To use this feature, all you need to start with is a vector base layer, with drawn objects in it.
Follow these steps:
Open Surfer 32.
In the Welcome to Surfer dialog, under Files, make sure Sample Files is selected, select Base.srf and click Open. In the map, there are two vector base layers (Transportation and Hydrology).
Let’s first add one more base layer to the map. Download Golden Contours.gsb, attached to this KB article.
In the Contents window, select the Map and click Home | Add to Map | Layer | Base, select Golden Contours.gsb and click Open.
When prompted to adjust the limits, just click No.
Click Map Tools | Add to Map | Legend. A legend is created. It happens to be on top of the map scale, so just select the legend and move it off to the left.
Now we can customize the legend. In the Contents window, select the Legend.
In the Properties window, click the Layers tab.
With the Layer to edit set to Hydrology:
Change the Template to: \sample \layername
Note: Changing the directive from \name to \layername shows the name of the layer instead of the name of the object.
Click the Select samples button
In the Show Samples dialog, uncheck the box for the Polygon and click OK. Now we just see the blue line for Hydrology.
Note: The Show Samples dialog allows you to show (or hide) objects from being shown in the legend. You also have the ability to change the name of the object, as it is displayed in the legend.
Change the Layer to edit to Transportation:
Change the Template to: \sample \layername
Change the Layer to edit to Base(vector)-Golden Contours.gsb
Change the Template to: \sample Elevation Contours
Now you can add the finishing touches, such as:
Clicking the General page in Properties, and setting the Type to Square
For the Title text, enter “Legend”. You can expand the Font properties and increase the size and edit other properties for the title font.
You can also select the new Golden Contours Base layer in Contents, and in Properties, on the General page, expand Properties | Line properties and change the Color to gray (or any other color). As soon as the properties are changed in the map, they are updated in the legend as well.
Add three vector base layers easily to your legend, choosing to show the layer name or custom text for the legend label.
Notes/Tips:
By default, the Value and Name for the sample in the legend is the object name in Contents.
You can set the object name for the objects in Contents to any attribute, so that way the attribute is displayed as the label in the legend.
The directives that are available to use in the legend layer template for base layers are:
\sample = this shows the point, polyline or polyline sample
\value = this shows the value for the object, which is the name of the object as shown in Contents
\name = this shows the name of the object. By default, this is the same as the value (the name of the object), but can be customized to anything you wish in the Show Samples dialog
\layername = this shows the layer name
There is a new option for Number of columns. If your layer has many samples in it you wish to include in the legend, then you can increate the number of columns to help distribute the samples. This works only on a per-layer basis. If you have one layer with 15 items, then you can display these in multiple columns. If you have 15 layers each with 1 item in it, then the Number of columns will not affect the display.
Logic:
All objects with the same properties and same names will be displayed as a single sample in the legend.
Objects that have different properties, with the same name, will be different samples in the legend.
Objects that have the same properties, but different names, will be different samples in the legend.
Comments
Please sign in to leave a comment.