Commit c00c0e67 authored by jog39's avatar jog39
Browse files

fix #19

parent eb6524da
......@@ -163,6 +163,17 @@ def create_bokeh_plot(data, gui=False):
fig.add_layout(legend, 'right')
fig.plot_width += 100
# small snippet to rerender axes when hiding species
# need pscript to be installed
def callback(fig=fig, legend=fig.legend[0]):
y_range = fig.y_range
y_range.have_updated_interactively = False
y_range.renderers = [item.renderers[0] for item in legend.items if item.renderers[0].visible]
Bokeh.index[fig.id].plot_canvas_view.update_dataranges()
for item in fig.legend[0].items:
item.renderers[0].js_on_change("visible", CustomJS.from_py_func(callback))
return fig, cds
......
......@@ -125,7 +125,7 @@ then
fi
### Jupyter
packages='jupyter bokeh ipywidgets'
packages='jupyter bokeh ipywidgets pscript'
if hash pip3 2>/dev/null
then
if [[ -d ${HOME}/.local/bin || $release == "bionic" ]]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment