OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis     
Skip Navigation Links
All BooksExpand All Books
TutorialsExpand Tutorials
GraphingExpand Graphing
ContourExpand Contour

6.9.6 Contour Plot with Vector Overlay


This tutorial will demonstrate how to create a contour plot with vectors overlay.

Contour with Vector 01.png

What you will learn

This tutorial will show you how to:

  • Create and customize a contour graph and its color scale
  • Create the XYAM vector graph
  • Merge the two graphs


This tutorial is associated with <Origin EXE Folder>\Samples\Tutorial Data.opj.
Also, you can refer to this graph in Origin Central. (Select Help: Origin Central menu or press F11 key , and then open Graph Sample: Contour)

Create the Contour Graph

  1. Open Tutorial Data.opj and browse to the Contour Plot with Vector Overlay folder in Project Explorer (PE).
  2. Activate the W147 matrix and select Plot: Contour/Heat Map: Color Fill in the menu. The graph should appear as shown below:
    Contour with Vector 02.png
  3. Select Format: Plot Properties to bring up the Plot Details dialog. In the Colormap/Contours tab customize the Contour settings as shown below:
    • In the Level heading set the following levels:
    Contour with Vector 03.png
    • In the Fill heading select Load Palette, and choose Temperature from the Palette list. Click OK.
    • In the Line heading, enable the Color check box under Apply to All and choose Gray in the Color drop-down list. Click OK.
  4. In the Numeric Formats tab of the Plot Details dialog, select the Significant Digits radio button and set the value to 1. Click OK.
    Contour with Vector 04.png
  5. To prepare for merging with the XYAM Vector Graph that will be created below, the axes must be hidden. Select Format: Layer Properties and in the Display tab deselect the X Axes and Y Axes check boxes. Click OK.
    Contour with Vector 05.png
  6. Right click on the Y Axis title and choose Delete. Do the same for the X Axis title.
  7. To change the color scale, double-click on the scale object. Update the settings as given below:
    • In the Labels node,
      • Set the Font to Verdana.
      • Set the Size to 22.
    Contour with Vector 06 1.png
    • In the Layout page,
      • Select Black Line from the Background drop-down list,
      • Set Color bar thickness to 100.
    Contour with Vector 06.png
    • In the Line and Ticks page, uncheck Show Line and Ticks on Right and Show Border check box

    Contour with Vector 15.png

    Click OK and position the color scale in the desired location on the right side of the graph by selecting and dragging it.

    The contour plot should now appear as shown below:
    Contour with Vector 07.png

Create the XYAM Vector Graph

  1. Activate the WOR81147 worksheet, highlight the last three columns and select Plot: Specialized: Vector XYAM in the menu.
  2. Double-click on any vector to bring up the Plot Details dialog on the Vector tab. Use the settings shown below:
    Contour with Vector 08.png
    Then click OK.
  3. To update the axis scales, select Format: Axes: X Axis... to open the dialog and complete the following:
    • On the Scale tab, set X From = 1, To = 10 and Value of Increment = 2.
    Contour with Vector 09.png
    • On the Scale tab, choose Vertical icon in the left panel of Axis dialog. Set the scale of Y as From = 5, To = 95, and Value of Increment = 10.
    • Go to the Line and Ticks tab in the Axis dialog. Press Ctrl key to select the Top and Right icon in the left panel. Then check Show Line and Ticks check box, and set the Style of Major Ticks and Minor Ticks to In. The top X and right Y axis will be shown with line and ticks.
    Contour with Vector 13.png
    • Click OK.
  4. At this stage, you may notice that the vectors extend outside the axes (layer frame). To make sure they display within the layer frame, select Format: Layer Properties and in the Display tab check the Clip Data to Frame box. Click OK.
    Contour with Vector 10.png

  5. Right-click on the legend of the vectors graph, and select Properties... in the context menu to open the Object Properties. Set the dialog as shown below:
    Contour with Vector 11.png

    Contour with Vector 11-b.png

Merge the Two Graphs

The contour and vector graphs are generated by the steps above, and are ready to be merged into one.
  1. Minimize or Hide all other graphs except for the contour and vector graphs created using the instructions above. With one of the two graphs active, select Graph: Merge Graph Window... from the main menu.
  2. In the Merge Graph dialog, specify the settings as the following:
    • Expand the Arrange Settings node, and set the Number of Rows as 1.
    • Expand the Spacing (in % of Page Dimension) node, and enter a value of approximately "25" in the Right Margin text box to show the color scale legend from the contour plot. Click OK.

    Contour with Vector 12.png
  3. Click the Text Tool button Button Text Tool.png to create a text at the top color scale legend, and enter w (ms-1). Highlight -1 in the text and click on Superscript button Button Superscript.png in the Format toolbar. Set the font size to 26.
  4. To set font type as Verdana for all the objects:
    • Set the objects individually, by clicking on the object and selecting Verdana in the Font buttonButton Font.png in the Format toolbar.

    The final graph should look something like this:
    Contour with Vector 01.png

© OriginLab Corporation. All rights reserved.