import holoviews as hv from holoviews import opts from holoviews import streams hv.extension('bokeh') boxes = hv.Rectangles([(0, 0, 1, 1), (2, 1, 3.5, 2.5), (0.5, 1.5, 1.5, 2.5)]) box_stream = streams.BoxEdit(source=boxes, num_objects=3, styles={'fill_color': ['red', 'green', 'blue']}) boxes.opts( opts.Rectangles(active_tools=['box_edit'], fill_alpha=0.5, height=400, width=400)) box_stream.data box_stream.element