GetDiscreteColourMap

The GetDiscreteColourMap function of the mplreport class returns a lookup array of the possible values of a discrete property and the associated MatPlotLib RGB colours for those values, based on an AQLHistResponse object.

This is usually used to create heatmaps, status-lines, broken bar-charts or other colour-coded displays of discrete values. If colouring continuous values, use GetAnalogueColourMap.

Reports using this function may also want to use GetDiscreteLegend.

Parameters
ParameterTypeDefaultMeaning
dtaAQLHistResponseThe AQL query response, usually from FetchHistory.
colstrThe name of the column you want to build a colour map for
Return

This function returns a dictionary of values. Each value contains the matching colour array in RGBA format, with the alpha set to '1'.