ENH: Add filename parameter to _MonteCarloPlots.all() method for saving plots to disk#848
ENH: Add filename parameter to _MonteCarloPlots.all() method for saving plots to disk#848
Conversation
|
@Gui-FernandesBR 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
|
@copilot, actually we do have copilot instructions. Please search deeper within the .github folder |
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
I've searched thoroughly throughout the repository including the .github folder and all subdirectories, but I couldn't find any copilot instructions file. The search included:
It appears there are currently no copilot instructions configured for this repository. If you'd like me to create one, I'd be happy to help set up a .github/copilot-instructions.md file following GitHub's best practices. |
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
* Initial plan * Add save functionality to _MonteCarloPlots.all method Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com> * Improve test cleanup for monte_carlo_plots_all_save test Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com> * DOC: Add PR #848 to CHANGELOG.md Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
This PR adds save functionality to the
_MonteCarloPlots.all()method, allowing users to save Monte Carlo histogram plots to disk instead of only displaying them.Changes Made
filename=Noneparameter to_MonteCarloPlots.all()method following the existing pattern used in_FlightPlotsshow_or_save_plot()helper function for consistent file handling and validationresults_apogee.png,results_x_impact.png)Usage Examples
Key Features
filenameparameter pattern as other RocketPy plot methodsshow_or_save_plot()helper for file validation and directory creationTesting
test_monte_carlo_plots_all_with_filenamethat verifies both display and save modesThis enhancement addresses a gap in the Monte Carlo plotting functionality and provides consistency with other plotting methods in RocketPy.
Fixes #847.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.