Configure and use 3D plots

Scientific dataset 3D plots X, Y, and Z coordinates. The plot type determines which data you can use, how those data are arranged, and whether you can use a fourth variable for color.

Bind X, Y, Z and Color

Open Analysis → Scientific Dataset Plot. In Primary, choose the Dataset. Bind 3D X variable and 3D Y variable to the coordinates, and Z variable to the elevation or value to plot. With auto, the module chooses the variables from the Dataset. Select all three variables explicitly for a reproducible example. For the CSV grid, the job requested explicit X, Y, and Z when every binding was set to auto. After the three columns were selected, Run produced the plot. 3D Family / group variable splits the series into families, and Color variable C adds a scalar. Leave C on auto to use the plot type’s default behavior without an explicit fourth quantity.

The XYZ row also offers Series…. In the test, a Graph Series added there remained saved and rerendering produced the same PNG. Use Input variable bindings in the base output or Bindings in the variant to control XYZ coordinates and the scalar.

In Calculation configuration, 3D Family display unit → auto lets the renderer choose the display unit for numeric family labels. source uses the bound variable’s unit. This affects the family legend and preserves the canonical values.

Enable Scientific dataset 3D in Graphs offered by module. Open Configure…, select 3D plot type, close the dialog, and run the analysis. Check the result in Plots. For the exercise grid, X and Y are x_mm and y_mm, Z is height_mm, and C is intensity_V.

Scientific dataset 3D is set to scatter3 before rendering.
Scientific dataset 3D is set to scatter3 before rendering.

Plot types and prerequisites

3D plot typeView and data requirementsExplicit Color C
line3Connects the points into a trajectory. Point order for line3 → dataset_order follows the row order. sort_x sorts the points by X.Rejected. Leave C on auto.
scatter3Shows individual points. Use it for scattered samples or measurements that share a coordinate. Marker size sets the symbol size.Supported. Each point uses the color corresponding to its value.
surfaceBuilds a surface on a complete rectangular grid, with one Z value for each X/Y pair in the family. The surface shows how Z varies between cells.Supported. Use C to encode a scalar independently of the Z height.
meshDraws links between grid cells. A complete grid is required. Line width controls the strokes.Supported.
contour3Draws contour lines on a rectangular grid. Contour levels sets the requested number of levels. Line width controls the stroke.Rejected. The levels are derived from Z.
trisurfTriangulates scattered X/Y points and interpolates the surface between vertices. Collinear points cannot form triangles. For this Dataset the log reports qhull failed.Supported.
heatmapShows the grid as a color map in the X/Y plane. Check which scalar the colors represent before reading the colorbar.Supported on a valid grid.

surface, mesh, contour3, and heatmap reject point tables with duplicate X/Y pairs. A grid with missing cells produces an incomplete rectangular grid message. After checking the measurements, choose scatter3 to show the actual coverage of the samples or use trisurf when triangular interpolation suits the problem.

The base scatter3 plot shows three coordinates in mm and uses the signal in V for color.
The base scatter3 plot shows three coordinates in mm and uses the signal in V for color.

Configuration settings

3D plot title, X-axis label, Y-axis label, Z-axis label
auto uses the variable names and display units. Enter explicit text when you want a more readable description of the quantity. The label is a presentation setting.
Legend content and Family legend prefix
auto lets the renderer decide. none hides the content, series uses the series identity, and family shows the families. You can specify the legend prefix. auto derives it from the family variable.
Line width, Marker size, Contour levels
Line width accepts inherit to inherit graphics settings. It applies to line3, mesh, and contour3. Marker size applies to scatter3 and defaults to 5. Contour levels applies to contour3 and defaults to 12.
3D display reduction and 3D display target points
inherit uses the module setting. auto follows the threshold, none requests the original points, stride subsamples at a fixed stride, and minmax keeps extrema in groups if the plot type supports it. The target can inherit its value or take a value from 100 to 8,000,000. Reduction affects the view, so take it into account when comparing plotted points with the source data.
Additional output format
none produces the standard PNG. Use svg or pdf to request an extra file from a renderer that supports that format.

Regenerate the prepared data

After switching from contour3 to scatter3, Render → Rerender rejected the cache with “3D bindings/plot type/preparation settings changed.” The existing PNG remained unchanged. With the row set to Use YES, run the module again in Run. Check the plot type and the new PNG timestamp.

Open the interactive 3D preview

From an XYZ row, open Data / Variants → Variants… → New from base, enter a title, and use Save and render. Close the dialog and select the new row in Plots. Click 3D at the top right of the preview when it appears. While the figure is prepared, wait for the plot to appear and the grid button to become available.

The arrows rotate the camera up, down, left, or right. The curved arrows rotate the image clockwise or counterclockwise. The square button restores the initial camera, roll, and projection. Drag with the left button to orbit and the middle button to pan. Scroll to zoom. Fit fits all geometry in view. The grid button shows or hides the scientific axes and grid when the figure provides them. ✕ returns to the static preview.

The interactive 3D grid variant shows camera arrows, axes and the Fit control.
The interactive 3D grid variant shows camera arrows, axes and the Fit control.

Double-click the interactive figure to open GX-TXT — Interactive scientific 3D. Close it to return to the compact preview. With Save High-Resolution Image as Dataset…, choose a new ID and select Full HD — 1920 × 1080 or 4K — 3840 × 2160 for the resolution. Press Render & Publish Dataset. The summary confirms the PNG format, dimensions, and digest check. The dialog rejects IDs already in use. The export uses the current camera and graphics settings. If the image budget prevents the requested resolution, check the supersampling and resolution indicated in the message.

