Colour Legend Bar

When designing a map that includes a grid, you may want to add a colour legend bar based on the grid. You can do this quickly using the functionality available through the Colour Legend Bar tool (geogxnet.dll(Geosoft.GX.Map.ColourBar;Run)*) to create a horizontal or vertical legend bar for a colour grid or a colour-shaded grid image.

You can preview your changes in real time without closing the dialog. As you adjust the colour bar settings, the changes are dynamically applied to the map’s colour legend bar.

The tool can be accessed from the following locations:

  • Grid and Image > Display on Map menu
  • Map Tools > Symbols menu
  • Section Tools menu
  • Euler 3D > Plot Solution Symbols menu—requires the Grav/Mag Interpretation extension

Colour Legend Bar dialog options

Data layer

Select the data layer to use for generating the colour legend bar. The colour zones in the legend bar will be based on the selected AGG group/data layer.

To add a colour legend bar, a map must include a view\AGG_layer for the primary colour bar ITR.

Script Parameter: COLORBAR.AGG

Second data layer

Optionally, select a second colour layer, generally intended to add shading to the colour bar for a shaded-colour image. The secondary colour scheme is blended horizontally within the primary colour scheme.

To plot only the primary colour scheme of a shaded colour grid, leave this entry blank.

Script Parameter: COLORBAR.AGG2

Titles

Title

Specify the colour bar title—typically referencing the grid it represents.

Script Parameter: COLORBAR.TITLE

Sub-title 1 & 2

Optionally, provide up to two additional lines of text to elaborate on the data, such as the colour distribution method (e.g., linear distribution) or the data units.

Script Parameters: COLORBAR.SUBTITLE & COLORBAR.SUBTITLE2

Title location

Specify the location of the title relative to the colour bar. The available options depend on the selected orientation:

If Orientation is Vertical:

  • Above

  • Below

If Orientation is Horizontal:

  • Above, centered

  • Above, left justified

  • Below, centered

  • Below, left justified

Script Parameter: COLORBAR.TITLELOC [ |0 - Below Left |1- Below & Below centered |6 - Above left |7 - Above & Above centered]

Title text size (mm)

Specify the text size for the main title, in millimetres.

Script Parameter: COLORBAR.TITLE_SIZE

Sub-title text size (mm)

Specify the text size for the sub-titles, in millimetres.

Script Parameter: COLORBAR.SUBTITLE_SIZE

Colour Bar

Orientation

The colour bar can be displayed vertically or horizontally to best suit your map layout. Select one of the two options below:

  • Vertical

  • Horizontal

Script Parameter: COLORBAR.BAR_ORIENTATION [0 – Vertical |1 – Horizontal]

Location

X & Y Location (mm)

 

Specify the location of the lower-left corner of the colour bar relative to the lower- left corner of the map, in plotting units (millimetres).

Script Parameters: COLORBAR.X & COLORBAR.Y

[Locate]

Click the Locate button to interactively select the colour bar's position. The selected point becomes the lower-left corner of the colour legend bar. The X & Y Location values will update accordingly.

If the map already contains one or more colour legend bars for other grids (AGGs), you'll be prompted to either select a new location or reuse the position of an existing legend bar.
Size

Width /Height (mm)

Specify the smallest dimension of the colour bar. Depending on the bar orientation, this parameter will refer to either the width or the height of the bar:

  • If Orientation is Vertical, this refers to the Width of the bar.

  • If Orientation is Horizontal, this refers to the Height of the bar.

Script Parameter: COLORBAR.WIDTH

Height style

Choose how the size of the colour legend bar or its colour subdivisions is determined:

  • Fixed – select this option to specify a fixed height for the vertical bar or a fixed width for the horizontal bar. The dimension of the colour bar subdivisions (cells) will then be calculated based on the fixed bar size and the number of colour bins (i.e., the number of colour zones associated with the selected Data layer colour scheme).

  • Auto /Variable – select this option if you want to specify the size of the colour bar cells. The vertical bar height or the horizontal bar width will then be determined based on the specified cell size and the number of colour bins (i.e., the number of colour zones associated with the selected Data layer colour scheme).

Script Parameter: COLORBAR.HEIGHT_STYLE [ 1 - Fixed |0 - Auto/Variable]

Height /Width (mm)

Or

Cell height /Cell width (mm)

If the Height style option is Fixed:

  • If the Orientation selection is Vertical, this parameter refers to the Height of the bar.

  • If the Orientation selection is Horizontal, this parameter refers to the Width of the bar.

Enter the bar height /bar width (in millimetres).

Script Parameter: COLORBAR.MAXHEIGHT

If the Height style option is Auto /Variable:

  • If the Orientation selection is Vertical, this parameter refers to the Cell height of the bar.

  • If the Orientation selection is Horizontal, this parameter refers to the Cell width of the bar.

Enter the cell height /cell width (in millimetres).

Script Parameter: COLORBAR.HEIGHT

Labels

Labels

Choose how to annotate the colour legend bar—either using actual grid values or percentile breaks:

  • Values (default)

  • Percentiles (a "%" symbol will be added to the colour bar annotations on the map.)

Script Parameter: COLORBAR.POST [ 0 - Values |1 - Percentiles]

Label intervals

