python-visualization/branca

Expose legend_scaler's max_labels in ColorMap

martinfleis opened this issue · 0 comments

Hi,

I see that legend_scaler has an option to specify the number of labels (max_labels) but that is not accessible form within ColorMap.

Would be great to expose it in ColorMap.__init__ and then pass it to render. With large numbers you get overlaps and there's no way to prevent it.

Relevant bits:

def legend_scaler(legend_values, max_labels=10.0):

self.tick_labels = legend_scaler(self.index)

Happy to do a PR for that.