sgio.plot_sg_2d#
- sgio.plot_sg_2d(sg, ax=None, ec_mesh='0.5', fc_mesh='0.9', lw_mesh=0.2, show_origin=True, **kwargs)#
Plot the mesh of a 2D structure gene.
Draws only the section geometry (mesh and, optionally, the origin marker). The constitutive-model overlays (principal bending axes and feature centers) are drawn separately by
plot_model_2d(), so the two can be combined on the same axes or used independently.- Parameters:
sg (StructureGene) – The 2D structure gene to be plotted.
ax (matplotlib.axes.Axes) – The axes object to plot on.
ec_mesh (str, optional) – The edge color of the mesh. Default is ‘0.5’.
fc_mesh (str, optional) – The face color of the mesh. Default is ‘0.9’.
lw_mesh (float, optional) – The line width of the mesh. Default is 0.2.
show_origin (bool, optional) – Whether to mark the section origin (0, 0). Default is True.
**kwargs (dict, optional) – Additional keyword arguments to pass to matplotlib plotting functions.