fea.plot — Create a RunMat figure for a FEA result field.
fea.plot creates a RunMat figure from a contextual run, results object, field object, or explicit study/run pair.
Syntax
figure = fea.plot(runOrResultsOrField, fieldId)
figure = fea.plot(study, runId, fieldId)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
context | Any | Yes | — | FEA run, results, field, or study context. |
fieldId | StringScalar | No | — | Optional field id. |
Name, Value | Any | Variadic | — | Optional Field or FieldId selector. |
study | Any | Yes | — | FEA study carrying geometry context. |
runId | StringScalar | Yes | — | Persisted run id. |
Returns
| Name | Type | Description |
|---|---|---|
result | Any | FEA object or operation result. |
Errors
| Identifier | When | Message |
|---|---|---|
RunMat:fea:LoadFailed | A .fea document cannot be read, parsed, or resolved. | fea: failed to load FEA document |
RunMat:fea:InvalidInput | A builtin receives an unsupported argument pattern or object type. | fea: invalid input |
RunMat:fea:OperationFailed | A validation, planning, run, result-query, comparison, or trend operation fails. | fea: operation failed |
RunMat:fea:Internal | An FEA object or operation result cannot be converted to a RunMat value. | fea: internal error |
How fea.plot works
- Supported forms are
fea.plot(run, fieldId),fea.plot(results, fieldId),fea.plot(field), andfea.plot(study, runId, fieldId);FieldorFieldIdmay select the field where applicable. - Study geometry context and a persisted run id must be available before figure generation starts.
- The returned figure handle uses RunMat's conventional double scripting representation. Numeric arrays are not accepted as handles, run identifiers, or field identifiers.
- A requested device-backed field is rejected with a targeted error until it is explicitly materialized on the host; the field is never silently omitted or gathered through an unrelated provider.
- Plot generation uses existing study mesh and result artifacts and does not intrinsically require native OCCT or numeric provider dispatch.
Example
Plot a stress field
figureHandle = fea.plot(result, "von_mises");Using fea.plot with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how fea.plot changes the result.
Run a small fea.plot example, explain the result, then change one input and compare the output.
FAQ
Does plotting re-import CAD?⌄
No. It uses geometry context already carried by the study or derived result object.
Related Fea functions
fea.boundaryCondition · fea.compare · fea.domain · fea.field · fea.interface · fea.loadCase · fea.material · fea.materialAssignment · fea.model · fea.plan · fea.results · fea.run · fea.runOptions · fea.step · fea.study · fea.sweep · fea.trends · fea.validate
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how fea.plot is executed, line by line, in Rust.
- View the source for fea.plot in Rust on GitHub
- Learn how the RunMat runtime works
- Found a bug? Open an issue with a minimal reproduction.
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.