Alphabetical list Categories
patch Draw a polygonal patch in data space
Call signature:

patch(xx, yy)

Help text:

patch(xx, yy) draws a polygon with vertices at (xx,yy). The polygon is automatically closed (i.e., it is not necessary for xx[-1] to equal xx[0]).
The polygon is filled with the current brush.
xx and yy are given in data coordinates. See also area and garea.

Example:

import qplot as qp

import numpy as np

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

qp.brush('g')

xx = np.linspace(0, 2*np.pi, 7)

qp.patch(np.cos(xx), np.sin(xx))

qp.brush('r', .5)

qp.patch(np.sin(xx), np.cos(xx))

QPlot Documentation — (C) Daniel Wagenaar, 2014–2023