Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

shamsheersc19
Copy link
Contributor

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:

  • 3.6.0
  • 3.7.0
  • 3.8.0
  • 3.8.3

image

image

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

  * Remove the use of the dist attribute for 3-D plots, which has been
    deprecated in the recent matplotlib versions.
  * Make the 3-D view behavior consitent in plot_wingbox.py, i.e., the
    view does not reset if the iteration is changed.
@shamsheersc19 shamsheersc19 requested a review from a team as a code owner March 7, 2024 20:10
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@kanekosh kanekosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again, @shamsheersc19

@kanekosh kanekosh merged commit e1cb181 into mdolab:main Mar 11, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants