CBAR (Draw a colour scale bar)

This command will draw a colour scale bar and create a plot file that can be used in CPLOT to fill in the colour on the scale bar.

Command Syntax:

CBAR refp,x,y,dx,dy,att

zone,zlog,zmlt,zoff,zfmt,att,height,width,space,slant,font 

text,off,att,height,width,space,slant,font 

Command Parameters:

refp

Reference point (0 - 11) from which to refer the following offsets. The default is reference point 6.

x,y

Location of the bottom of the colour bar relative to the reference point. The default is -6,0 cm. This places the colour scale bar in the top half of the map, 6 cm from the right edge.

dx,dy

The size of the colour box in map units. Default is 1,0.6 cm.

att

Attribute used to draw box edges.

Sub-Command Parameters Line 1: 

zone

Colour zone table name. The Default file format is a Zone file (*.ZON), but you the program will also accept an Image Aggregate File (*.AGG) , Geosoft Table File (*.TBL) or Index Transform File (*.ITR)

zlog

Control logarithmic annotation of the zones. If the grid file is logarithmic, the colour zone values will be in decades and should be converted back to linear space for annotation:

0    Annotate, as is in the zone file (default).

1    Take 10 to the power of the zone value.

zmlt

The zone value is multiplied by this number before the zone is plotted. The default is 1.0. Use this to scale the values to match contour values if necessary.

zoff

Offset in map units, left of the colour bar at which to plot the zone numbers. The zone numbers are always plotted right justified on this point. Use a negative number to place the numbers on the right side of the bar.

zfmt

Decimal places

-3, -4, etc.   Exponential with (0, 1, etc.) decimal places (values

                     equal to or less than –3)

-2                 Full precision (default).

-1                 Integer.

0, 1, etc.      Number of decimal places (values equal to or greater

                     than zero)

att

Attribute for plotting numbers.

height

Character height (default dy/3)

width

Character width (default 0.3 cm).

space

Character spacing (default 0.3 cm)

slant

Character slant (default 0)

font

Text font.

Sub-Command Parameters Line 2: (this line can be repeated)

text

Scale bar title text. The title is plotted immediately below the colour bar.

off

The offset in map units below the bar or previous text. The default is a function of the text height.

att

Attribute for plotting title.

height

Character height.

width

Character width.

space

Character spacing.

slant

Character slant (Default 0)

font

Text font.

  • Duplicated colours in the zone file will not be plotted.
  • If the colour box height is too small to annotate the zone boundaries without over-lapping, intermediate zone annotations will be skipped.
  • Example
    CBAR 6,-4,0

    Z1 

    "Total Field" 

    "(nT)" 

    This will draw a colour scale bar 4 map units left of the center of the right edge of the map. A grid file name CBAR.GRD will also be created in the local directory. This grid can be used with CPLOT to fill the scale bar with colour.

  • This command is part of the MAPPLOT GX.