☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Best way to autoadjust y axis window?

Community Support
aroberts
aroberts

What’s the best way to add an option to auto-adjust the y axis when panning horizontally? For example, if I have a Scatter series [1,2,3,4,5,6,7] and I’m only viewing points 1,2,3, I want it so that when I horizontally pan / scroll to points 5, 6, 7, the window automatically adjusts to those points rather than me having to manually pan upwards to view those points.

⌁   Link to post
Bryan
Bryan

There is nothing built-in for windowed auto-ranging. The best approach is probably to use js_on_change to respond to changes in the x-range. In the callbacks you would compute and the necessary min/max for the y-range based on the current x-range start and end and the actual data in ColumnDataSource objects for the relevant glyphs.

⌁   Link to post

End of archived discussion · Replies are disabled