I have 2 vbar charts stacked on each other using "column" layout in bokeh. These 2 vbar charts share the same x-axis, and x,y ranges.
TOOLTIPS_1=[("Name","@Names"), ("Total Balance","@weekly{($ 0.00 a)}")]
p1 = figure(x_range=names, plot_width=1000, plot_height=250, title="Purchases in Past 7 Days", tools="pan,wheel_zoom, reset", tooltips=TOOLTIPS_1, sizing_mode = "fixed")
p1.vbar(x='Names', top='weekly', width=1, source=source, line_color="white", color = Spectral5[0])
# x-axis for p1 is set off
p1.xaxis.visible = False
p1.yaxis[0].formatter = NumeralTickFormatter(format="$0.00a")
#set p1 vertical range
max_range = merge.monthly.max()
p1.y_range = Range1d(0, max_range+1000000)
TOOLTIPS_2=[("Name","@Names"), ("Total Balance","@monthly{($ 0.00 a)}")]
p2 = figure(x_range=p1.x_range, y_range = p1.y_range, plot_width=1000, plot_height=250, title="Purchases in Past 30 Days", tools="pan,wheel_zoom, reset", tooltips=TOOLTIPS_2, sizing_mode = "fixed")
p2.vbar(x='Names', top='monthly', width=1, source=source, line_color="white", color = Spectral5[1])
# p2 has a x-axis and it's the same as p1's, although p1's x-axis is turned off
p2.xaxis.major_label_orientation = 1.2
p2.yaxis[0].formatter = NumeralTickFormatter(format="$0.00a")
layout = column(p1,p2)
show(layout)
Although, both p1 and p2 have the same ranges and plot width/height, we have different bar charts(p1's bar chart is larger), because one has axis label and another doesn't. Now, how do I set p1, p2's bar chart the same size?