Alphabetical list Categories
bars Bar plot in data coordinates
Call signature:

bars(xx, yy, w=None, y0=0)

Help text:

bars(xx, yy, w) draws a bar graph of yy vs xx with bars of width w specified in data coordinates.
bars(xx, yy, w, y0) specifies a nonzero baseline of the plot.
y0 may also be a vector, which must be the same length as xx and yy. This is useful for creating stacked bar graphs. Note that yy is never relative to y0.
If w is not given, it defaults to mean(diff(xx)).
If the length of the xx vector is one greater than the length of the yy vector, the xx vector is taken to represent the edges of the bins.
See also hbars and skyline.

Example:

import qplot as qp

import numpy as np

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

qp.brush('777')

xx = np.arange(0,4*np.pi,1)

qp.bars(xx, np.sin(xx), 0.5)

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