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
111 stars 63 forks source link

Allow changing color scale size #77

Closed Conengmo closed 1 year ago

Conengmo commented 4 years ago

Closes #72. Allow changing the size of any color scale.

color_scale = StepColormap()
color_scale.width = 1000

I didn't make it a function parameter since I'm not sure how widely used this feature will be. But with this change at least the variable is no longer hard-coded but exposed and can be changed if wanted.

afbeelding

Conengmo commented 1 year ago

In Colormap.render() I didn't include self.height, because the height of 40 is hard-coded throughout that method.