6.8.6 Create Heatmap with Virtual Matrix and Colormap Bar Plot

Contents


Video Image.png Video Text Image.png Website blog icon circle.png Blog Image 33x33px.png


Summary

This tutorial create two kinds of graph, a Heatmap Plot based on a virtual matrix together with a Bar Plot with Color Map, and merged them together.
Heatmap-21.png

Minimum Origin Version Required: 2015 SR0

What you will learn

This tutorial will show you how to:

Steps

Create Heatmap Plot from Virtual Matrix

This tutorial is associated with <Origin EXE Folder>\Samples\Tutorial Data.opj.

  1. Open the Tutorial Data.opj and browse to the folder Heatmap and Virtual Matrix Manager. Open workbook Electricity Usage with first sheet active.
  2. The XYZ mapping of workbook is shown in graph below, this will help you to understand how the Heatmap plot is created in next steps:
    Heatmap-01.png
  3. Highlight all cells in Z region by selecting the Cell in Column(B)-Row 1, then pressing CTRL+SHIFT+END. Click Plot > Contour: Heatmap in main menu to open the plotvm dialog for Heatmap plot.
  4. Specified the X, Y ranges as shown in graph below.
    Heatmap-02.png
  5. In this dialog, check Format X Data and Format Y Data check boxes, click the button Button ....png respectively to format X and Y data following the image below, then click OK to close the dialog.
    Heatmap-03.png
  6. The tick labels in Y axis are too dense to be seen, so now we are going to change that. Double click the axis in the graph to open the Axis dialog:
    Heatmap-04.png
    Heatmap-05.png
  7. Next, we will specify the scale and tick labels for X axis:
    Heatmap-06.png
    Heatmap-07.png
  8. Click the tick labels for both XY aixs in the graph, change the font size to 10 via Format Toolbar.
  9. Select Format: Plot in main menu with Heatmap graph active.
    Heatmap-19.png
    Click OK to close the Set Levels dialog
    Heatmap-20.png
    Heatmap-08.png
  10. In the Plot Details dialog, click the first tree node in left panel (should be Graph1 by default), change page size to 11*11 inch in Print/Dimensions tab, click Apply, then in the left panel, select the sub tree node for Layer1, go to the Size/Speed tab, change the Layer area follows graph below, click OK to apply the settings and exit the dialog:
    Heatmap-13.png
  11. We will turn off the speed mode by click the Button SpeedMode.png in Graph Toolbox to view the graph with higher resolution. The finished graph for Heatmap should be similar to the graph below:
    Heatmap-13-1.png

Once the Virtual Matrix were created, they will be saved internally. You can browse them in Virtual Matrix Manager. The saved Virtual Matrix can be used for Contour/Heatmap/3D surface plot directly, you can select the virtual matrix from the input box of the plot dialog as shown in graph below:

Heatmap-22.png

Create the Bar Plot with Colormap

  1. Go to the Temp sheet in Electricity Usage workbook, highlight the worksheet and select Plot > Basic 2D : Bar in main menu to create a Bar plot.
  2. Now, we will defined the style of axis:
    Heatmap-12-1.png
    Heatmap-12.png
  3. Next, we will create the Colormap for the graph, the Colormap theme should be identical to the Heatmap created before. Click the Format: Plot in main menu to open the Plot Details dialog:
    Heatmap-09.png
    Heatmap-10.png
    Heatmap-11-2.png
    Click OK to close the Set Level dialog and Click Apply in Plot Properties dialog to save the settings.
  4. In the left panel, select the first tree node (by default, Graph2), change page size to 11*11 inch in Print/Dimensions tab, click Apply, then switch to the Layer1 tree node and go to the Size/Speed tab, change the Layer area follows graph below, then,click OK to close dialog:
    Heatmap-14.png
    The finished bar plot is similar to the graph below:
    Heatmap-14-1.png

Merge the Heatmap Plot with Bar Plot and More Customization Steps

  1. Select Graph: Merge Graph Window in main menu with Heatmap graph active, merge Graph1 and Graph2 together, the Rearrange Layout should be unchecked, click OK to apply the setting.
    Heatmap-15.png Then, you will resize the size of the merged graph (Graph3), click Format: Page >> Print/Dimensions tab, change the page size to 11*11 inch again, click OK. Click CTRL+W to adjust the graph view.
  2. Specify the style of the color scale:
    Heatmap-16.png
    Heatmap-17.png
    Heatmap-18.png
    Click OK to apply the settings, drag the outline of the color scale in the graph to reach a proper size and location.
  3. Select the unwanted axis title or legend and delete them, add text object with graph information by using text tool.
    The finished graph is similar to the graph below:
    Heatmap-21.png