我有一堆散景hbar 圖,其中 y 軸刻度非常長:有些甚至比這更糟糕。我可以將它們布局在圖中,還是有其他方法可以處理這個問題?
1 回答

斯蒂芬大帝
TA貢獻1827條經驗 獲得超8個贊
擴展對問題的評論:
from bokeh.io import show
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
ds = ColumnDataSource(dict(x=[1, 2, 3],
y=['a', 'b', 'c']))
p = figure(y_range=sorted(set(ds.data['y'])))
p.hbar(y='y', height=0.8, left=0, right='x', source=ds)
p.text(y='y', text='y', text_baseline='middle', x=0, x_offset=10, color='white', source=ds)
show(p)
添加回答
舉報
0/150
提交
取消