Specify how labels are placed along the colour bar:  

  • Colour break (default): Annotations appear at the boundaries between colour zones.
  • Custom intervals: Annotations are placed at equal data intervals.
  • Specific intervals: Annotations are based on user-defined intervals.
If annotations are too close together (i.e., overlapping), they will be suppressed. You may need to increase the bar size or decrease the label text size. In addition, for custom intervals, fine-interval labels are dropped first, followed by coarse-interval labels if necessary.

Script Parameter: COLORBAR.ANNO_LOCATION [0 - at colour break| 1 - custom intervals| 2 - exact intervals]

Custom intervals

 

When this option is selected, two contextual entries— Coarse and Fine—become available.

  • Coarse interval is required.

  • Fine interval is optional and allows for more detailed gradation of the colour bar annotation.

The Fine interval options are limited to ½, ¼, ⅕, or ¹⁄₁₀ of the Coarse interval.

Grid summary statistics (minimum, maximum, mean value, standard deviation) are displayed to assist in selecting appropriate intervals:

Script Parameters:

COLORBAR.FIXED_INTERVAL

COLORBAR.FIXED_MINOR_INTERVAL

Specific intervals

When selected, you will be prompted to provide an Interval filename–a file containing the desired interval (bin) values. The values in the file can be: 

  • Comma-separated on a single line, or

  • One value per line

If the number of bins in the colour table does not match the number of supplied colour levels (intervals), or if the intervals fall outside the colour zone range, an tooltip will notify you. Ensure the interval file’s min/max values overlap with the grid’s data range.

You can also set the intervals to be wider in the low or high ranges to emphasize detail in the opposite end.

Script Parameter: COLORBAR.EXACTINTERVAL_FILE

Post end value /Post end percentile

You can post the data minimum and maximum end values or the colour stretch limits, and you can also opt for no labels at the two ends of the colour bar:

  • Data: The minimum and maximum of the grid data range are posted.

  • Colour scheme: The minimum and maximum values of the colour distribution are posted.

  • None: No labels are added at the two ends of the bar.

You can adjust these values to cover a smaller range or to round them off. Use the calculator button located next to the fields to restore the default values.

The end values of the colour bar on the map will be annotated with the same number of significant digits and with the same size as the rest of the annotations.

Script Parameter: COLORBAR.POST_END_VALUE [ 0 - None |1 - Data| 2 - Colour scheme]

Minimum value /Maximum value

 

If posting by Values, these entries are populated with the minimum and maximum values of the data range or colour distribution.

Script Parameters:

COLORBAR.MINIMUM_END_VALUE

COLORBAR.MAXIMUM_END_VALUE

Minimum percentile /Maximum percentile

If posting by Percentiles, the entries will default to a first and last value of 0 and 100, respectively.

Script Parameters:

COLORBAR.MINIMUM_END_VALUE

COLORBAR.MAXIMUM_END_VALUE

Add ≤ or ≥ symbol to last values

You may want to turn on this option, for example, when your data exceeds the colour stretch limits. This will prefix the final labels of the end values with ≤ or ≥ symbols to symbolize the "less than, equal to" and "greater than, equal to" values.

Script Parameter:

COLORBAR.ADD_GREATER_LESS_THAN_SYMBOLS [ 0 - No |1 - Yes]

Division style

The colour scheme can be optionally subdivided by separators. Choose how to visually separate colour zones:

  • Solid line (default) 

  • Tick

  • None

Script Parameter: COLORBAR.DIVISION [ 0 - None |1 - Solid | 2 - Tick]

Text size (mm)

Specify the label text size in millimetres.

For Custom intervals:

  • If only a Coarse interval is defined: Labels use the specified size with medium font weight.

  • If both Coarse and Fine intervals are defined:

    • Coarse-interval labels: specified text size, bold font

    • Fine-interval labels: 75% of specified text size, medium font

Script Parameter: COLORBAR.ANNSIZE

Number of decimals

Specify the number of decimal places for annotated values.

Script Parameter: COLORBAR.DECIMALS

Orientation

Labels are horizontal by default. For horizontal colour bars, vertical annotations may improve clarity.

  • Vertical

  • Horizontal

Script Parameter: COLORBAR.LABEL_ORIENTATION [0 - Horizontal | 1 - Vertical]

Placement

The annotation can be placed: 

  • To the left or to the right of a vertical bar.

  • Above or below a horizontal bar.

Script Parameter: COLORBAR.ANNOTATION_SIDE [0 - left/above |1 - right/below]

Minimum gap between labels (mm)

Specify the minimum spacing between labels. If labels overlap, they will be suppressed. If the default gap is not satisfactory, then provide this parameter.

If the maximum height is set, and the product of the colour cell height and the number of zones exceeds the maximum height, this value is reduced automatically to avoid "overprinting".

Script Parameter: COLORBAR.MINIMUM_GAP

[Apply]

Click Apply to create the colour legend bar on the map or to update an existing one with the current settings. For a new legend bar, a group is created in the Base view as: COLORBAR _view name_AGG group_grid name.

The dialog remains open, allowing you to interactively view changes on the map.

*The GX.NET tools are embedded in the geogxnet.dll file located in the "...\Geosoft\Desktop Applications \bin" folder. If running this GX interactively, bypassing the menu, first change the folder to point to the "bin" directory, then supply the GX.NET tool in the specified format. See the topic Run GX for more details on running a GX.NET interactively.