# turicreate.visualization.heatmap¶

turicreate.visualization.heatmap(x, y, xlabel='__TURI_DEFAULT_LABEL', ylabel='__TURI_DEFAULT_LABEL', title='__TURI_DEFAULT_LABEL')

Plots the data in x on the X axis and the data in y on the Y axis in a 2d heatmap, and returns the resulting Plot object.

The function supports SArrays of dtypes int, float.

Parameters: x : SArray The data to plot on the X axis of the heatmap. Must be numeric (int/float). y : SArray The data to plot on the Y axis of the heatmap. Must be numeric (int/float) and must be the same length as x. xlabel : str (optional) The text label for the X axis. Defaults to “X”. ylabel : str (optional) The text label for the Y axis. Defaults to “Y”. title : str (optional) The title of the plot. Defaults to LABEL_DEFAULT. If the value is LABEL_DEFAULT, the title will be “ vs. ”. If the value is None, the title will be omitted. Otherwise, the string passed in as the title will be used as the plot title. out : Plot A :class: Plot object that is the heatmap.

Examples

Make a heatmap.

>>> x = turicreate.SArray([1,2,3,4,5])
>>> y = x * 2
>>> heat = turicreate.visualization.heatmap(x, y)