Color Fill File (.cfl)
The color fill resource allows a great deal of tailoring of contour plots. The color fill values, colors and attributes especially for large lists can be cumbersome specified on the command line. Therefore, these resources can be specified in a color fill file. The parameters in this file are the same as those listed in the color_fill resource but the multiple parameters are listed on separate lines.
FORMAT
The syntax for each line is:
[value:]color[:attrib]
[value:]color[:attrib]
...
Where:
- value -- A contour value cutoff for the lower end of the contour range.
- color -- The color value (either number or name) or a range of color values
(either numbers or names).
The range is specified as follows:
color-color
This represents a contiguous range of numbers or of color names. For example, 2-4 gives colors 2,3,4. The values red-blue will give all the colors between red and blue in the color table. The colors can be an explicit color in hex representation (e.g. #ccff00 for red, green and blue). A value of off means no fills will be used (area is transparent). A color of end terminates the list. - attrib -- Any of the color attributes like fill style, line width each separated
by a colon listed below:
Attribute Description co=color Alternate way to specify color. wi=width Specifies the width of lines. This includes lines used in text and markers. The default value is 1.0. st=style Specifies the style of lines. Possible values are: - sol - solid lines (number 1)
- dsh - dashed lines (number 2)
- lsdsh - long short dashed lines (number 3)
- llsdsh - long, long, short dashed lines (number 4)
- dot - dotted lines (number 5)
- # - a number corresponding to the above styles
fo=font Specifies the font name. See the font_list resource. fi=fill
fp=fillSpecifies the fill pattern. Possible values are: - sol - solid fill (number 0)
- st - stippled fill (number 1)
- ost - open stippled (number 2)
- rst - random stipple (number 3)
- lst - large stipple (number 4)
- vln or || - vertical lines (number 5)
- drl or // - diagonal lines moving to upper right (number 6)
- dlr or \\ - diagonal lines moving to lower right (number 7)
- hln or -- - horizontal lines (number 8)
- hat or XX - hatched lines (number 9)
- 0% - 0 % fill (number 10)
- 1% - 11% fill (number 11)
- 2% - 22% fill (number 12)
- 3% - 33% fill (number 13)
- 4% - 44% fill (number 14)
- 5% - 55% fill (number 15)
- 6% - 66% fill (number 16)
- 7% - 77% fill (number 17)
- 8% - 88% fill (number 18)
- 9% - 100 % fill (number 19)
- ## - a number associated with the above patterns
la=label Specifies the label on the fill color bar. This can be text or a number. If not specified, this will be the value cutoff for this color. Use a "-" for no label. The default value is none. sc=scale
hi=heightSpecifies the scale factor. For text, this is the text height. For markers, this is the size of the marker. The default value is 1.0. te=expan Specifies the text expansion factor. This controls how wide text is plotted. An expansion factor greater than 1 results in fat text. A value less than 1 results in thin text. The default value is 1.0.
There are special lines that can be added to the top of the file:
- @label label
This specifies a label to be attached to the lower right of the color bar. This is useful for naming a color scheme (enhancement curve) and/or the units. - @value
This specifies that the values listed on each line are to be treated as data values. For image displays, you could specify the index value (0-255). For valued images, this would represent the actual values, as in IR temperatures.
EXAMPLES
For example:
0:white 10:red 30:blue 100:green
Specifies to contour white all areas running from values 0 to 10, red from 10 to 30, green from 30 to 100 and all values above 100 as green. The values less than 0 are not contoured.
0:white:st=2 10:red:wi=3 30:blue:fp=14:st=3 100:green:fp=16
For color fill contours, the attributes would use fill pattern 14 for the blue areas and fill pattern 16 for the green areas.
Here is a sample prec.cfl file:
.01:DDMagenta .05:DMagenta .1:MMagenta .175:BMagenta .25:Blue .375:LBlue .5:Green .75:LGreen 1:Brown 1.5:Yellow 2:Red 3:Lred 4:LGray
Here is a sample radmos2a.cfl file:
@label dBZ(winter) @value -150:off:la=| 0:aqua3:la=_ 2:aqua4:la=_ 4:aqua5:la=_ 6:aqua6:la=_ 8:aqua7:la=rain 10:aqua8:la=_ 12:aqua9:la=_ 14:aqua10:la=_ 16:aqua11:la=_ 18:aqua12:la=_ 20:green1:la=20 22:green2:la=_ ... 90:off:la=| 100:pink1:la=_ 104:pink2:la=_ 108:pink3:la=_ 110:pink4:la=_ 112:pink5:la=_ 114:pink6:la=mixed 116:pink7:la=_ 118:pink8:la=_ 120:pink9:la=_ 122:pink10:la=_
This is applied to a radar mosaic image. The @label is used to specify this is a winter color scheme and the units are dBZ. The individual like labels are used to denote the colors for rain, mixed and snow.
SEE ALSO
Last updated May 10, 2020