psyplot / psy-simple

psy-simple: The psyplot plugin for simple visualizations
https://psyplot.github.io/psy-simple
1 stars 3 forks source link

New Feature: Non-linear colormap scaling #13

Closed tobstac closed 4 years ago

tobstac commented 4 years ago

Problem description

Currently, only linear colorbars are supported in psy-view. However, in dataset analysis one often needs to check extreme values that can be hard to see using linear colorbars.

Expected Output

Simple interface (drop down menu?) to switch colorbar scaling from linear to e.g. logarithmic or exponential scaling.

Chilipp commented 4 years ago

Hey @tobstac! thanks for the input :smiley:

Do you think an interface similar to the one that is currently implemented for the psyplot-gui would be sufficient?

Screenshot 2020-04-17 14:14:52

Unfortunately it does not allow to select the number of colors, i.e. it would always use a continuous colormap (it uses matplotlibs LogNorm, see this example). I don't like this too much as it is always better to use fewer and more discrete colors. I.e. I rather prefer the upper colorbar than the lower one

Screenshot from 2020-04-17 14-35-53

However, I am not sure, about the best way to automate it.

tobstac commented 4 years ago

I'd say the non-linear bars are mostly to get an overview over the data instead of producing paper-quality plots - thus having limited possibilities like not being able to print discrete colors would be fine. However, maybe you could implement this via the custom color option? When I tested it, it seemed (figure below) like I could choose the specific values, but the colorbar intervals were still just linear. If you change it such that the color intervals match the custom values, you could implement both variants. The quick view continious scaled non-linear colorbar as well as a fine-tuned user defined colorbar with arbitrary color intervals which could be linear, logarithmic or irregular.

colormap

Chilipp commented 4 years ago

hey @tobstac! Yes, give me a couple of hours. As already stated, I want to revise the color settings dialog completely :sweat_smile: