add_results_to_plot#
- SamplingPoint.add_results_to_plot(axes, components, spots=(Spot.BOTTOM, Spot.TOP), core_scale_factor=1.0, title='', xlabel='')#
Add results (strain, stress, or failure values) to an
Axes
object.- Parameters:
components (
Sequence
[str
]) – List of result components. Valid components for strain are"e1"
,"e2"
,"e3"
,"e12"
,"e13"
, and"e23"
Valid components for stress are"s1",
"s2"
,"s3"
,"s12"
,"s13"
, and"s23"
. Valid components for failure are"inverse_reserve_factor"
,"reserve_factor"
, and"margin_of_safety"
.spots (
Collection
[Spot
], default:(<Spot.BOTTOM: 1>, <Spot.TOP: 3>)
) – Collection of spots (interfaces).core_scale_factor (
float
, default:1.0
) – Factor for scaling the thickness of core plies.title (
str
, default:''
) – Title of the plot. This parameter is ignored if empty.xlabel (
str
, default:''
) – Becomes the label of the x-axis. This parameter is ignored if empty.
Examples
>>> import matplotlib.pyplot as plt >>> fig, ax1 = plt.subplots() >>> sampling_point.add_results_to_plot(ax1, ["s13", "s23", "s3"], [Spot.BOTTOM, Spot.TOP], 0.1, "Interlaminar Stresses", "[MPa]")
- Return type: