mphgeom
Plot a geometry in a MATLAB® figure.
Syntax
mphgeom(model)
mphgeom(model,geomtag,…)
mphgeom(model,geomtag,'workplane',wptag,…)
h = mphgeom(model,geomtag,…)
 
Description
mphgeom(model) plots the model geometry in a MATLAB figure. If the model only contains one geometry then the geomtag can be empty.
mphgeom(model,geomtag,…) plots the model geometry with the tag geomtag in a MATLAB figure.
  mphgeom(model,geomtag,'workplane',wptag…) plots the 2D geometry defined in the workplane with the tag wptag in a MATLAB figure.
h = mphgeom(model,geomtag,…) also returns a handle of the plotted entities.
The function mphgeom accepts the following property/value pairs:
on | off | current | string
on | off
on | off
on | off
point | edge | boundary | domain
on | off
on | off
on | off
on | off
String | auto | none
The build property determines if mphgeom build the geometry prior to display it. If the build property is set with a geometry object tag, the geometry is built up to that object. mphgeom only displays built geometry objects.
Use the workplane property to show the 2D geometry that is define inside the workplane with specified tag.
Example
Plot the model geometry. Since most geometries do only have one geometry the geometry tag does not have to be specified:
model = mphopen('model_tutorial_llmatlab.mph');
mphgeom(model)
Plot the model geometry with face labels:
mphgeom(model,'geom1','facelabels','on','facelabelscolor','r');
Plot boundaries 7, 8, 9, and 11:
mphgeom(model,'geom1','entity','boundary', ...
'selection',[7:9,11]);
The geometry is plotted with view settings applied. This results in a geometry plot 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':
mphgeom(model, 'geom1', 'view', 'none')
Plot the model geometry on an specific axis, for example axes in a user defined GUI or a subplot:
figure(2);
ax = subplot(2,2,1);
mphgeom(model, 'geom1','parent', ax);
See also
mphmesh, mphviewselection