Heat maps

Revision as of 22:04, 24 February 2015 by Lchrisman (talk | contribs)

Requires Analytica 4.6

Bar HeatMap.png Bar HeatMap2.png

Requirements

The requirements for a heat map are

  • The indexes for both axes must be categorical.
  • The value depicted by color must be categorical.

The indexes and the value must each contains no more than 30 distinct values. In the above graphs, the value contains only five distinct values.

Preparing your result variable

In the above graph, correlation is a continuous quantity, but to create the heat map, it had to be mapped to five discrete categories first. To do this, an index named Color_range was created with the five labels.

Heat map color range.png

And a table was created with the lower bound of each range.

Heat map bound.png

You then use this to discretize the continuous correlation using StepInterp.

StepInterp( Bound, Color_range, Abs(Correlation_matrix), Color_range, leftLookup:true )

The result is a 2-D array of labels.

Heat map table.png

When you create a heat map, you are actually graphing textual (or at least categorical) labels.

Configuring the graph

Once you have a result that satisfies the requirements, you can create the heat map graph as follows.

  1. . Show the result graph
  2. . Double-click on the graph to go to graph setup.
  3. . Select Bar style. Set Overlap to 100%. Click Apply.
  4. . Set Key to be your main value. Set the Horizontal Axis and Vertical Axis to the two indexes.
  5. . Bring up graph setup again and click the Axis Ranges tab. Check Categorical for both axes. Press Apply.

Configuring colors

You will most likely want to customize the colors of your heat map. To do so, right-click on any block and select Change Color Series.... From that dialog, customize the colors as desired. In most cases, you will probably want to leave the default as "General color sequence, this graph only.".

To do: encapsulating in a graph style template

Download an example

Download a Heat map.ana example model.

See Also

Comments


You are not allowed to post comments.