Alphabetical list Categories
errorpatch Draw error patch
Call signature:

errorpatch(xx, yy, dy=None, dir='both')

Help text:

errorpatch(xx, yy, dy) plots an error patch at (xx, yy ± dy).
Normally, xx, yy, and dy all are N-vectors. errorpatch(..., 'up') only plots upward; errorpatch(..., 'down') only plots downward.
To specify downward and upward errors separately, dy may be shaped Nx2.
dy must be positive, even for the downward error.

errorpatch(xx, yy), where yy is shaped Nx2, directly specifies the bounds as (xx, yy[:,0]) and (xx, yy[:,1]), much like matplotlib's fill_between.

Example:

import qplot as qp

import numpy as np

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

tt = np.linspace(-np.pi, np.pi, 50)

qp.brush('555')

qp.pen('none')

qp.errorpatch(tt, np.sin(tt), .2*np.cos(tt)+.3)

qp.pen('k', 1, cap='round')

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

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