Skip to content

Commit 973d6dd

Browse files
committed
changes for new bokeh versions
1 parent e102170 commit 973d6dd

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/sed/calibrator/energy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,8 @@ def view(
734734
title=ttl,
735735
width=figsize[0] * 100,
736736
height=figsize[1] * 100,
737-
tooltips=ttp,
738737
)
738+
fig.hover.tooltips = ttp
739739
# Plotting the main traces
740740
for itr, color in zip(range(len(traces)), colors):
741741
trace = traces[itr, :]
@@ -790,7 +790,7 @@ def view(
790790
if show_legend:
791791
fig.legend.location = kwds.pop("legend_location", "top_right")
792792
fig.legend.spacing = 0
793-
fig.legend.padding = 2
793+
fig.legend.padding = 2 # type: ignore
794794

795795
pbk.show(fig)
796796

src/sed/calibrator/momentum.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import xarray as xr
2222
from bokeh.colors import RGB
2323
from bokeh.io import output_notebook
24+
from bokeh.models import Range1d
2425
from bokeh.palettes import Category10 as ColorCycle
2526
from IPython.display import display
2627
from joblib import delayed
@@ -1408,10 +1409,10 @@ def view(
14081409
fig = pbk.figure(
14091410
width=figsize[0] * 100,
14101411
height=figsize[1] * 100,
1411-
tooltips=ttp,
1412-
x_range=(0, num_rows),
1413-
y_range=(0, num_cols),
1412+
x_range=Range1d(0, num_rows),
1413+
y_range=Range1d(0, num_cols),
14141414
)
1415+
fig.hover.tooltips = ttp
14151416
fig.image(
14161417
image=[image.T],
14171418
x=0,

src/sed/diagnostics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def plot_single_hist(
3434
"""
3535
ttp = kwds.pop("tooltip", [("(x, y)", "($x, $y)")])
3636

37-
fig = pbk.figure(background_fill_color="white", tooltips=ttp)
37+
fig = pbk.figure(background_fill_color="white")
38+
fig.hover.tooltips = ttp
3839
fig.quad(
3940
top=histvals,
4041
bottom=0,

0 commit comments

Comments
 (0)