ChartDirector 7.0 (Python Edition)

XYChart.addDiscreteHeatMapLayer2


Usage

addDiscreteHeatMapLayer2(xGrid, yGrid, zData)

Description

Adds a discrete heat map layer to the XYChart by specifying the cell values and positions.

The cells are assumed to be arranged as a regular grid. The xGrid and yGrid arrays can be the center coordinates of the cells or the boundary coordinates of the cells.

Suppose there are 9 cells (the zData array contains 9 values). If the xGrid and yGrid arrays each contains 3 values, the cells will be assumed to be arranged as a 3 x 3 grid, and the xGrid and yGrid will be assumed to be the center coordinates of the cells.

If the xGrid array and yGrid array each contains 4 values instead, they will be assumed to be the boundaries of the cells. The first column of cells will occupy the space between xGrid[0] and xGrid[1], the second column between xGrid[1] and xGrid[2], and the third column between xGrid[2] and xGrid[3]. The same applies to the yGrid.

In general, if xGrid and yGrid contains enough values to be used as the boundary coordinates, they will be assumed to be the boundary coordinates. Otherwise they will be assumed to be the center coordinates.

Arguments

ArgumentDefaultDescription
xGrid(Mandatory)An array containing the x coordinates of the centers or boundaries of the cells.
yGrid(Mandatory)An array containing the y coordinates of the centers or boundaries of the cells.
zData(Mandatory)An array containing the data values of the cells.

Return Value

A DiscreteHeatMapLayer object representing the discrete heat map layer created.