SurfacePlot Block
Visualizes 2D matrix data as a surface
Open SurfacePlot in BlockWerk →# SurfacePlot Block
Description
The SurfacePlot block accepts a two-dimensional matrix (array of arrays) and renders it as a colour-mapped surface, with the X and Y axes spanning configurable physical ranges. Cell values are mapped to a colour gradient, providing an immediate visual indication of magnitude across the spatial grid.
Common applications include visualising the output of a 2-D lookup table, displaying finite-difference simulation results on a spatial grid, or inspecting the gain surface of a scheduled controller as a function of two scheduling variables.
Parameters
xRange
Comma-separated pair defining the minimum and maximum values of the X axis (e.g. 0,1). The grid columns are distributed evenly over this range. Default: 0,1.
yRange
Comma-separated pair defining the minimum and maximum values of the Y axis (e.g. 0,1). The grid rows are distributed evenly over this range. Default: 0,1.
Examples
2-D lookup table inspection
LookupTable2D → SurfacePlot
Connect a 2-D lookup table block directly to the SurfacePlot to visualise the full gain surface during simulation.
Finite-difference heat map
HeatEquationSolver → SurfacePlot
Feed the flattened matrix output of a spatial PDE solver into the SurfacePlot; set xRange and yRange to match the physical domain extents.
Remarks
- Sink block: SurfacePlot has no output ports. It is a terminal display node and does not feed any downstream computation.
- Matrix input: The input port expects a 2-D array signal (array of arrays). A flat 1-D array is not sufficient; the data must be pre-shaped into rows and columns upstream.
- Colour mapping: Values are normalised over the observed min/max of the matrix and mapped to a built-in colour gradient; the colour scale is not independently configurable via parameters.
- Axis ranges:
xRangeandyRangeaffect only the axis tick labels and do not resample or rescale the matrix data itself.
See Also
- BarChart: Displays a 1-D array as a bar chart when only one spatial dimension is present.
- ScatterPlot: Plots individual (x, y) pairs rather than a dense spatial grid.
- uPlotDisplay: Monitors scalar or vector signals over simulation time.