Alphabetical list Categories
qhcbar Add a horizontal color bar to a figure
Help text:

qhcbar(y0, x0, x1) adds a horizontal color bar to the figure between (x0, y0) and (x1, y0), expressed in data coordinates.
If x1>x0, the color bar to the right, else to the left.
qhcbar(..., w) specifies the width of the color bar in points (default: 5 points). If w is positive, the bar extends down below y0, otherwise to the left.
This only works after a preceding qimsc and uses the lookup table (qlut) used by that qimsc.
qhcbar uses qaxshift to create distance between y0 and the color bar.
Positive qaxshift creates space, negative creates overlap.
qhcbar without arguments creates a color bar below the qimsc.
See also qcaxis.

Example:

qfigure('qhcbar', 3, 3);

xx = repmat([1:10], 10, 1);

yy = xx';

zz = cos(xx).*sin(yy);

qimsc([0 0 1 1], zz, -1, 1);

qaxshift 5

qhcbar(0, 0, 1);

qaxshift 0

qcaxis([-1:1:1], {'negative', '0', 'positive'});

qshrink(1, 1);

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