OpenSeesMatlabVis¤
MATLAB-graphics visualization interface available as opsMAT.vis. These methods create regular MATLAB figures or MATLAB GUI wrappers. For interactive static and animated visualization, see OpenSeesMatlabVisPolyscope.
1 2 | |
plotter.OpenSeesMatlabVis
¤
Bases: handle
OpenSeesMatlabVis Visualization interface for OpenSeesMatlab.
OpenSeesMatlabVis provides high-level plotting utilities for OpenSees models and analysis results. It is created automatically by OpenSeesMatlab and is normally accessed through the vis property:
1 2 | |
The visualization methods use model information collected by opsmat.post.getModelData or response/eigen data collected by the post-processing interface. Most plotting methods accept an optional opts struct and an optional target axes handle. Default option templates are exposed as public properties and can be copied before customization.
Common workflow
1 2 3 4 5 6 7 8 9 10 11 12 | |
Properties:
-
defaultPlotModelOptions(_ubAVf) –Default option template used by plotModel. See
.helpfor details. -
defaultPlotEigenOptions(_rk4oU) –Default option template used by plotEigen. See
.helpfor details. -
defaultPlotNodalResponseOptions(_xtaOx) –Default option template used by plotNodalResponse and plotDeformation. See
.helpfor details. -
defaultPlotFrameResponseOptions(_VAI3b) –Default option template used by plotFrameResponse. See
.helpfor details. -
defaultPlotShellResponseOptions(_exh8s) –Default option template used by shell response plotting. See
.helpfor details. -
defaultPlotContinuumResponseOptions(_r7qx0) –Default option template used by continuum response plotting. See
.helpfor details.
Methods:
-
plotModelGUI–Open an interactive GUI for the current OpenSees model.
-
plotEigenGUI–Open an interactive GUI for eigen mode visualization.
-
plotNodalResponseGUI–Open an interactive GUI for nodal response visualization.
-
plotFrameResponseGUI–Open an interactive GUI for frame element response diagrams.
-
plotShellResponseGUI–Open an interactive GUI for shell element response visualization.
-
plotContinuumResponseGUI–Open an interactive GUI for plane or solid continuum response visualization.
-
plotModel–Visualize the current OpenSees model.
-
plotEigen–Visualize one mode shape from eigenvalue analysis results.
-
plotNodalResponse–Visualize nodal response data at a selected analysis step.
-
plotDeformation–Visualize deformed model geometry from nodal displacement data.
-
plotFrameResponse–Visualize frame element response at a selected analysis step.
-
plotShellResponse–Visualize Shell element response for a specific step.
-
plotContinuumResponse–Visualize Plane or Solid continuum element response for a step.
Properties:
-
polyscope(plotter.OpenSeesMatlabVisPolyscope) –Polyscope-based visualisation interface (plotter.OpenSeesMatlabVisPolyscope)
-
defaultPlotModelOptions(None) – -
defaultPlotEigenOptions(None) – -
defaultPlotNodalResponseOptions(None) – -
defaultPlotFrameResponseOptions(None) – -
defaultPlotShellResponseOptions(None) – -
defaultPlotContinuumResponseOptions(None) –
polyscope
¤
polyscope: plotter.OpenSeesMatlabVisPolyscope
Polyscope-based visualisation interface (plotter.OpenSeesMatlabVisPolyscope)
defaultPlotNodalResponseOptions
¤
defaultPlotNodalResponseOptions = plotter.PlotNodalResp.defaultOptions()
defaultPlotFrameResponseOptions
¤
defaultPlotFrameResponseOptions = plotter.PlotFrameResp.defaultOptions()
defaultPlotShellResponseOptions
¤
defaultPlotShellResponseOptions = plotter.PlotUnstruResponse.defaultOptions()
defaultPlotContinuumResponseOptions
¤
defaultPlotContinuumResponseOptions = plotter.PlotUnstruResponse.defaultOptions()
plotModelGUI
¤
(opts: struct = struct(), watchFile=false, reloadFcn=[], pollInterval: double = 1.0, autoWatch: logical = true)
Open an interactive GUI for the current OpenSees model.
plotModelGUI collects model information from the current OpenSees model and opens a small control panel around plotter.PlotModel. The GUI toggles common PlotModel options and redraws the same axes.
Syntax
1 2 3 4 | |
Input arguments:
-
opts(struct) –Initial visualization options passed to plotter.PlotModelGUI.
-
watchFile(char or string) –false disables watching. true watches the caller file. A text value watches that path.
-
reloadFcn(function handle) –Function returning a fresh modelInfo struct after watchFile changes. If omitted, PlotModelGUI tries to read .hdf5/.h5, .mat, or .json modelInfo files directly.
-
pollInterval(double) –File polling interval in seconds. Default is 1.0.
Output arguments:
-
app(struct) –GUI handles and helper callbacks. Use app.getOptions() to read the current PlotModel option struct.
plotEigenGUI
¤
Open an interactive GUI for eigen mode visualization.
plotEigenGUI collects model information from the current OpenSees model and opens a control panel around plotter.PlotEigen. The GUI lets users switch mode tags and common PlotEigen options.
Syntax
1 2 | |
Input arguments:
-
eigenData(struct) –Eigenvalue analysis results, typically returned by opsmat.post.getEigenData.
-
opts(struct) –Initial visualization options passed to plotter.PlotEigenGUI.
Output arguments:
-
app(struct) –GUI handles and helper callbacks. Use app.getOptions() to read the current PlotEigen option struct.
plotNodalResponseGUI
¤
(nodeRespData: struct, respType="disp", respComponent="magnitude", stepIdx="absMax", opts: struct = struct())
Open an interactive GUI for nodal response visualization.
Syntax
1 2 3 | |
Input arguments:
-
nodeRespData(struct) –Nodal response data, typically obtained from
opsmat.post.getNodalResponse(odbTag). -
respType(string) –Initial response field. Default is "disp".
-
respComponent(string) –Initial response component. Default is "magnitude".
-
stepIdx(integer or string) –Initial step selector. Use a 0-based integer, "absMax", "absMin", "Max", or "Min".
-
opts(struct) –Initial visualization options passed to plotter.PlotNodalRespGUI.
plotFrameResponseGUI
¤
Open an interactive GUI for frame element response diagrams.
plotFrameResponseGUI displays frame response data with controls for response type, component, step selection, style, scaling, colours, labels, and common performance options.
Syntax
1 2 3 | |
Input arguments:
-
respData(struct) –Frame response data, typically obtained from
opsmat.post.getElementResponse(odbTag, eleType="Frame"). -
opts(struct) –Initial visualization options passed to plotter.PlotFrameRespGUI.
-
stepIdx(integer or string) –Initial step selector. Use a 0-based integer, "absMax", "absMin", "Max", or "Min".
Output arguments:
-
app(struct) –GUI handles and helper callbacks. Use app.getOptions() to read the current PlotFrameResp option struct.
plotShellResponseGUI
¤
(respData: struct, respType="SecForceAtGP", respComponent="mxx", fiberPoint="top", responseLocation="", stepIdx="absMax", opts: struct = struct())
Open an interactive GUI for shell element response visualization.
Syntax
1 2 3 | |
plotContinuumResponseGUI
¤
(respData: struct, eleType="", respType="StressAtGP", respComponent="sxx", responseLocation="", stepIdx="absMax", opts: struct = struct())
Open an interactive GUI for plane or solid continuum response visualization.
Syntax
1 2 3 | |
plotModel
¤
(opts: struct = struct(), ax=[])
Visualize the current OpenSees model.
plotModel collects model information from the current OpenSees model through obj.parent.post.getModelData and renders the model geometry using plotter.PlotModel.
Syntax
1 2 3 4 | |
Input arguments:
-
opts(struct) –Visualization options passed to plotter.PlotModel. Start from vis.defaultPlotModelOptions when you want to customize the default model-plot appearance.
-
ax(matlab.graphics.axis.Axes) –Target axes. If omitted or empty, a new figure/axes is created by the underlying plotter.
Output arguments:
-
h(array of graphics objects) –Handles to the created graphics objects.
Example
1 2 3 4 5 6 7 8 | |
plotEigen
¤
Visualize one mode shape from eigenvalue analysis results.
eigenData is usually collected with opsmat.post.getEigenData or loaded from a file generated by opsmat.post.saveEigenData.
Syntax
1 2 3 4 | |
Input arguments:
-
modeTag(integer) –Mode number to visualize. For example, modeTag=1 plots the first mode shape.
-
eigenData(struct) –Eigenvalue analysis results, typically returned by opsmat.post.getEigenData.
-
opts(struct) –Visualization options passed to plotter.PlotEigen. Start from vis.defaultPlotEigenOptions for customization.
-
ax(matlab.graphics.axis.Axes) –Target axes. If omitted or empty, a new figure/axes is created.
Output arguments:
-
h(array of graphics objects) –Handles to the created graphics objects.
Example
1 2 3 4 5 6 | |
plotNodalResponse
¤
(nodeRespData: struct, respType="disp", respComponent="magnitude", stepIdx="absMax", opts: struct = struct(), ax=[])
Visualize nodal response data at a selected analysis step.
plotNodalResponse renders nodal scalar or vector response fields such as displacement, velocity, acceleration, reaction, Rayleigh force, or pressure. The model information is loaded from the ODB referenced by nodeRespData.odbTag.
Syntax
1 2 3 4 5 | |
Input arguments:
-
nodeRespData(struct) –Nodal response data, typically obtained from
opsmat.post.getNodalResponse(odbTag). The struct must include an odbTag field so the corresponding model information can be loaded. -
respType(string) –Response type to visualize. Default is "disp". Common values include "disp", "vel", "accel", "reaction", "reactionIncInertia", "rayleighForces", and "pressure". Custom fields in nodeRespData are also accepted.
-
respComponent(string) –Response component to visualize. Default is "magnitude". For vector responses, common values include "ux", "uy", "uz", "rx", "ry", "rz", and "magnitude". For custom fields, use a name in nodeRespData.(respType).dofs or a Layout-C subfield name. Scalar custom fields may use any label for the colorbar.
-
stepIdx(integer or string) –Analysis step selector. Default is "absMax".
- "absMax": step with the maximum absolute response.
- "absMin": step with the minimum absolute response.
- "Max": step with the maximum response.
- "Min": step with the minimum response.
- integer: explicit step index.
-
opts(struct) –Visualization options passed to plotter.PlotNodalResp. Start from vis.defaultPlotNodalResponseOptions for customization.
-
ax(matlab.graphics.axis.Axes) –Target axes. If omitted or empty, a new figure/axes is created.
Custom node response field layouts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Example
1 2 3 4 5 6 | |
plotDeformation
¤
(nodeRespData: struct, stepIdx="absMax", color: string = "blue", useInterpolation: logical = true, scaleFactor: double = 1.0, showUndeformed: logical = false, ax=[])
Visualize deformed model geometry from nodal displacement data.
plotDeformation is a convenience wrapper around the nodal response plotter. It enables deformation display, uses displacement data from nodeRespData, and allows direct control of deformation color, interpolation, scale factor, and undeformed-shape visibility.
Syntax
1 2 3 4 | |
Input arguments:
-
nodeRespData(struct) –Nodal response data containing displacement information, typically obtained from opsmat.post.getNodalResponse(odbTag). The struct must include an odbTag field.
-
stepIdx(integer or string) –Analysis step selector. Default is "absMax". Supported string selectors include "absMax", "absMin", "Max", and "Min".
-
color(char or string) –Solid color used for the deformed shape. Default is "blue".
-
useInterpolation(logical) –Whether to use interpolation for smoother visualized deformation. Default is true.
-
scaleFactor(double) –Deformation scale factor. Default is 1.0.
-
showUndeformed(logical) –Whether to show the undeformed model together with the deformed shape. Default is false.
-
ax(matlab.graphics.axis.Axes) –Target axes. If omitted or empty, a new figure/axes is created.
Example
1 2 3 4 5 6 7 | |
plotFrameResponse
¤
(respData: struct, respType="sectionForces", respComponent="MZ", responseLocation="", stepIdx="absMax", opts: struct = struct(), ax=[])
Visualize frame element response at a selected analysis step.
plotFrameResponse displays frame-element result fields such as section forces, section deformations, basic forces, basic deformations, local forces, and plastic deformation. The response data is typically collected from an ODB through the post-processing interface.
Syntax
1 | |
Input arguments:
-
respData(struct) –Frame response data containing element response information, typically obtained from
opsmat.post.getElementResponse(odbTag, eleType="Frame"). -
respType(string, optional. The type of response to visualize. Default is "sectionForces". Common options include) –- 'sectionForces'
- 'sectionDeformations'
- 'basicForces'
- 'basicDeformations'
- 'localForces'
- 'plasticDeformation'
- Any custom field in respData.
-
respComponent(string, optional. The component of the response to visualize. Default is "MZ". Common options include) –- For 'sectionForces' and 'sectionDeformations', components include 'N','MZ','VY','MY','VZ','T'.
- For 'basicForces', 'basicDeformations' and 'plasticDeformation', components include 'N','MZ','MY','T'.
- For 'localForces', components include 'FX','FY','MZ' in 2D and 'FX','FY','FZ','MX','MY','MZ' in 3D.
- For custom fields, use a name listed in respData.(respType).dofs or a Layout-C subfield name. Scalar custom fields may use any label for the colorbar.
-
responseLocation(string) –Controls where values are placed along each frame element.
- "" or "auto": Built-in responses use fixed rules:
- sectionForces, sectionDeformations -> "section"
- basicForces, basicDeformations, localForces, plasticDeformation -> "element"
- "section": Values are interpreted as section/sample-point values and are placed using recorded sectionLocs. Use this for arrays such as [nStep x nEle x nSec] or [nStep x nEle x nSec x nComp].
- "element": Values are placed uniformly along each element. A scalar is drawn as an element-constant diagram; two values are placed at element locations [0,1]. Use this for local/basic/end values.
-
stepIdx(integer or 'absMax') –- The index of the analysis step to visualize. Default is "absMax".
- If "absMax", the step with the maximum absolute response will be visualized.
- If "absMin", the step with the minimum absolute response will be visualized.
- If "Max", the step with the maximum response will be visualized.
- If "Min", the step with the minimum response will be visualized.
- If an integer, the step with the specified index will be visualized.
For large response histories, passing a numeric step index is faster than using "absMax", "absMin", "Max", or "Min", because those string selectors scan all analysis steps to find the requested peak step.
-
opts(struct) –Visualization options. Use
vis.defaultPlotFrameResponseOptionsto get default options. -
ax(matlab.graphics.axis.Axes) –Target axes. If omitted, a new figure/axes will be created.
Custom frame response field layouts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
Large-model example
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
plotShellResponse
¤
(respData: struct, respType="SecForceAtGP", respComponent="mxx", fiberPoint="top", responseLocation="", stepIdx="absMax", opts: struct = struct(), ax=[])
Visualize Shell element response for a specific step.
Example
1 2 3 4 | |
Input arguments:
-
respData(struct) –Shell element response data. Typically obtained from
post.getElementResponse(odbTag, eleType="Shell"). -
respType(string, optional (default "SecForceAtGP")) –- "SecForceAtGP" | "SecDefoAtGP" | "SecForceAtNode" | "SecDefoAtNode"
- "StressAtGP" | "StrainAtGP" | "StressAtNode" | "StrainAtNode"
- Any custom EleResp field name. Names containing "AtNode" are node-based; all other custom names are element-based.
-
respComponent(string, optional (default "mxx")) –- Section responses : "fxx" "fyy" "fxy" "mxx" "myy" "mxy" "vxz" "vyz"
- Stress / Strain : "sxx" "syy" "sxy" "syz" "sxz" | "exx" "eyy" "exy" "eyz" "exz"
- For custom fields, a name listed in EleResp.(respType).dofs or a numeric subfield EleResp.(respType).(respComponent).
-
responseLocation(string) –Controls how the response rows are interpreted.
-
"" or "auto": Infer from respType. Names containing "AtNode" are nodal; names containing "AtGP" are Gauss-point/element responses. Custom names without either token are treated as element data.
-
"node": Response rows are nodes. Use [nStep x nNode] scalar data or [nStep x nNode x nComp] vector data.
-
"gp": Response rows are elements with a Gauss-point dimension. Gauss-point values are averaged per element before plotting.
-
"element": Response rows are already element-level values. If the data still contains a GP dimension, opts.surf.gpReduce controls the reduction.
-
-
fiberPoint(string or integer, optional (default "top")) –Through-thickness location for stress/strain responses. "top" | "bottom" | "middle" or 1-based integer fiber index. Also applies to custom data with a fiber dimension:
1 2 3 4
EleResp.MyVector.data = [nStep x nEle x nGP x nFiber x nComp] EleResp.MyVectorAtNode.data = [nStep x nNode x nFiber x nComp] EleResp.MyLayoutC.c1 = [nStep x nEle x nGP x nFiber] EleResp.MyLayoutCAtNode.c1 = [nStep x nNode x nFiber] -
stepIdx(integer or string, optional (default "absMax")) –"absMax" | "absMin" | "Max" | "Min" | integer step index.
-
opts(struct) –Visualisation options. Obtain defaults via plotter.PlotUnstruResponse.defaultOptions().
-
ax(matlab.graphics.axis.Axes) –Target axes. A new figure is created when omitted.
Custom EleResp field layouts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
plotContinuumResponse
¤
(respData: struct, respType="StressAtGP", respComponent="sxx", responseLocation="", stepIdx="absmax", opts: struct = struct(), ax=[])
Visualize Plane or Solid continuum element response for a step.
Example
1 2 3 | |
Input arguments:
-
respData(struct) –Continuum element response data. Typically obtained from
post.getElementResponse(odbTag, eleType="Plane")orpost.getElementResponse(odbTag, eleType="Solid"). -
respType(string, optional (default "StressAtGP")) –- "StressAtGP" | "StressAtNode" | "StrainAtGP" | "StrainAtNode"
- "StressMeasureAtGP" | "StressMeasureAtNode"
- Any custom EleResp field name. Element-based custom fields should normally use a name without "AtNode"; node-based custom fields should include "AtNode" in the field name.
-
respComponent(string, optional (default "sxx")) –- Plane stress : "sxx" "syy" "sxy" "szz"
- Solid stress : "sxx" "syy" "szz" "sxy" "syz" "sxz"
- Plane strain : "exx" "eyy" "exy"
- Solid strain : "exx" "eyy" "ezz" "exy" "eyz" "exz"
- Measures : "sigmaOct" "tauOct" "tauMax" "vonMises" "p1" "p2" "p3"
- For custom fields, a name listed in EleResp.(respType).dofs or a numeric subfield EleResp.(respType).(respComponent). Scalar custom fields may use any label for the colorbar.
- Layout-C custom fields use subfield names as components, so respComponent="c1" reads EleResp.(respType).c1.
-
responseLocation(string) –Controls how the response rows are interpreted.
-
"" or "auto": Infer from respType. Names containing "AtNode" are nodal; names containing "AtGP" are Gauss-point/element responses. Custom names without either token are treated as element data.
-
"node": Response rows are nodes. Use [nStep x nNode] scalar data or [nStep x nNode x nComp] vector data.
-
"gp": Response rows are elements with a Gauss-point dimension. Gauss-point values are averaged per element before plotting.
-
"element": Response rows are already element-level values. If the data still contains a GP dimension, opts.surf.gpReduce controls the reduction.
-
-
stepIdx(integer or string, optional (default "absMax")) –"absmax" | "absmin" | "max" | "min" | 0-based integer step index.
-
opts(struct) –Visualisation options. Obtain defaults via plotter.PlotUnstruResponse.defaultOptions().
-
ax(matlab.graphics.axis.Axes) –Target axes. A new figure is created when omitted.
Custom EleResp field layouts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |