psyplot / psyplot-gui

Graphical User Interface for the psyplot package
https://psyplot.github.io/psyplot-gui
7 stars 6 forks source link

Feature: colourbar, symmetric about zero #25

Open rpnaut opened 3 years ago

rpnaut commented 3 years ago

No code needed to be shown.

Problem description

Using the GUI of psyplot is somehow frustating for quantities you want to visualize with a range symmetric about zero. There is no colourbar with white at the center and useful colors at the left and right end.

Expected

Extend the colourbars by those of ncview. That would be really advantageous.

Chilipp commented 3 years ago

hey @rpnaut. Are you using the psyplot-gui? Then this is actually already possible

https://user-images.githubusercontent.com/9960249/105854096-bcd31900-5fe6-11eb-82fa-e3b34af51b64.mp4

or via script, e.g.

sp.update(bounds="roundedsym", cmap="RdBu")

there is also the "red_white_blue" cmap, if you like.

You can should add your own colormaps using the 'colors.cmaps' rcParam, e.g. via

cat >> ~/.config/psyplot/psyplotrc.yml << EOF

colors.cmaps: 
  rgb: ['r', 'g', 'b']

EOF

and then `sp.update(cmap="rgb")