colorbar() should accept simple syntaxes, with implicit umin, umax, matching relative u and color ranges, etc
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
After a 2.5|3D plot, colorbar() used without umin and umax arguments should be able to read default values as min and max of Z data of the plot.
Other handy syntaxes would be highly welcome, to be able to skip umin and umax, or colminmax, etc.
PROPOSAL:
========
* Let U be the Z data of the plot, %inf, -%inf and %nan values being ignored.
Let minU and maxU be the min and max of U values.
* Let Nc be the number of colors in the current color map = size(gcf().color_map,1)
==> Skipping an input argument should become possible just with providing no value (,,) or providing []
--> colorbar()
- sets umin = minU
umax = maxU
For a Matplot.image_type="index": colminmax = [minU maxU]
Otherwise : colminmax = [1 Nc]
--> colorbar(umin, umax, -1) // -1 means : sets colors range accordingly wrt the full color map.
- sets colminmax = [i j] such that the relative range [i j]/Nc matches the [umin umax]/U one.
--> colorbar(,, [i j]) // with i, j integers > 0
- sets umin and umax such that the relative range [umin umax]/U matches the relative color range [i j]/Nc
--> colorbar(,, [a b]) // with fractions a, b in [0,1]
- sets umin and umax such that the relative range [umin umax]/U matches [a b]
- sets [i j] such that the relative range [i j]/Nc matches [a b]
--> colorbar(-%inf, %inf, ..)
- sets umin = minU
umax = maxU
--> Set the default colminmax ([] or ",,") to [1,Nc]
OTHER INFORMATION:
------------------
The existing syntaxes must be kept and performed without any change (full back-compatibility).