import numpy as np import holoviews as hv from holoviews import opts from holoviews import dim hv.extension('bokeh') np.random.seed(44) hex_tiles = hv.HexTiles(np.random.randn(100000, 2)) hex_tiles.opts(opts.HexTiles(width=500, height=400, tools=['hover'], colorbar=True)) xs, ys = np.random.randn(2, 1000) hex_with_values = hv.HexTiles((xs, ys, xs*(ys/2.), (xs**2)*ys), vdims=['Values', 'Hover Values']) overlay = hex_with_values * hv.Points(hex_with_values) overlay.opts( opts.HexTiles(width=400, height=400, aggregator=np.sum, tools=['hover']), opts.Points(size=1, color='black')) x, y = np.hstack([np.random.randn(2, 10000), np.random.randn(2, 10000)*0.8+2]) hex_two_distributions = hv.HexTiles((x, y)) hex_two_distributions.opts(scale=(dim('Count').norm()*0.5)+0.3, width=500, height=500) overlay = hex_two_distributions * hv.Bivariate(hex_two_distributions) overlay.opts( opts.HexTiles(min_count=0, width=500, height=500, tools=['hover']), opts.Bivariate(show_legend=False, line_width=3))