Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit bounds for ColourMap #41

Open
dmcclean opened this issue Apr 16, 2018 · 1 comment
Open

Explicit bounds for ColourMap #41

dmcclean opened this issue Apr 16, 2018 · 1 comment

Comments

@dmcclean
Copy link

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.

@cchalmers
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants