The current ResetTool only ever resets a plot to its original bounds, which are recorded internally on the BokehJS side when the plot is initially displayed. Making it do something different would require new development (please open a feature request on GH if you are inclined). Alternatively you can make a custom extension to do something different, see the user guide for more information about extending Bokeh:
[http://bokeh.pydata.org/en/0.12.3/docs/user_guide/extensions.html](http://bokeh.pydata.org/en/0.12.3/docs/user_guide/extensions.html)
Thanks,
Bryan
On Nov 2, 2016, at 2:26 PM, Brian Gerke bfgerke@lbl.gov wrote:
I’m currently creating a figure and serving it over bokeh server. I want to be able to interactively update the axis range when I load a new data set. I can accomplish this by changing the x_range.end value (for example), but when I do this, the plot’s ResetTool will reset the axis range to the original value. What do I need to do to accomplish this? ResetTool doesn’t seem to have any default axis range values associated with it, but I’m sure they must be stored somewhere.
Below is a simplified version of what I want to accomplish. If we serve this via bokeh_server, and click on the ‘zoom’ button, I would like the ResetTool to leave the new axis ranges alone.
from bokeh.plotting import figure, curdoc
from bokeh.models import Button
from bokeh.layouts import column
def zoom():
p.x_range.end *= 1.2
p.y_range.end *=1.2
p = figure(plot_width=300, plot_height=300,
x_range=[0,5], y_range=[0,5])
p.circle(x=range(11), y=range(11))
b = Button(label=‘zoom out’)
b.on_click(zoom)
curdoc().add_root(column([p,b]))
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5ea5c82a-3aac-4978-8ac3-660a87f8d528%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/yJaAYElkhgM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/21A800B7-5CA8-4267-B127-E90B350A7B5E%40continuum.io.
Brian F. Gerke, Ph.D.
Principal Scientific Engineering Associate