heliosdrm / GRUtils.jl

Tools for using the GR framework in Julia
Other
31 stars 6 forks source link

interfaces for `imshow` #53

Closed heliosdrm closed 4 years ago

heliosdrm commented 4 years ago

Currently supported inputs are:

The following options could be added:

Python uses a keyword argument to set if values are to be normalized; Matlab/Octave allows to set the limits for normalization (with empty limits for automatic normalization). @jheinen: which approach do you prefer?

jheinen commented 4 years ago

I think we should, if possible, make everything MATLAB compliant (link). We cannot support everything, but we could be guided by their function calls.

heliosdrm commented 4 years ago

Ok, so imshow should accept a second (optional) positional argument, with the lower and upper values that will be mapped to the colormap. I'll add that option.

Regarding the automatic calculation of limits, I like how they are set for xlim, etc. in GR, so we could use the same logic for imshow: use (minval, maxval) to set the lower and upper bounds as arbitrary values, and replace any of them by nothing if you want it to match the minimum or maximum value of the data.