0

What setting(s) control the default view of individual Bokeh/HoloViews holomap views? For example, create several ellipses, each on their own overlay, combine into one holomap, how to set the default view so that it zooms to the current overlay?

import holoviews as hv
hv.extension('bokeh')

overlays = []
for i in range(10):
    overlays.append(hv.Ellipse(i, i, 1))
hm = hv.HoloMap(enumerate(overlays))

enter image description here

^ as individual views are cycled through, I would like to zoom to each circle, rather than the single default view fitting all overlays.

edit: I see that I can control individual default views using .options(xlim=(,), ylim(,)). This works when I view individual holomap views, like hm[0], hm[1], etc., but the view ranges do not change using the slider bar. Is there any way to get the slider bar to honor the xlim/ylim options?

phloem7
  • 220
  • 2
  • 12

1 Answers1

2

Just add .opts(framewise=True) to normalize per frame of the HoloMap independently, instead of the default of normalizing across all frames of the HoloMap together:

import holoviews as hv
hv.extension('bokeh')

hm = hv.HoloMap(enumerate([hv.Ellipse(i, i, 1).opts(framewise=True) for i in range(10)]))
James A. Bednar
  • 3,195
  • 1
  • 9
  • 13