panel
Define a new subpanel or reenter a previous one
Call signature:
panel(pid=None, rect=None)
Help text:
panel(pid, (x, y, w, h)) defines a new panel.
Either absolute or relative coordinates may be used: Absolute means (x, y, w, h) are specified in millimeters or points.
Relative means (x, y, w, h) are specified relative to figure size.
Coordinates are understood to be relative if all are ≤ 1.
In either case (x, y) are measured from top left.
panel(pid) revisits a previously defined panel.
panel() reverts to the top level.
If pid is None but a rectangle is specified, a new ID is automatically assigned and returned.
See also subplot.
Example:

import qplot as qp

import numpy as np

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

xx = np.linspace(0, 3*np.pi, 1000)

qp.plot(xx, np.sin(xx))

qp.shrink(1)

qp.pen(pattern='dash')

qp.brush('777')

qp.panel('B', np.array([2.1, 2.3, .9, .7])*72)

qp.pen(pattern='solid')

qp.plot(xx, np.cos(xx))

qp.shrink(5)