I am trying to initially constrain the visible factors of a categorical axis to a fixed number of entries and allow the user to scroll or zoom out from the initial view due to the large number of categories presented in the graph. The code below is what I have so far, but it doesn’t feel like the min_interval or max_interval properties are functioning the way I am interpreting them though they do seem to constrain the yzoom_in and yzoom_out tools. The functionality I am looking for is accomplished by first performing a zoom along the y axis after the plot is rendered and then scrolling along the y axis. How can I initially render the plot with only the first 4 factors visible and still allow rest of the graph to be scrolled?
from bokeh.plotting import figure, curdoc y_labels = ["a", "b", "c", "d", "e", "f", "g", "h"] x = [50, 40, 65, 10, 25, 37, 80, 60] p1 = figure(title="Dot Plot", tools="ybox_zoom,reset,ywheel_pan,yzoom_in,yzoom_out", y_range=y_labels, x_range=[0, 60], active_drag='ybox_zoom', active_scroll='ywheel_pan') p1.circle(x, y_labels, size=10, fill_color="orange", line_color="green", line_width=3, ) p1.y_range.bounds='auto' p1.y_range.min_interval = 1 p1.y_range.max_interval = 4 curdoc().add_root(p1) -Andrew