import numpy as np import holoviews as hv hv.extension('bokeh') frequencies = [0.5, 0.75, 1.0, 1.25] def sine_curve(phase, freq): xvals = [0.1* i for i in range(100)] return hv.Curve((xvals, [np.sin(phase+freq*x) for x in xvals])) curve_dict = {f:sine_curve(0,f) for f in frequencies} hmap = hv.HoloMap(curve_dict, kdims='frequency') hmap phases = [0, np.pi/2, np.pi, 3*np.pi/2] curve_dict_2D = {(p,f):sine_curve(p,f) for p in phases for f in frequencies} hmap = hv.HoloMap(curve_dict_2D, kdims=['phase', 'frequency']) hmap hmap = hv.HoloMap(kdims=['phase', 'frequency']) for (phase, freq) in [(0,0.5), (0.5,0.5), (0.5,1), (0,1)]: hmap[(phase, freq)] = sine_curve(phase,freq) (0, 0.5) in hmap hmap.get((0,0.5)) hmap[0,1] + hmap[0,:] hmap.data