phatch
Hatch a polygonal patch in paper space
Call signature:
phatch(xx, yy, pattern='|', angle=None, rad=None, deg=None, spacing=None, offset=0)
Help text:
phatch(xx, yy, angle) hatches a polygon with vertices at (xx, yy) using the given pattern.
pattern is a single character from the following:
| / - \ : lines at the angle suggested by the shape of the character
+ x : combination of either orthogonal or diagonal lines
: * : marks in an orthogonal or hexagonal pattern.
Lines are rendered with the current pen.
Marks are rendered as by mark, i.e., with the current marker (and pen and brush).
Instead of a pattern, a numeric angle may be specified in radians using the rad argument or in degrees using the deg argument. Either way, angles are counterclockwise from horizontal.
Optional argument spacing specifies space between lines, in millimeters or points. The default is 3.5 mm (10 points).
By default, the line pattern is aligned with the center of the polygon, but offset shifts this center by the given number of millimeters or points.
x and Y are relative to the top-left of the panel, or to the position set by at. Positive is right and down.
NaN values in xx or yy may be used to separate multiple polygons to be drawn with common line pattern alignment.
If you draw right up to any edge of the panel, shrink may fail.
See also hatch.
Example:

import qplot as qp

import numpy as np

qp.figure('phatch', 3, 3)

qp.marker('o', 3)

qp.mark([1, 3], [2, 1])

qp.at(1, 2)

qp.pen('none')

qp.brush('b')

qp.marker('d', 5, 'brush')

qp.phatch([10, 30, 30, 10], [10, 10, 30, 30],

                    pattern=':', spacing=7)

qp.at(3, 1)

qp.pen('r', .5)

qp.phatch([10, 20, 30, 20], [-10, 0, -10, -20],

                    pattern='x', spacing=5)

qp.shrink()