mphmesh
Plot a mesh in a MATLAB
®
figure window.
Syntax
mphmesh(model)
mphmesh(model,meshtag,…)
pd=mphmesh(model,meshtag,…)
Description
mphmesh(model)
plots the mesh in a MATLAB figure.
mphmesh(model,meshtag,…)
plots the mesh
meshtag
in a MATLAB figure. If there is only one mesh in the model the
meshtag
can be left empty.
The function
mphmesh
accepts the following property/value pairs:
Table 6-28:
property/value Pairs for the mphmesh Command.
property
Value
default
description
parent
Double
Parent axis
edgecolor
Char
k
Edge color
edgelabels
on
|
off
off
Show edge labels
edgelabelscolor
Char
k
Color for edge labels
edgemode
on
|
off
on
Show edges
facealpha
Double
1
Set transparency value
facelabels
on
|
off
off
Show face labels
facelabelscolor
Char
k
Color for face labels
facemode
on
|
off
on
Show faces
meshcolor
Char | vector
gray
Color for face element
vertexcolor
Char | vector
k
Color for vertices
vertexlabels
on
|
off
off
Show vertex labels
vertexlabelscolor
Char | vector
k
Color for vertex labels
vertexmode
on
|
off
off
Show vertices
view
String |
auto
|
none
auto
View settings
Example
Plot the mesh
model = mphopen('model_tutorial_llmatlab');
mphrun(model, 'mesh')
mphmesh(model)
Create a second mesh with an “extra fine” default mesh settings and plot it:
mesh = model.mesh.create('mesh2','geom1');
mesh.autoMeshSize(2);
mphrun(model, 'mesh2')
mphmesh(model,'mesh2','meshcolor','r');
The mesh is plotted with view settings applied. This results in a mesh with grid, axes labels, lights, hiding, and so on applied to the plot. To switch off the use of view settings set
view
to
'none'
:
mphmesh(model, 'mesh1', 'view', 'none')
Plot data can be returned from
mphmesh
. This can be used to create the plot later or to extract information used to create the plot for further analysis
pd = mphmesh(model, 'mesh1');
mphplot(pd)
See also
mphgeom
,
mphmeshstats
,
mphplot