kylejgillett / sounderpy

A python package that helps you to access and plot vertical profile data for meteorological analysis
https://kylejgillett.github.io/sounderpy/
MIT License
51 stars 13 forks source link

Save plots to files #2

Closed adamorgler closed 1 year ago

adamorgler commented 1 year ago

split the plot generator into two methods. One to render the plot as before, the other to save the plot as an image file

kylejgillett commented 1 year ago

This is a great idea! Thank you so much for contributing this.

I will include this feature in the next release of SounderPy, which should come pretty quick.

kylejgillett commented 1 year ago

So I have this functionality up and running now, with just a slightly different version of what you provided.

The way I have it still uses spy.metpy_sounding() but uses the kwarg method to determine how the user wants to handle the function. method can be set to either 'show' or 'save'. An additional optional kwarg is filename allows the user to set a custom filename.

With this functionality created and ready to be added to v1.1.0 of SounderPy, I will now close this pull request.