Skip to content

Commit f702974

Browse files
Merge branch 'graph-objects' of https://github.com/Czarified/section-properties into Czarified-graph-objects
2 parents 9800ca9 + 8222469 commit f702974

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

sectionproperties/analysis/cross_section.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,8 @@ def plot_centroids(self, pause=True):
11791179
# finish the plot
11801180
post.finish_plot(ax, pause, title='Centroids')
11811181

1182+
return fig, ax
1183+
11821184
def display_mesh_info(self):
11831185
"""Prints mesh statistics (number of nodes, elements and regions) to the command window.
11841186

sectionproperties/examples/example_composite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
section.display_results()
4545

4646
# plot the centroids
47-
section.plot_centroids()
47+
fig, ax = section.plot_centroids()
4848

4949
stress_post.plot_stress_n_zz(pause=False) # plot the axial stress
5050
stress_post.plot_stress_m_zz(pause=False) # plot the bending stress

sectionproperties/examples/example_custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
section.calculate_plastic_properties()
3434

3535
# plot the centroids
36-
section.plot_centroids()
36+
fig, ax = section.plot_centroids()

sectionproperties/examples/example_merged.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@
3939
section.calculate_plastic_properties(time_info=True, verbose=True)
4040

4141
# plot the centroids
42-
section.plot_centroids()
42+
fig, ax = section.plot_centroids()

sectionproperties/examples/example_mirr_rot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
section.calculate_plastic_properties(time_info=True, verbose=True)
3434

3535
# plot the centroids
36-
section.plot_centroids()
36+
fig, ax = section.plot_centroids()

0 commit comments

Comments
 (0)