3.1. Plot Beam Diagram
The class used to plot beam diagrams. While the beam can analyze all support types, currently not all support types can be plotted. Only free, roller, pin, and fixed supports can be plotted.
- planesections.diagram.diagram.plotBeamDiagram(beam, plotLabel=True, labelForce=False, plotForceValue=False, units='environment') -> (<class 'matplotlib.figure.Figure'>, <class 'matplotlib.axes._axes.Axes'>)[source]
Creates a diagram of the created beam. Only certain fixities are supported for plotting, including free, roller (support only in y), pinned (support in x and y), and fixed (support in x/y/rotation). Only certain forces are supported for plotting - for distrubuted forces only the y component of the beam can be plotted.
Note, the diagram has been rescaled so the beam has lenght scaled to the maximum beam size of 8. This is to make consistent plotting easier across a number of beam sizes, however, the matplotlib objects in the plot have different value than the actual beam.
The resulting diagram is a matplotlib figure that can be further manipulated.
- Parameters:
beam (PlaneSections beam) – The Beam Object to be plotted.
plotLabel (bool, optional) – A toggle that turns on or off plotting user defined labels along the beam. The default is True.
labelForce (bool, optional) – A toggle that turns on or off if forces get labeled. If toggled to true, forces will be given a label instead of the beam location. The default is True.
plotForceValue (bool, optional) – A toggle that turns on or off plotting the force values with the label. If set to true, the magnitude of the force will be plotted in the digram units. The default is False.
units (str, optional) –
A string that specified how the diagram units will be managed in the. The default value ‘environment’ causes the plot to read from the active environment. see
planesections.DiagramUnitEnvironmentHandlerIf not set to environment, it can have value: ‘metric’, ‘metric_kNm’, ‘metric_Nm’, ‘imperial_ftkip’, ‘imperial_ftlb’
The unit handler for the plot. This The default is ‘environment’.
- Returns:
fig (matplotlib fig)
ax (matplotlib ax)