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: Allow saving plots instead of showing them #564

Open
nalquas opened this issue Feb 27, 2024 · 3 comments
Open

ENH: Allow saving plots instead of showing them #564

nalquas opened this issue Feb 27, 2024 · 3 comments
Labels
Enhancement New feature or request, including adjustments in current codes Outputs Dedicated to visualizations enhancements like prints and plots

Comments

@nalquas
Copy link
Contributor

nalquas commented Feb 27, 2024

Is your feature request related to a problem? Please describe.

All matplotlib plots generated by RocketPy (for example via Rocket.draw or flight.all_info) are shown using matplotlib's show function. This does not really allow for automatic export of these plots (as is the case when not using Jupyter Notebook).

Describe the solution you'd like

Add a parameter to the info functions (and other plot-generating functions) for selecting between immediately showing the plot and saving the plot to a file. Internally, this can be done using matplotlib's savefig function.

@Gui-FernandesBR Gui-FernandesBR added Enhancement New feature or request, including adjustments in current codes Outputs Dedicated to visualizations enhancements like prints and plots labels Feb 27, 2024
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone Feb 27, 2024
@Gui-FernandesBR
Copy link
Member

Hello @nalquas , thank you for opening this issue, that's a wonderful feature request.

Please let us know if you would be interested in contributing to the solution.

Here are some suggestions that might help:

Overall, allowing the user to save the plots instead of just plotting them is quite helpful, specially to teams wanting to create reports for competitions submissions.

@lucasfourier lucasfourier self-assigned this Mar 16, 2024
@nalquas
Copy link
Contributor Author

nalquas commented Apr 9, 2024

Hi @Gui-FernandesBR, thank you for the response. I would be interested in working on this (I am part of a student team that needs this feature), although I see you self-assigned the issue in the meantime. Did you already start working on it?

@Gui-FernandesBR
Copy link
Member

Hi @Gui-FernandesBR, thank you for the response. I would be interested in working on this (I am part of a student team that needs this feature), although I see you self-assigned the issue in the meantime. Did you already start working on it?

No I have not started. Feel free to implement it by yourself, asking any questions if needed. We would be extremely glad receiving a PR from you.

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: Backlog
Development

No branches or pull requests

3 participants