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

Add two buttons for easier colorbar handling #5

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

markusReinert
Copy link

This commit adds two buttons to the slicing tab if the current figure
has a colorbar. A click on the first button makes the colorbar
symmetric about zero, the second button allows to quickly switch
between recently used colormaps.

It is often useful to show positive and negative values in a colorplot
with two different colors, for example when we look at velocity. To do
this, it has so far been necessary to click "Properties", set the
minimum and maximum value of the colorbar to be symmetric about zero and
to choose a diverging colormap. This commit simplifies this workflow by
putting all these actions in a single button.

Since this new button changes the colormap, we might want to switch
back to the previously used colormap when we look at a different
quantity that is not symmetric about zero. For this purpose, a menu
button is added as well, which allows to switch from the current
colormap back to a recently used colormap. This menu also suggests
some commonly used colormaps, and is a lot faster to use than the
complete colormap-menu in the "Properties" dialog.

This commit adds two buttons to the slicing tab if the current figure
has a colorbar.  A click on the first button makes the colorbar
symmetric about zero, the second button allows to quickly switch
between recently used colormaps.

It is often useful to show positive and negative values in a colorplot
with two different colors, for example when we look at velocity.  To do
this, it has so far been necessary to click "Properties", set the
minimum and maximum value of the colorbar to be symmetric about zero and
to choose a diverging colormap.  This commit simplifies this workflow by
putting all these actions in a single button.

Since this new button changes the colormap, we might want to switch
back to the previously used colormap when we look at a different
quantity that is not symmetric about zero.  For this purpose, a menu
button is added as well, which allows to switch from the current
colormap back to a recently used colormap.  This menu also suggests
some commonly used colormaps, and is a lot faster to use than the
complete colormap-menu in the "Properties" dialog.
@markusReinert
Copy link
Author

@jornbr
Hi Jorn,
did you already have time to look at my proposed modifications?
Cheers,
Markus

@jornbr
Copy link
Member

jornbr commented Sep 20, 2021

Hi Markus,

Thanks for the reminder, I'll take a look this week. Great that you've worked on extending PyNcView!

Cheers,

Jorn

markusReinert and others added 2 commits February 4, 2022 14:22
When the two buttons for colorbar handling are accepted,
this will be a new version of pyncview, so I increased
the version number by one.
@markusReinert
Copy link
Author

Hi Jorn,

I made my pull request up-to-date with the current version of pyncview. Also, I added a commit to my pull request that increases the pyncview version number. This seems to be a logical step for when my pull request is accepted. What do you think about my suggested feature @jornbr?

Best regards,
Markus

@markusReinert
Copy link
Author

Ready to merge, @jornbr .

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

Successfully merging this pull request may close these issues.

2 participants