mdolab / OpenAeroStruct

OpenAeroStruct is a lightweight tool that performs aerostructural optimization using OpenMDAO.
Apache License 2.0
175 stars 112 forks source link

Fix plot_wing.py to work for matplotlib v3.8+ #425

Closed shamsheersc19 closed 2 months ago

shamsheersc19 commented 2 months ago

Purpose

Fix plot_wing.py to work for matplotlib v3.8+. The dist attribute for 3-D plots has been deprecated in recent matplotlib versions. See related Issue #423

Also made the 3-D view behavior consistent in plot_wingbox.py (the 3-D view should not reset if the iteration is changed).

Expected time until merged

1 day Code review should only take a few minutes.

Type of change

Bugfix (non-breaking change which fixes an issue)

Testing

Ran the run_CRM.py and run_aerostruct_uCRM_multipoint.py examples, and also confirmed that the views don't reset it the iteration is changed. Tested with matplotlib versions:

image

image

Checklist

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.95%. Comparing base (a8a272a) to head (1803ed0).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #425 +/- ## ======================================= Coverage 93.95% 93.95% ======================================= Files 104 104 Lines 6470 6470 ======================================= Hits 6079 6079 Misses 391 391 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.