luts.get(name, N=None, reverse=False)
cm = luts.get(name) retrieves the named colormap.
Optional argument N specifies the number of colors to return. Default is dependent on the particular map.
Optional argument reverse specifies that the order of the colors should be reversed.
Use luts.families, luts.family, luts.names to explore available colormaps.
See also luts.set.
import qplot as qp
import numpy as np
qp.figure('luts.get', 3, 3)
xx = np.tile(np.arange(11), (11,1))
yy = np.transpose(xx)
zz = np.cos(xx) + np.sin(yy)
cc = qp.luts.get("qpjet")
qp.lut(cc)
qp.imsc(zz, xx=xx, yy=yy, c0=-2, c1=2)
qp.xaxis('X', [0,5,10], y=-.5, lim=[-.5, 10.5])
qp.yaxis('Y', [0,5,10], x=-.5, lim=[-.5, 10.5])
qp.cbar(width=10)
qp.caxis()
The full collection of available colormaps is shown here.