我试图在布局内设置散景图的绝对位置,以便其中一个图显示在另一个图的顶部。现在当我在绘制这样的东西时:
from bokeh.io import curdoc
from bokeh.plotting import figure
from bokeh.layouts import layout
import numpy as np
x = np.arange(1,10.1,0.1)
y = [i**2 for i in x]
categories = ['A', 'B']
values = [1000, 1500]
fig1 = figure(width=600,plot_height=600, title="First Plot")
fig1.line(x=x, y=y)
fig2 = figure(width=200,plot_height=250,x_range=categories,
title="Second Plot") fig2.vbar(x=categories, top=values, width=0.2)
l = layout([[fig1,fig2]])
curdoc().add_root(l)
Run Code Online (Sandbox Code Playgroud)
结果将是这样的:
我正在寻找的是某种使它看起来像这样的方法:
怎样才能达到这个结果?
谢谢!