plots icon indicating copy to clipboard operation
plots copied to clipboard

Explicit bounds for ColourMap

Open dmcclean opened this issue 7 years ago • 1 comments

It would be nice if I could use heatImage without having the bounds for the ColourMap implicitly determined from the data. I am attempting to create a dynamic such image, and do not want the color scale to be constantly changing as new data comes in.

Perhaps either there could be supplyBounds :: HeatMatrix -> HeatMatrix (filling in the presently hidden min and max fields with user supplied values) or heatImage' :: HeatMatrix -> Double -> Double -> ColourMap -> Image PixelRGB8.

dmcclean avatar Apr 16 '18 19:04 dmcclean

Sorry I've left this so long, must have missed it when you made the issue. It is already possible to do this (although admittedly is's not that discoverable). You can use colourBarRange on the axis to set the range of the colour bar and also set heatMapLimits on the heat map to the same thing (the documentation is lying, the default is actually Nothing, I'll fix that).

Getting the heatMapLimits to provide bounds for the axis colour map would be better but it would require a bit of a refactor in how the axis is rendered (although it might not be too bad).

cchalmers avatar May 14 '19 19:05 cchalmers