Hi !
Is there any way of obtaining the limits of the visible area of the plot, just like matplotlib’s xlim() and ylim() methods?
The use case would be to make a figure, let the user play with it (e.g. zoom, pan), and then let him identify a region of interest that would be saved for later (e.g. via a buttom).
It is obviously used already, e.g. in the Previous/Save tool, but it is not clear to me whether all this exists on the Java side only or whether this can be easily accessible from python?
Take this simple code, even without moving/zooming:
import numpy as np
import bokeh.plotting as bplt
x = np.random.randn(100)
y = np.random.randn(100)
bplt.output_server(‘test_interactivity’)
fig = bplt.figure(plot_width=600, plot_height=600, tools=‘pan,wheel_zoom’)
plot = bplt.scatter(x=x, y=y)
bplt.show()
I could not figure out how to determine the range of the plot as shown to the user.
plot.x_range’s start and end property are None (only the padding is defined)
bplt.xaxis()[0].bounds is ‘auto’
Many thanks for you help!
M.

