6.9.1 XYZ Contour
This tutorial will show you how to create a contour from XYZ data.
Minimum Origin Version Required: 2015 SR0
Prior to Origin 2018 SR0, the application of a custom boundary sometimes generated an imperfect fill at boundary margins. This has been improved in 2018. The user can restore the previous contour-fill behavior using system variable @TCSM.
What will you learn
This tutorial will show you how to
- Create a Contour Plot from XYZ data
- Customize levels, lines, and color mapping
- Use a Custom Boundary
- Cutomize the Color Scale
- Customize the axes of the plot
This tutorial is associated with the 2D and Contour Graphs project:\Samples\2D and Contour Graphs.opj
(Note: Users with Origin 2017 and later will find this data in Origin Central (press F11 to open) under Graph Samples > Contour Plots).
- Open the 2D and Contour Graphs: Contour: XYZ Contour folder in the Project Explorer. Activate Book1B and highlight column D and then click Contour-Color Fill button from the 3D and Contour Graphs toolbar.
- The graph should look like:
- Double-click on the contour plot to bring up Plot Details dialog. Select the Contouring Info tab and set the options in the dialog as the screenshot below:
- Select the Color Map/Contours tab, click the Level heading and set the dialog as the following screenshot shows:
- Click the Fill heading, select Load Palette and then select Rainbow from the Palette list and click OK to close dialog.
- Click the Lines heading, make sure that Show on Major Levels Only is selected. Select the Color check box under Apply to All and choose LT Gray from the drop-down list as contour line color. Click OK to close dialog.
- Click on the line at value 30 to customize it separately and click OK to close dialog.
- Then go back to the Colormap / Contours tab, clear the check box Follow Contour Line under Boundary so that the boundary line could have separate style.
- Click OK to close the Plot Details dialog, then select Format: Axes: X Axis... to open the Axis dialog. Then do the following things.
- Select the Scale tab and make sure the Horizontal axis icon is selected so X axis scale is being updated, set From, To equal to -127, -65.
- Select the Vertical axis icon to customize the Y axis scale, set From=23, To=50.
- Click OK to apply the setting and close the Axis dialog.
- Now we are going to change the layer size/aspect ratio and turn off the XY axes and its frame. Make sure the graph window is active and select Format:Layer Properties to open the Plot Details - Layer Properties dialog, first go to the Size/Speed tab and change the values in Layer Area as below:
- Go to the Display tab and clear the X Axes and Y Axes check boxes under Show Elements. Click OK to apply the setting and close the dialog.
- Right click on the white space in graph layer and select Fit Page to Layers, accept the default dialog settings and click OK to make all elements visible.
- In the graph, select the axis title object Latitude and Longitude, hit the Delete key to remove them from the graph.
- Now we will customize the color scale object. Double-click on the color scale to bring up the Color Scale Control dialog. Then do the following settings:
- Click OK to apply the settings and close the Color Scale Control dialog.
- Right-click above the contour plot and select Add Text to add a graph title 30-Year Mean Temperature for the Month of January. Use the Format toolbar and/or double-click on the completed text label to update the font, font size, etc. The graph should look like