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

Inverted color scale #240

Open
CommonClimate opened this issue Nov 27, 2024 · 2 comments
Open

Inverted color scale #240

CommonClimate opened this issue Nov 27, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@CommonClimate
Copy link

This is my first issue here and I first want to congratulate xeofs' contributors for a tremendously useful and usable package.

Describe the bug
The color scale in
this xeof tutorial is opposite the general expectation.

Expected behavior
It is well-known to physicists that blue stars burn hotter than red stars; more generally, red light has a lower energy than blue light. Nevertheless, most people on this Earth expect cold water to come out of the blue tap, and warm water to come out of the red tap. Accordingly, the color scale in the example cited above behaves contrary to expectations, with blue = warm, and red = cold. It is easy enough to invert the color scale by passing kwargs = {"cmap": "RdBu_r", "transform": PlateCarree()}, but that is not very intuitive.

Can anyone explain why the code behaves in this counter-intuitive way?

Desktop (please complete the following information):

  • MacOS Sonoma 14.6.1 (23G93)
  • xeofs version [e.g. 3.0.4]
@CommonClimate CommonClimate added the bug Something isn't working label Nov 27, 2024
@nicrie
Copy link
Contributor

nicrie commented Nov 27, 2024

Thanks for the kind words @CommonClimate! Yeah, you're absolutely right--the colorbar does go against the usual expectation. I think the reason here was that the associated time series (PCs) are blue, so you can interpret it like this: blue regions $\implies$ follow the associated blue PC, and red regions $\implies$ follow the inverted PC.

That said, I don't have a strong opinion about it. That's just how I'd interpret it, but as you pointed out, it's clear that others might see it differently.

@nicrie nicrie added documentation Improvements or additions to documentation and removed bug Something isn't working labels Nov 27, 2024
@nicrie
Copy link
Contributor

nicrie commented Nov 27, 2024

for such changes it would be really helpful to have a "Suggest edit" button like the on in the xarray documentation:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants