Add two buttons for easier colorbar handling#5
Open
markusReinert wants to merge 6 commits intoBoldingBruggeman:masterfrom
Open
Add two buttons for easier colorbar handling#5markusReinert wants to merge 6 commits intoBoldingBruggeman:masterfrom
markusReinert wants to merge 6 commits intoBoldingBruggeman:masterfrom
Conversation
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.
Contributor
Author
|
@jornbr |
Member
|
Hi Markus, Thanks for the reminder, I'll take a look this week. Great that you've worked on extending PyNcView! Cheers, Jorn |
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.
Contributor
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, |
Contributor
Author
|
Ready to merge, @jornbr . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.