python-visualization / branca

This library is a spinoff from folium, that would host the non-map-specific features.
https://python-visualization.github.io/branca/
MIT License
110 stars 63 forks source link

StepColormap: inclusive lower bound #141

Closed Conengmo closed 9 months ago

Conengmo commented 9 months ago

I wrote some simple tests to verify https://github.com/python-visualization/branca/pull/134.

Found that the LinearColormap already works as expected.

Stepcolormap is not exactly broken at the moment, but weird in that the lower value of each bound is exclusive. Confusing, because the first value in the index is inclusive. And it's probably more conventional to have the lower value be inclusive and the upper value be exclusive.

I've made a new PR over https://github.com/python-visualization/branca/pull/134 because these tests are important, we don't have to change LinearColormap, the change to StepColormap is smaller and updated the docstring.

Conengmo commented 9 months ago

@MxMartin I know it's been a while, but are you available to comment whether this fixes your issue?

MxMartin commented 9 months ago

@Conengmo Yes, for 'StepColormap' it does as far as my tests go

Conengmo commented 9 months ago

Great, let's get this out then. Thanks for bringing this issue up and looking into it!