Dataplot Vol 1 Vol 2

# REGION PATTERN COLOR

Name:
REGION PATTERN COLOR
Type:
Plot Control Command
Purpose:
Specifies the color used for cross-hatch fill regions on subsequent plots or for certain types of diagrammatic graphics.
Description:
On a plot, a region is defined as the figure formed by the line connecting points belonging to a common trace and a region base (typically zero). The REGION FILL and REGION PATTERN commands can be used to generate a solid or cross-hatch fill of this region. The REGION FILL COLOR command specifies the color for solid fill regions while the REGION PATTERN COLOR command specifies the color for cross-hatch lines. Other attributes of the fill are set with additional REGION commands (see the RELATED COMMANDS section below). The attributes of the region border are set with LINE, LINE COLOR, and LINE THICKNESS commands.

The diagrammatic graphics commands CIRCLE, CUBE, DIAMOND, ELLIPSE, HEXAGON, PYRAMID, SEMI-CIRCLE, and TRIANGLE can be filled using the REGION FILL command. The BOX command has its own attribute setting commands.

Dataplot provides two methods for specifying colors.

1. Colors can be defined by name (or by the corresponding index). Dataplot adopted it's named colors from the X11 project. Currently, 162 named colors and 100 levels of grayscale are supported. Grayscale can be specified with either G0, G1, ..., G100 (or -1, -2, ..., -100). Many older devices support only a limited number of colors. For these devices, unsupported colors will be mapped to one of the available colors. To specify a named color, see Syntax 1.

2. Most modern graphics devices support full RGB (RedBlueGreen) color. You can alternatively specify RGB colors by entering three integer values to represent the Red, Green and Blue components, respectively. These values should be in the range 0 to 255.

When setting the character color, Dataplot first checks if the device supports RGB colors. If not, the named color will be used. If the device does support RGB color, Dataplot will check if an RGB color has been specified. If yes, then that RGB color is used. If not, the named color will be used.

To see the list of supported named colors (with the associated index number), see

Syntax 1:
REGION PATTERN COLOR <color> <color> <color> etc.
where <color> is a character string or index number that specifies the desired color. Up to 100 region pattern colors can be specified.
Syntax 2:
REGION PATTERN RGB COLOR <ired> <igreen> <iblue> <ired> <igreen> <iblue> etc.
where <ired> specifies the red component of the region pattern color;
<igreen> specifies the green component of the region pattern color;
and      <iblue> specifies the blue component of the region pattern color.

Up to 100 triplets of RGB colors can be specified.

The components should be integer values in the range 0 - 255. To turn off the RGB color, set the components to -1 (any negative value will work and if any of the three components is negative the RGB color will be turned off).

Examples:
REGION PATTERN COLOR RED BLUE GREEN
REGION PATTERN COLOR BLACK ALL
REGION PATTERN COLOR ALL BLACK
REGION PATTERN COLOR
REGION PATTERN RGB COLOR 201 101 88
REGION PATTERN RGB COLOR 201 101 88 ALL
REGION PATTERN RGB COLOR 201 101 88 240 200 175
REGION PATTERN RGB COLOR -1 -1 -1 ALL
Note:
The diagrammatic graphics commands use the first setting of the REGION PATTERN COLOR command only.
Note:
The REGION PATTERN COLOR command with no arguments sets the region pattern color to default for all regions. The REGION PATTERN COLOR command with the word ALL before or after the specified color assigns that region pattern color to all regions; thus REGION PATTERN COLOR BLACK ALL or REGION PATTERN COLOR ALL BLACK plots all region fills in black.
Note:
The REGION, BAR, SPIKE, CHARACTER, and LINE switch all work independently of each other. That is, a plot point can be a line, a character, a spike, a region, a bar, or any combination of the above.
Default:
All region pattern colors are black.
Synonyms:
None
Related Commands:
 PLOT = Generates a data or function plot. REGION BASE = Sets the base locations for plot regions. REGION FILL = Sets the on/off switches for region fills. REGION FILL COLOR = Sets the color for region solid fills. REGION PATTERN = Sets the types for region fill patterns. REGION PATTERN LINE = Sets the line types for region fill patterns. REGION PATTERN SPACING = Sets the line spacing for region fill patterns. REGION PATTERN THICKNESS = Sets the line thickness for region fill patterns. LINE = Sets the types for plot lines. LINE COLOR = Sets the color for plot lines. LINE THICKNESS = Sets the line thickness for plot lines.
Applications:
Presentation Graphics
Implementation Date:
Pre-1987
1993/10: Added the capability to do cross-hatch fills for non-rectangular regions
2020/11: Added support for RGB colors
Program 1:

REGION FILL ON
REGION PATTERN D1D2
REGION PATTERN SPACING 3
REGION PATTERN THICKNESS 0.3
REGION PATTERN COLOR RED
LINE COLOR BLUE
LINE THICKNESS 0.5
.
Y1LABEL X**2
X1LABEL X
TITLE DEMONSTRATE THE REGION PATTERN COLOR COMMAND
.
PLOT X**2 FOR X = 1 1 9

Program 2:

skip 25
read wright11.dat pressure angle wing
let angled = distinct angle
let nangle = size angled
let wingd = distinct wing
let nwing = size wingd
.
title case asis
title offset 2
title Response Variable = Pressure
label case asis
x1label Wing Type
y1label uc()Alc()ngle
y1label displacement 12
tic offset units data
x1limits 1 nwing
major xtic mark number nwing
minor xtic mark number 0
xtic mark offset 0.8 0.8
x1tic mark label format alpha
x1tic mark label content 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17
y1limits 1 nangle
major ytic mark number nangle
minor ytic mark number 0
y1tic mark offset 0.8 0.8
y1tic mark label format alpha
y1tic mark label content 0 2.5 5 7.5 10 12.5 15 17.5 20 25 30 35 40 45
.
let ylevel = data 10 20 30 40 50
region fill on all
region pattern d1d2 all
region pattern thickness 0.5
region pattern spacing 3
.
region pattern color       red orange yellow green cyan blue
line color                 red orange yellow green cyan blue
region pattern rgb color   239 243 255  198 219 239  158 202 225 ...
107 174 214   49 130 189    8  81 156
line rgb color             239 243 255  198 219 239  158 202 225 ...
107 174 214   49 130 189    8  81 156
.
tabulation mean plot pressure angle wing ylevel
.
box fill thickness 0.5
box fill pattern d1d2
box fill gap 3
box shadow hw 0 0
.
box fill color blue
box fill rgb color 8 81 156
box 86 90 90 86
move 91 87; text > 50
.
box fill color cyan
box fill rgb color 49 130 189
box 86 86 90 82
move 91 83; text 40 - 50
.
box fill color green
box fill rgb color 107 174 214
box 86 82 90 78
move 91 79; text 30 - 40
.
box fill color yellow
box fill rgb color 158 202 225
box 86 78 90 74
move 91 75; text 20 - 30
.
box fill color orange
box fill rgb color 198 219 239
box 86 74 90 70
move 91 71; text 10 - 20
.
box fill color red
box fill rgb color 239 243 255
box 86 70 90 66
move 91 67; text < 10


NIST is an agency of the U.S. Commerce Department.

Date created: 03/30/2021
Last updated: 03/30/2021

Please email comments on this WWW page to alan.heckert.gov.