8.10 3D and Contour Graphing

Origin supports a wide variety of 3D and Contour graph types, all of which are provided on one comprehensive 3D and Contour Graphs toolbar. All the graph types can also be created through main menu options.

3D and Contour graphs can be created from matrix data or XYZ data in a worksheet. In addition, a worksheet can be treated as a Virtual Matrix, from which surface plots or contour plots can be created. You can click here to read more details about Creating 3D and Contour Graphs from Virtual Matrices.

The first two of the following tables show the key differences between various data formats and how they affect 3D and Contour plots. The third table shows you how to convert data from one format to another. The following pages will give more details about each graph type in both the 3D and Contour categories, and will also state clearly which graph types can be created from each of the data formats.

Contour Graph features by Data Format

The following table shows the data formats required to make Contour Graphs and features available in each. You can get more information about creating Contour graphs in Creating Contour Graphs.

Data Format Polar Contour Ternary Contour Smoothing Custom Boundary Nonlinear X/Y Axes for Rectangular Contour Plots
XYZ Columns in Worksheet Yes Yes Yes Yes Yes
Matrix Window Yes No No No No
Virtual Matrix in Worksheet No No No No Yes

3D Graph features by Data Format

The following table shows the data formats required to make 3D Graphs and features available in each. You can get more information about creating 3D graphs in Creating 3D Graphs

Data Organization Smoothing Nonlinear X/Y Axes
XYZ Columns in Worksheet No Yes
XYY Columns in Worksheet No Yes
Matrix Window No No
Virtual Matrix in Worksheet No Yes

How to Convert Data From One Format to Another

For more details about converting worksheet data to matrix data, please refer to Matrix Conversion and Gridding. For more details about converting matrix data to worksheet data, please refer to Converting Matrices to Worksheets.

From \ To XYZ Worksheet Columns Matrix Object Virtual Matrix in Worksheet
XYZ Worksheet Columns -- Use the Worksheet: Convert to Matrix: XYZ Gridding menu item. Multiple gridding methods are available for conversion to a regularly-spaced matrix object. Not supported
Matrix Object Use the Matrix: Convert to Worksheet menu item and set Method to XYZ Columns -- Use the Matrix: Convert to Worksheet menu item and set Method to Direct
Virtual Matrix in Worksheet Use the Worksheet: Convert to XYZ menu item Use the Worksheet: Convert to Matrix: Direct menu item. --

OpenGL based 3D Graphs

OpenGL (Open Graphic Library) can make use of graphics hardware to produce graphs with fast speed and high quality. Beginning with Origin 9.0 SR0, all 3D graphs are based on OpenGL by default. In earlier Origin versions, the 3D graphs are based on GDI (Windows' Graphics Device Interface).


OpenGL based graphing has the following benefits:

  • Faster Performance
  • Enhanced Features

There are feature limitations if the OpenGL version is lower than 3.0.
The OpenGL version is determined by your graphics card and drivers.
To check the OpenGL information on your local computer, open the 3D OpenGL Settings dialog.

Control the OpenGL Status

It is possible to control the use of OpenGL with a system variable - @OGL - before a graph is drawn.

The default value of @OGL is 1, which means OpenGL will be used when creating a 3D Graph.

To turn OpenGL off, type

@ogl=0;

in the script window or command window and run it. Subsequent 3D Graphs will be drawn using GDI.

Note: Turning off OpenGL will not effect OpenGL based graphs drawn previously.

To turn OpenGL on again, run

@ogl=1;

The system variable value will be restored to default when restarting Origin.

3D OpenGL Settings

You can find 3D OpenGL Settings under Preferences: 3D OpenGL Settings. You can set options related to transparency or anti-aliasing in the 3D OpenGL Settings dialog.

Convert from Earlier Versions

When existing OPJs with older GDI-based 3D graphs are opened, those graphs will not be converted to OpenGL automatically and the Plot Details tab for these older graphs will have the settings from older versions.

You can also convert GDI-based 3D graphs to OpenGL-based using the win -dg or the layer -3d c Labtalk command.

Note that the conversion is irreversible.

Limitation on Export

With properties such as lighting and transparency, OpenGL graphs inherently only support raster export. When exporting in vector formats such as PDF and EPS, a raster object is embedded in these output files, and therefore the output quality may be compromised if the output is resized in other applications. Transparent background settings are also lost in export.

In order to export a 3D graph into vector formats (pdf, eps, emf.etc), turn off OpenGL and create the GDI based 3D graph.


This section covers the following topics: