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

Improving the Aesthetics of SkewT Diagrams #3704

Open
Clarmy opened this issue Nov 28, 2024 · 3 comments
Open

Improving the Aesthetics of SkewT Diagrams #3704

Clarmy opened this issue Nov 28, 2024 · 3 comments
Labels
Type: Feature New functionality

Comments

@Clarmy
Copy link

Clarmy commented Nov 28, 2024

What should we add?

I have always felt that the SkewT diagrams drawn in NCL are more visually appealing in terms of color schemes and structure compared to those in MetPy. Is it possible to make significant modifications to the existing style of MetPy's SkewT diagrams, to mimic the style of NCL and achieve a similar aesthetic?

Here is an example of a SkewT diagram from NCL:
SkewT

Reference

No response

@Clarmy Clarmy added the Type: Feature New functionality label Nov 28, 2024
@DWesl
Copy link
Contributor

DWesl commented Nov 29, 2024

Which bits in particular are you after?
Tweaks to the fonts used would likely be a straightforward modification of your matplotlibrc
The line of column data under the figure title you could add with ax.text or plt.text in a wrapper function
The green stripes between isotherms looks like plt.fill_betweenx
The colors of the various lines you could do with extra arguments or keyword arguments to plt.plot

If you work out the combination, perhaps you would like to add an example to the Gallery?

@Clarmy
Copy link
Author

Clarmy commented Nov 30, 2024

It's not like that; MetPy has a specialized plotting wrapper for SkewT diagrams. It has a dedicated SkewT object that defines the plotting methods and styles. For example:

fig = plt.figure(figsize=(9, 9))
skew = SkewT(fig, rotation=45, rect=(0.1, 0.1, 0.55, 0.85))
skew.plot(p, T, 'r')
plt.savefig('./sample.png')

Image

I can directly call skew.plot to draw the Skew-T diagram. So what I mean is to have the default style of skew.plot adjusted to look like the NCL effect without relying on the user's own plotting skills.

@jrleeman
Copy link
Contributor

I've made a demo of many of these changes in the most recent MetPy Monday video here: https://youtu.be/3iPujH33WsI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New functionality
Projects
None yet
Development

No branches or pull requests

3 participants