imat_fem/plot


Purpose

Plot finite element model geometry in a special figure window.

Syntax

plot(fem)
h=plot(fem,handle,format,'shaded','title',TITLESTR,'silent','renderer',RENDERER,'elemlinewidth',
       WIDTH,'tracelinewidth',WIDTH,'backgroundcolor',COLOR,'color',COLORLIST,'unitslabel',UNITSLAB)

Description

PLOT allows you to display finite element model (FEM) nodes, elements, and tracelines in a figure window. FEM is an IMAT_FEM object. Several display and format options are provided, and are specified by passing in the appropriate string as an argument. If a figure handle is passed in, the FEM will be drawn in that figure. If an axis handle is passed in, the FEM will be drawn on those axes. If you pass in a uipanel handle, the FEM will be displayed in that panel.

The format string is a valid formatting string following builtin PLOT function conventions in MATLAB. A valid marker controls the node display, and a valid linestyle controls the element and traceline display. The default node marker is a dot ('.'), and the default element and traceline linestyle is a solid line ('-'). Node, element, and traceline colors are specified in the corresponding IMAT_FEM object properties. Element and trace line widths can be controlled with the 'elemlinewidth' and 'tracelinewidth' options. To turn off the display of either nodes or elements/tracelines, send in a space (' ') as the format string. To turn off element/traceline display, you must also include a valid node marker format, since only one space is permitted in the format string, and the space will default to the node marker format if one is not provided. To generate the display and then turn it off completely, you can send in the string 'off'. After the plot is generated, View and Display pulldown menus allow for further control of the display.

Most elements are drawn using connected line segments. The 'shaded' command line option will color the entire element. Lumped mass elements are drawn with a square marker. Node-to-ground springs are drawn with an up triangle. Node-to-ground dampers are drawn with a down triangle. Node-to-ground gaps are drawn with a diamond. Note that only the corner nodes (assumed to be the first nodes in the connectivity list) of parabolic elements will be used in the plot.

A pulldown menu called 'Display' will appear on the figure menubar that allows you to change the node marker and the element and traceline linestyles, as well as the node marker size and node labels, and the figure renderer. A pulldown menu called 'View' allows you to change the default view to several preset views.

Other valid display and format arguments and their descriptions are shown in the table below.

'title' Must be followed by a string containing the figure title.
'unitslabel'

This must be followed by a string containing the units label that will be placed in parentheses after the axis label. Pass in a space (' ') to disable the units label.

'silent' Do not print progress messages when displaying the shape.
'shaded' Display the FEM as a shaded image.
'deformed' Specify that the supplied geometry is deformed (creates a separate FEM entity changer pulldown). Generally this is not used.
'off' Draw the geometry and then turn the display off.
'renderer',RENDERER The default figure renderer is OpenGL. You can specify a different renderer either through the Display menu or by passing in the string 'renderer' followed by the renderer to use. Valid options are 'zbuffer' and 'opengl'.
'elemlinewidth',WIDTH Set the element line width (default 1). Must be a positive number.
'tracelinewidth',WIDTH Set the traceline line width (default 1). Must be a positive number.
'reversex' Reverse the X- and Z- axis directions. You cannot use this with 'reversey' or 'reversez'.
'reversey' Reverse the X- and Y- axis directions. You cannot use this with 'reversex' or 'reversez'.
'reversez' Reverse the Y- and Z- axis directions. You cannot use this with 'reversex' or 'reversey'.
'backgroundcolor',COLOR Set the panel's background color. You can pass in a string or a 1x3 numeric RGB vector.
'text',COLOR Set the axis color. You can pass in a string or a 1x3 numeric RGB vector.
'noaxes' Turn off the axis display
'color' Allows custom colors to be assigned to elements. It only applies to 2-D and 3-D elements. COLORLIST contains a vector of values between 0 and 1 that map to the axis ColorMap. If the length of COLORLIST matches the number of nodes in FEM, colors will be defined at the nodes and will interpolate over each element face. If the length of COLORLIST matches the number of elements in FEM, each element face will have a constant color.


This plotting facility is intended to provide simple viewing of a FEM. Performance is slow for large models. For large models, consider using VTKPLOT.

Examples

>> plot(fem)
Working on node display...
Working on element display...
>> h=plot(fem,'*-.','silent');
>> plot(fem,h,'title','This is the title');
Working on node display...
Working on element display...

>>

See Also

imat_shp/plot, fem_labelnodes, imat_fem/vtkplot