I made a bunch of BoxPlots, and specified their height and width. Code below.
b1 = BoxPlot(data=source, label='Cover_Type', values='Elevation', color='Cover_Type', height=250, width=300, legend=False)
b2 = BoxPlot(data=source, label='Cover_Type', values='Aspect', color='Cover_Type', height=250, width=300, legend=False)
b3 = BoxPlot(data=source, label='Cover_Type', values='Slope', color='Cover_Type', height=250, width=300, legend=False)
layout = row(b1, b2, b3)
show(layout)
They display just fine. However, when I click on the “Reset” tool, the plots dimensions change to something larger than the specified height and width, disrupting the plot arrangement.
This is reproducible using the autompg dataset:
from bokeh.charts import BoxPlot, output_file, show, hplot
box = BoxPlot(df, values='mpg', label='cyl', title="Auto MPG Box Plot", width=400)
box2 = BoxPlot(df, values='mpg', label='cyl', color='cyl',
title="MPG Box Plot by Cylinder Count", width=400)
output_file('box.html')
show(hplot(box, box2))
I am using the latest (non-dev) version of Bokeh, in the Jupyter notebook.
I think this is a bug, but I wasn’t sure if this was an intentional design?