Available resolutions also depend on Configuration → Viewers → Native 3D graphics / performance → Export supersampling factor. At 4× and 4K, the dialog rejected the render at the 256 MiB limit and no Dataset appeared. Choose Full HD or change the factor and use Save user defaults. At 1×, the 4K path published the example Dataset.

The publication dialog prepares an image Dataset at 3840 × 2160 pixels.
The publication dialog prepares an image Dataset at 3840 × 2160 pixels.

Use a canonical Y × X grid

A canonical grid contains a rank-one X coordinate, a rank-one Y coordinate, and a rank-two Z matrix. Z must reference the dimensions in Y-then-X order. If you provide C, use the same dimensions as Z. Use strictly monotonic coordinates and finite cell values. Each Family grid needs its own representation. The base path rejects minmax reduction for a canonical grid because the extrema could move to different coordinates.

To reproduce the case, download publish_grid_fixtures.py (ZIP) and run it in the Session’s Python Script Workspace. griglia_valid contains 20 finite cells, with five X coordinates and four Y coordinates in mm. The C matrix is in V. In Analysis, bind X, Y, Z, and C to the Scientific dataset 3D output.

In P011-bis, the base render of a valid grid stops with Octave Script Bridge is already active. It also stops when you switch among surface, heatmap, mesh, and contour3. An older PNG can remain in the Session. For the tested workflow, open Variants… → New from base from the Analysis output row. Set the title and the XYZ/C bindings, choose surface, and press Save and render. The native variant produced a new PNG and exposes the 3D icon in Plots.

The native XYZ variant shows a 4 × 5 grid with the color variable in V.
The native XYZ variant shows a 4 × 5 grid with the color variable in V.

Run the base calculation in a Session with a canonical grid

In P011-bis, a shared Run may finish with “Variable height_mm is not table-shaped; use Canonical Dataset API v2 for n-D access” even if the base plot’s Primary source is a valid XYZ CSV. This was reproduced with an enabled persistent variant that takes rank-two Z from a separate Dataset. A PNG already on screen may belong to a previous job.

  1. Open Analysis → Scientific Dataset Plot → Variants… → Edit and turn off Enabled for the variant with rank-two Z. Save the change.
  2. Run the base calculation in Run. Check the final status and the table-based plot in Plots.
  3. To update the grid, return to the variant, enable it, and use Save and render. Disable it again before the next shared Run.

Reopen the image Dataset

In the Dataset tab, select the Dataset created from the 3D preview and use the browser’s Open command. GX-TXT CORE image opens. Check the ID and the reported dimensions. The test reopened the 1920 × 1080 and 3840 × 2160 publications. Both referenced the same variant and the camera used for export.

The GX-TXT CORE image viewer shows reticolo3d_3840, the image Dataset published in 4K.
The GX-TXT CORE image viewer shows reticolo3d_3840, the image Dataset published in 4K.

Color options for the native variant

With the grid data, the context menu offers Colorbar visible for surface, mesh, contour3, trisurf, and heatmap. It appears for scatter3 when C is bound. The entry is absent for line3. line3 and contour3 reject explicit C. For contour3, the colorbar still works for the default scalar derived from Z.

The native variant accepted the canonical Y × X grid and strictly decreasing axes. Swapping Z dimensions, supplying C with a different shape, or using a nonmonotonic axis produced a specific diagnostic. Correct the Dataset structure and rebind the variables before retrying. With nonfinite cells the render stopped.

Compatibility by Dataset shape and Color

In Analysis, choose the Dataset, bind X, Y, and Z, set 3D plot type, and start Run. For each plot type, compare the same Dataset with Color variable C set to auto and with an explicit C variable. You can reproduce the complete-grid case with the XYZ exercise.

How to read the results

PNG generated
Open the preview in Plots to check the geometry and, where available, how color encodes the data.
C unsupported
line3 and contour3 reject an explicit C variable. Leave C on auto. contour3 requires a complete rectangular grid even with C on auto.
Incomplete grid
The required rectangular grid is missing cells.
Duplicate X/Y pairs
The grid requires exactly one cell per X/Y pair within each family.
Triangulation failed
The points are collinear in X/Y. The log reports qhull failed.
Dataset shapeC on autoC bound
line3
Complete gridPNG generatedC unsupported
Scattered pointsPNG generatedC unsupported
Duplicate X/Y pairsPNG generatedC unsupported
Collinear pointsPNG generatedC unsupported
scatter3
Complete gridPNG generatedPNG generated
Scattered pointsPNG generatedPNG generated
Duplicate X/Y pairsPNG generatedPNG generated
Collinear pointsPNG generatedPNG generated
surface
Complete gridPNG generatedPNG generated
Scattered pointsIncomplete gridIncomplete grid
Duplicate X/Y pairsDuplicate X/Y pairsDuplicate X/Y pairs
Collinear pointsIncomplete gridIncomplete grid
mesh
Complete gridPNG generatedPNG generated
Scattered pointsIncomplete gridIncomplete grid
Duplicate X/Y pairsDuplicate X/Y pairsDuplicate X/Y pairs
Collinear pointsIncomplete gridIncomplete grid
contour3
Complete gridPNG generatedC unsupported
Scattered pointsIncomplete gridC unsupported
Duplicate X/Y pairsDuplicate X/Y pairsC unsupported
Collinear pointsIncomplete gridC unsupported
trisurf
Complete gridPNG generatedPNG generated
Scattered pointsPNG generatedPNG generated
Duplicate X/Y pairsPNG generatedPNG generated
Collinear pointsTriangulation failedTriangulation failed
heatmap
Complete gridPNG generatedPNG generated
Scattered pointsIncomplete gridIncomplete grid
Duplicate X/Y pairsDuplicate X/Y pairsDuplicate X/Y pairs
Collinear pointsIncomplete gridIncomplete grid