Skip to content

Commit a8a272a

Browse files
Fix plot_wingbox.py to work for matplotlib v3.8+ (#424)
1 parent def4df0 commit a8a272a

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

openaerostruct/utils/plot_wingbox.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
2+
This is a custom script for visualizing the optimization results when using the wingbox structural model.
33
This only works when using the wingbox model with MULTIPOINT analysis/optimization.
4+
Modifications will be necessary when moving away from the intended optimization problem formulation,
5+
and this can be used as a starting point.
46
7+
The usage, for example, if running a case from the `examples` directory would be `python ../utils/plot_wingbox.py aerostruct.db`.
58
"""
69

710

@@ -588,14 +591,6 @@ def plot_sides(self):
588591
def plot_wing(self):
589592
n_names = len(self.names)
590593
self.ax.cla()
591-
az = self.ax.azim
592-
el = self.ax.elev
593-
dist = self.ax.dist
594-
595-
# for a planform view use:
596-
# az = 270
597-
# el = 0.
598-
# dist = 15.
599594

600595
for j, name in enumerate(self.names):
601596
# for wingbox viz
@@ -760,8 +755,7 @@ def plot_wing(self):
760755
color="k",
761756
)
762757

763-
self.ax.view_init(elev=el, azim=az) # Reproduce view
764-
self.ax.dist = dist
758+
self.ax.view_init() # Reproduce view
765759

766760
def save_video(self):
767761
options = dict(title="Movie", artist="Matplotlib")

0 commit comments

Comments
 (0)