A too-long colorbar label string is not visible, as seen below:
import holoviews as hv
import pandas as pd
hv.extension('bokeh')
df = pd.DataFrame({
'x': ['a', 'a', 'b', 'b'],
'y': ['c', 'd', 'c', 'd'],
'z': [1, 2, 3, 4]})
hv_heatmap = hv.HeatMap(df, kdims=['x', 'y'], vdims=['z']).opts(
invert_yaxis=True, toolbar='above',
colorbar=True, clabel='Count (numeric scale)')
hv_heatmap
How to specify a vertical colorbar label?
It would be nice if the colorbar label was vertical, see this bokeh stackoverflow.
I have also tried using Panel to add the text manually (in an individual panel next to the heatmap), but this resulted text too far away from the colorbar. My current solution is to use the clabel
and make the colorbar wider by using .opts(plot=dict(colorbar_opts={'width': 70}))
such that all the text is shown.