I am going to embed bokeh plots into a powerpoint presentation. However, when I try to create a smaller chart by reducing plot height, the plot is not entirely shown. Here is the code:
d={'name':['a','b','c','d'],
'value':[800,1800,400,30]}
df=pd.DataFrame(d)
src=ColumnDataSource(df)
pl=figure(plot_height=350,
plot_width=500,
x_range=src.data['name'].tolist())
labels = LabelSet(x='name', y='value', text='value', level='glyph',
x_offset=-13.5, y_offset=5, source=src, render_mode='canvas')
pl.vbar(x='name', top='value', width=.8, source=src)
pl.add_layout(labels)
export_png(pl, filename=OUTFILE+'slide_4.png')
And here is the result:
Bar chart
Is there a way to make smaller bokeh charts? If not, maybe there is a way to resize images in python-pptx?