plot_model
- opsvis.plot_model(node_labels=1, element_labels=1, offset_nd_label=False, axis_off=0, az_el=(-60.0, 30.0), fig_wi_he=False, fig_lbrt=False, local_axes=True, nodes_only=False, fmt_model={'color': 'blue', 'linestyle': 'solid', 'linewidth': 1.2, 'marker': '.', 'markersize': 6}, fmt_model_nodes_only={'color': 'blue', 'linestyle': 'solid', 'linewidth': 1.2, 'marker': '.', 'markersize': 6}, node_supports=True, gauss_points=True, fmt_gauss_points={'color': 'firebrick', 'linestyle': 'None', 'linewidth': 2.0, 'marker': 'X', 'markersize': 5}, fmt_model_truss={'color': 'green', 'linestyle': 'solid', 'linewidth': 1.2, 'marker': 'o', 'markerfacecolor': 'white', 'markersize': 6}, truss_node_offset=0.96, ax=False)[source]
Plot defined model of the structure.
- Parameters:
node_labels (int) – 1 - plot node labels, 0 - do not plot them; (default: 1)
element_labels (int) – 1 - plot element labels, 0 - do not plot them; (default: 1)
offset_nd_label (bool) – False - do not offset node labels from the actual node location. This option can enhance visibility.
axis_off (int) – 0 - turn off axes, 1 - display axes; (default: 0)
az_el (tuple) – contains azimuth and elevation for 3d plots. For 2d plots this parameter is neglected.
fig_wi_he (tuple) – contains width and height of the figure
fig_lbrt (tuple) – a tuple contating left, bottom, right and top offsets
local_axes (bool) – True - show cross section local axes or False. The green, red and blue arrows denote the element axis direction, the z-local axis and the y-local axis.
nodes_only (bool) – True - show the nodes only, although the elements are defined. Default: False.
fmt_model (dict) – A dictionary containing formatting the line and markers of the model elements. The formatting options can be: linewidth, color, marker, markersize. See matplotlib.plot documentation for more details, if necessary.
node_supports (bool) – True - show the supports. Default: True.
gauss_points (bool) – True - show the integration (Gauss) points. Default: True.
fmt_gauss_points (dict) – A dictionary containing formatting the marker of the gauss point.
truss_node_offset (float) – If non-zero, the nodes are offset to show pin markers. The number should preferably be between 0.90-0.97. Zero (0) or False means no offset. Default: 0.96.
ax – axis object.
Usage:
plot_model()
- plot model with node and element labels.plot_model(node_labels=0, element_labels=0)
- plot model without node element labelsplot_model(fig_wi_he=(20., 14.))
- plot model in a window 20 cm long, and 14 cm high.plot_model(nodes_only=True)
- plot only the nodes even thought the elements are defined.plot_model(node_supports=False)
- plot the model without the supports.