import numpy as np import holoviews as hv import pandas as pd from holoviews import opts, dim hv.extension('bokeh') np.random.seed(12) coords = np.random.rand(50,2) points = hv.Points(coords) points.opts(color='k', marker='+', size=10) (points + points[0.6:0.8,0.2:0.5]).opts( opts.Points(color='k', marker='+', size=10)) np.random.seed(10) data = np.random.rand(100,4) popts = opts.Points(color='z', size=dim('size')*20) points = hv.Points(data, vdims=['z', 'size']) (points + points[0.3:0.7, 0.3:0.7].hist()).opts(popts) pts = points[0.3:0.7, 0.3:0.5].data pts copts = opts.Points(color='z', size=dim('size')*20, width=250, height=250) xs = [0.44183317, 0.37764192, 0.30021061, 0.54346504, 0.38412185] ys = [0.43401399, 0.42874733, 0.39644188, 0.33775465, 0.39611779] colors = [0.61776698, 0.51120865, 0.79327323, 0.89802431, 0.89727994] sizes = [0.51313824, 0.89176257, 0.41227608, 0.94070704, 0.05882237] dictionary = dict(x=xs, y=ys, z=colors, size=sizes) df = pd.DataFrame(dictionary) array = np.stack([xs,ys,colors,sizes]).T (hv.Points(df) + hv.Points(dictionary, vdims=['z', 'size']) + hv.Points(array, vdims=['z', 'size'])).opts(copts)