Add two buttons for easier colorbar handling #5
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.