plot_force#
- plot_force(ospgrillage_obj, result_obj=None, component=None, member=None, option='elements', loadcase=None, *, figsize=None, ax=None, scale=1.0, title=<object object>, color='k', fill=True, alpha=0.4, show=False, show_supports=False)#
Plot a force diagram for a grillage model result for a specified component and load case.
Note
For “shell_beam” model type, the function only plots the force diagrams for beam elements only.
- Parameters:
ospgrillage_obj (OspGrillage) – Grillage model object.
result_obj (xarray DataSet) – xarray DataSet of results.
component (str) – Force component to plot (e.g.
"Mz","Fy").member (str) – Member group name (required).
option (str) – Element query option.
loadcase (str) – Load case name. If
None, uses the first load case.figsize (tuple, optional) – Figure size in inches
(width, height). Ignored when ax is provided.ax (
Axes, optional) – Existing matplotlib Axes to plot on. When provided the function draws on this axes instead of creating a new figure.scale (float) – Multiply plotted values by this factor (e.g.
0.001to convert N to kN).title (str or None) – Plot title. Default (
_AUTO) uses the member name. Pass a string to override, orNoneto suppress the title.color (str) – Line / fill colour.
fill (bool) – If
True(default), shade the area under the diagram.alpha (float) – Fill transparency (0 = transparent, 1 = opaque).
show (bool) – If
True, callplt.show()before returning.show_supports (bool) – If
True, draw support markers on the zero baseline. DefaultFalse.
- Returns:
Matplotlib axes (use
ax.get_figure()to obtain the figure).- Return type:
Axes