carat.display.map_show

carat.display.map_show(data, x_coords=None, y_coords=None, ax=None, n_tatums=4, clusters=None, **kwargs)[source]

Display a feature map.

Parameters:
data : np.ndarray

Feature map to display

x_coords : np.ndarray [shape=data.shape[1]+1]
y_coords : np.ndarray [shape=data.shape[0]+1]

Optional positioning coordinates of the input data.

ax : matplotlib.axes.Axes or None

Axes to plot on instead of the default plt.gca().

n_tatums : int

Number of tatums (subdivisions) per tactus beat

clusters : np.ndarray

Array indicating cluster number for each pattern of the input data. If provided (not None) the clusters area displayed with colors.

kwargs : additional keyword arguments

Arguments passed through to matplotlib.pyplot.pcolormesh.

By default, the following options are set:

  • cmap=gray_r
  • rasterized=True
  • edgecolors=’None’
  • shading=’flat’
Returns:
axes

The axis handle for the figure.

See also

matplotlib.pyplot.pcolormesh