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

ENH: Plotting both power on and off drag curves in a single plot. #547

Merged
merged 5 commits into from
Feb 7, 2024

Conversation

juliomachad0
Copy link
Member

Pull request type

  • Code changes (bugfix, features)

Checklist

  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest --runslow) have passed locally
  • CHANGELOG.md has been updated (if relevant)

Current behavior

Before the changes, the drag curves were plotted separated.

New behavior

Now, with the changes made, there is only a plot with both curves.

Breaking change

  • Yes
  • No

Additional information

The methods power_on_drag and power_off_drag of the _RocketPlots class were removed.

@juliomachad0 juliomachad0 added Enhancement New feature or request, including adjustments in current codes Outputs Dedicated to visualizations enhancements like prints and plots labels Feb 7, 2024
@juliomachad0 juliomachad0 added this to the Release v1.X.0 milestone Feb 7, 2024
@juliomachad0 juliomachad0 self-assigned this Feb 7, 2024
@juliomachad0 juliomachad0 requested a review from a team as a code owner February 7, 2024 00:40
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (435bd62) 72.32% compared to head (0ccd0b3) 72.31%.

Files Patch % Lines
rocketpy/plots/rocket_plots.py 89.47% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #547      +/-   ##
===========================================
- Coverage    72.32%   72.31%   -0.02%     
===========================================
  Files           56       56              
  Lines         9399     9416      +17     
===========================================
+ Hits          6798     6809      +11     
- Misses        2601     2607       +6     

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

Copy link
Member

@Gui-FernandesBR Gui-FernandesBR left a comment

Choose a reason for hiding this comment

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

Excellent PR, I went through the PR description and everything was transparent enough.

I'm adding some commentaries with concerns that I have, it would be good to discuss them if needed. Also, please let me know if there's anything you don't understand at a first glance.

Welcome to the Matplotlib School of Engineering!

rocketpy/plots/rocket_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/rocket_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/rocket_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/rocket_plots.py Outdated Show resolved Hide resolved
Copy link
Member

@Gui-FernandesBR Gui-FernandesBR left a comment

Choose a reason for hiding this comment

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

LGTM,

Thank you for your first contribution.
It does solve the problem and make our lives better when seeing all those plots.

As a suggestion, mext PR I recommend you to also include a picture of the plot you make so we can have a preview before reviewing it.

Copy link
Collaborator

@phmbressan phmbressan left a comment

Choose a reason for hiding this comment

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

Great! This is much better to compare the drag curves and adding the transonic region is the icing on the cake.

@phmbressan phmbressan merged commit e5d1122 into develop Feb 7, 2024
10 of 11 checks passed
@phmbressan phmbressan deleted the enh/drag-plot-on-off branch February 7, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request, including adjustments in current codes Outputs Dedicated to visualizations enhancements like prints and plots
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

ENH: display both power_off_drag and power_on_drag in a single plot
4 participants