Skip to content

Commit d50c5d4

Browse files
authored
Merge pull request #218 from ritchie46/fixShowResults
Fix show_results() plotting
2 parents 3ffa884 + 2579105 commit d50c5d4

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

anastruct/fem/plotter/mpl.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@ def axial_force(
826826
el.N_2,
827827
node_results=not bool(verbosity),
828828
color=color,
829+
axes_i=axes_i,
829830
)
830831

831832
point = (el.vertex_2 - el.vertex_1) / 2 + el.vertex_1
@@ -933,6 +934,7 @@ def bending_moment(
933934
abs(el.node_1.Ty),
934935
abs(el.node_2.Ty),
935936
node_results=node_results,
937+
axes_i=axes_i,
936938
)
937939

938940
if el.all_qp_load:
@@ -1009,7 +1011,11 @@ def shear_force(
10091011
shear_2 = el.shear_force[-1]
10101012

10111013
self.plot_result(
1012-
axis_values, shear_1, shear_2, node_results=not bool(verbosity)
1014+
axis_values,
1015+
shear_1,
1016+
shear_2,
1017+
node_results=not bool(verbosity),
1018+
axes_i=axes_i,
10131019
)
10141020
if show:
10151021
self.plot()
@@ -1203,7 +1209,12 @@ def displacements( # pylint: disable=arguments-renamed
12031209

12041210
for el in self.system.element_map.values():
12051211
axis_values = plot_values_deflection(el, factor, linear)
1206-
self.plot_result(axis_values, node_results=False, fill_polygon=False)
1212+
self.plot_result(
1213+
axis_values,
1214+
node_results=False,
1215+
fill_polygon=False,
1216+
axes_i=axes_i,
1217+
)
12071218

12081219
if el.type == "general":
12091220
assert el.deflection is not None
@@ -1264,6 +1275,7 @@ def results_plot(
12641275
axes_i=0,
12651276
)
12661277
self.axes.append(self.fig.add_subplot(a + 2))
1278+
print(self.axes)
12671279
plt.title("bending moment")
12681280
self.bending_moment(
12691281
factor=None,

0 commit comments

Comments
 (0)