From a0c9b0162b365c0c8019a167e305dfbcdb2c09b9 Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Mon, 26 Oct 2020 15:22:52 +0100 Subject: [PATCH] Add pan/zoom tools --- pyzebra/app/panel_ccl_integrate.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyzebra/app/panel_ccl_integrate.py b/pyzebra/app/panel_ccl_integrate.py index 16e5be5..248434a 100644 --- a/pyzebra/app/panel_ccl_integrate.py +++ b/pyzebra/app/panel_ccl_integrate.py @@ -19,8 +19,10 @@ from bokeh.models import ( Line, LinearAxis, Panel, + PanTool, Plot, RadioButtonGroup, + ResetTool, Scatter, Select, Spacer, @@ -30,6 +32,7 @@ from bokeh.models import ( TextAreaInput, TextInput, Toggle, + WheelZoomTool, Whisker, ) @@ -193,7 +196,6 @@ def create(): y_range=DataRange1d(), plot_height=400, plot_width=700, - toolbar_location=None, ) plot.add_layout(LinearAxis(axis_label="Counts"), place="left") @@ -226,6 +228,9 @@ def create(): numfit_max_span = Span(location=None, dimension="height", line_dash="dashed") plot.add_layout(numfit_max_span) + plot.add_tools(PanTool(), WheelZoomTool(), ResetTool()) + plot.toolbar.logo = None + # Scan select def scan_table_callback(_attr, _old, new): if new: