Skip to content

Commit

Permalink
Merge pull request #218 from ritchie46/fixShowResults
Browse files Browse the repository at this point in the history
Fix show_results() plotting
  • Loading branch information
smith120bh authored Oct 30, 2023
2 parents 3ffa884 + 2579105 commit d50c5d4
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions anastruct/fem/plotter/mpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ def axial_force(
el.N_2,
node_results=not bool(verbosity),
color=color,
axes_i=axes_i,
)

point = (el.vertex_2 - el.vertex_1) / 2 + el.vertex_1
Expand Down Expand Up @@ -933,6 +934,7 @@ def bending_moment(
abs(el.node_1.Ty),
abs(el.node_2.Ty),
node_results=node_results,
axes_i=axes_i,
)

if el.all_qp_load:
Expand Down Expand Up @@ -1009,7 +1011,11 @@ def shear_force(
shear_2 = el.shear_force[-1]

self.plot_result(
axis_values, shear_1, shear_2, node_results=not bool(verbosity)
axis_values,
shear_1,
shear_2,
node_results=not bool(verbosity),
axes_i=axes_i,
)
if show:
self.plot()
Expand Down Expand Up @@ -1203,7 +1209,12 @@ def displacements( # pylint: disable=arguments-renamed

for el in self.system.element_map.values():
axis_values = plot_values_deflection(el, factor, linear)
self.plot_result(axis_values, node_results=False, fill_polygon=False)
self.plot_result(
axis_values,
node_results=False,
fill_polygon=False,
axes_i=axes_i,
)

if el.type == "general":
assert el.deflection is not None
Expand Down Expand Up @@ -1264,6 +1275,7 @@ def results_plot(
axes_i=0,
)
self.axes.append(self.fig.add_subplot(a + 2))
print(self.axes)
plt.title("bending moment")
self.bending_moment(
factor=None,
Expand Down

0 comments on commit d50c5d4

Please sign in to comment.