Note: Starting with Origin 2019b, Heatmap with Labels is a built in plot type! The instructions below can be used in older versions of Origin.
Heatmap diagram can be used to visualize tabulated dataset. Correlation coefficient table generated in Origin is suitable to be presented this way. In addition, user may also want to label the exact Z value of each block in the heatmap for comparison as shown above. In this blog we will show the steps to generate such diagram. Please download the attached zip file to see the result. Note that Heatmap with labels is a new plot type introduced in Origin 2019. For earlier versions of Origin, user has to manually add points to the heatmap and label them.
- Open a new project or a new workbook. Import the data file \samples\Statistics\Protein Consumption in Europe.dat.
Hightlight col(B) through col(J), then select Statistics: Descriptive Statistics: Correlation Coefficient.
In the dialog, make sure under Correlation Types node, Pearson checkbox is checked. Click OK.
Switch to Pearson1 worksheet, highlight entire worksheet and choose Plot : 2D :Heat map: Heatmap with Labels menu. In the dialog, set X and Y data info as below and click OK to create heatmap.
- The colormap levels are from -0.715 to 1. To change the levels to be from -1 to 1, right click the plot and choose Colormap: Set Levels context menu. Set the levels to -1 to 1. Increment by 0.4.
- Double click on the graph, switch to Label tab. Change the label formats as below:
- The heatmap diagram with labels should look like below:
2 Comments on “Heatmap With Labels”
How can I exclude the value zero “0” from being represented as a label?
Hi Jose, Thank you for your question. At this time, the only way to do this would be to replace zeros “0” with blanks. However, we will look into improving this for our next version. If you have any further questions, please contact us at email@example.com. Best, OriginLab