create_ramp_legend does not include the color for the highest density
- Dominant language
- Python
- Stars
- 3.6k
- Forks
- 376
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 1
Description
This may be related to issue #276. In testing different palettes in the [legend example notebook](https://github.com/bokeh/datashader/blob/master/examples/legends.ipynb), it seems the legend never includes the highest concentration of data points.
I tried a palette with only two colors, `palette = ['white', 'navy']`, made a few changes in the `create_base_plot` definition
```
# img = tf.shade(agg, cmap=Hot, how='log')
img = tf.shade(agg, cmap=palette, how='eq_hist')
...
fig.background_fill_color = 'white' # 'black'
```
then got the following result.

There is an obvious difference between the legend and figure and the legend. It is surprising that navy is not included in any of the legends, `'eq_hist'`, `'log'`, or `'linear'`; actually these three different legends exhibit only minor differences.
Repeating this with the viridis 256 colormap, `from bokeh.palettes import Viridis256 as palette`, gives a similarly surprising result, with no yellow in any of the legends.

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.