imsc
Plot 2D data as an image using lookup table
Call signature:
imsc(data, rect=None, c0=None, c1=None, xx=None, yy=None)
Help text:
imsc(data) plots the data as an image using a lookup previously set by qlut. The color axis limits default to the min and max of the data.
Optional arguments c0 and c1 override those limits.
Optional argument rect specifies (x, y, w, h) rectangle for placement as for image. Alternatively, xx and yy arguments can be used.
Download pdf
Example:
import pyqplot as qp
import numpy as np
qp.figure('imsc', 3, 3)
xx = np.tile(np.arange(11), (11,1))
yy = np.transpose(xx)
zz = np.cos(xx) + np.sin(yy)
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()
Download source.