plot_model#

plot_model(grillage_obj, *, backend='matplotlib', **kwargs)#

Plot the grillage mesh geometry.

Parameters:
  • grillage_obj (OspGrillage) – Grillage model (must have been created with create_osp_model()).

  • backend (str) – "matplotlib" (default, 2-D plan view) or "plotly" (interactive 3-D).

  • figsize (tuple, optional) – Figure size in inches (width, height). Ignored when ax is provided.

  • ax (Axes, optional) – Existing matplotlib Axes to plot on (matplotlib backend only).

  • fig (plotly.graph_objects.Figure, optional) – Existing Plotly Figure to add traces to (plotly backend only).

  • title (str or None) – Plot title. Default auto-generates "Grillage Model". Pass a string to override, or None to suppress.

  • show_nodes (bool) – Show node markers. Default True.

  • show_node_labels (bool) – Annotate node tags. Default False.

  • show_element_labels (bool) – Annotate element tags. Default False.

  • color_by_member (bool) – Colour elements by member group. Default True.

  • show_supports (bool) – Draw support symbols at restrained nodes. Default True.

  • show_rigid_links (bool) – Draw rigid-link connections (shell-beam models only). Default True.

  • show (bool) – If True, display the plot immediately. Defaults to True for plotly, False for matplotlib (matplotlib inline backends auto-display).

Returns:

Matplotlib axes (use ax.get_figure() for the figure) or Plotly figure (None when show=True).

Return type:

Axes or plotly.graph_objects.Figure or None