发布日期: 04/13/2021

Add Fill Patterns

Fill Pattern() sets the pattern for filled areas.

Matrix Example

Specify a mask (a matrix of values between 0 and 1) or an image. Each value in the matrix creates a pixel.

win = New Window( "Example",
	Graph Box(
		Fill Pattern(
			[1 0.5 0 0, 0.5 0 0 1, 0 0 1 0.5, 0 1 0.5 0]
		);
		Polygon( [10 30 90], [88 22 44] );
	)
);

Named Pattern Example

Specify a name in quotation marks that corresponds to a pattern shown in Table 12.3.

win = New Window( "Named Pattern Example",
	Graph Box(
		Fill Pattern( "vertical light" );
		Polygon( [10 30 90], [88 22 44] );
	)
);

Graphic Example

Specify an image in quotation marks. If the image is not installed on the viewer’s computer, question marks appear in the shape.

win = New Window( "Graphic Example",
	Graph Box(
		Fill Pattern( Open( "$SAMPLE_IMAGES/pi.gif", "gif" ) );
		Polygon( [10 30 90], [88 22 44] );
	)
);

Table 12.3 Fill Patterns 

Pattern Name

Pattern

left slant light

right slant light

vertical light

horizontal light

grid light

hatch light

h wave light

v wave light

hollow circle

left slant medium

right slant medium

vertical medium

horizontal medium

grid medium

hatch medium

h wave medium

v wave medium

filled circle

left slant heavy

right slant heavy

vertical heavy

horizontal heavy

grid heavy

hatch heavy

h wave heavy

v wave heavy

diamond

left slant heavy b

right slant heavy b

random

square

square offset

wide

tall

checkerboard

grid dots

triangle up

triangle down

triangle left

triangle right

weave light

weave heavy

honeycomb

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).