Heatmap
Hereafter are presented the available options for heatmaps in mathlayer®.
Colors and labels
Options | Description | Values | Default Values |
colorScale | Specifies the colors for the values that will generate the heatmap. | A cell array of colors in Hex, RGB or HSL representation. First color will represent the lowest value. | {"blue","cyan","yellow","red"} |
gradientHM | Specifies whether if the heatmap will be generated with defined rectangles of color for each value or with smooth colors. | true or false. | false |
rangeMin rangeMax | Specifies the percentage of values between color1 and color2 (minimum), and between color3 and color4 (maximum). | Any number from 1 to 99. | rangeMin: 33 rangeMax: 33 |
legendTicks | Sets the number of ticks of each axis. | Any natural number. | 5 |
legendFormat | Specifies the format of the numers displayed on the axes and on the canvas. | Any format suported by d3 library. | '.1f' |
xAxisPos yAxisPos | Defines the position of the labels for X and Y coordinates. | xAxisPos: 'Bottom' or 'Top'. yAxisPos: 'Left' or 'Right'. | xAxisPos: 'Bottom' yAxisPos: 'Left' |
x = rand(10) labX = {'one','two','three','four','five','six','seven','eight','nine','ten'} options = struct% initializing options struct for individual graphs
options.colorScale = {'#e6f6ff','#0085cc','#002133'} options.legendTicks = 3 options.xAxisPos = 'Top' options.yAxisPos = 'Right' options.gradientHM = true options.xAxisLabels = labX heatmap(x,options)