Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zoom only in x but not in y direction?

Tags:

python

bokeh

when displaying a figure produced by Bokeh in a web browser, it is possible to zoom in. Is it possible to zoom only in x-direction, say, but not in y-direction?

I am thinking about displaying a time series f(t) where the range for f(t) is small and fixed, but the data is present for long periods of time t. It would be great to be able to focus in on particular moments in the history of the data, while maintaining the whole range of f(t) values.

Many thanks,

Hans

like image 711
user3127540 Avatar asked Dec 22 '13 20:12

user3127540


2 Answers

I just added a PR for this feature: https://github.com/ContinuumIO/bokeh/pull/508

It should be in master tonight, and part of the upcoming release. Basically it adds new tool names: xpan, ypan, xwheel_zoom, ywheel_zoom

Sorry this took so long, sometimes small but important things get lost in the shuffle.

like image 160
bigreddot Avatar answered Nov 15 '22 20:11

bigreddot


Edit: As of Bokeh 0.5 these tools are now available: xpan, ypan, xwheel_zoom, ywheel_zoom.


As Philliproso pointed out above, this is still an open issue; we hope to have it implemented within the next couple of releases.

In the meantime, the box_zoom tool can prescribe zoom boundaries visually.

like image 24
karan.dodia Avatar answered Nov 15 '22 19:11

karan.dodia