I recently updated from bokeh 0.12.10 to bokeh 1.1.0, adding lines to a plot like below now produces shrinked plots in the canvas
from bokeh.plotting import figure
from bokeh.io import curdoc
from bokeh.layouts import gridplot
from bokeh.models import Button
import numpy as np
main fiure where lines will be plotted
fig = figure()
x = range(10)
def add_line():
new_line = fig.line(x,np.random.random(10)*100,legend=‘line{}’.format(len(fig.renderers)))
button = Button(label=‘test’)
button.on_click(add_line)
grid = gridplot([[button],[fig]],toolbar_location=None)
curdoc().add_root(grid)
``
Here is a screenshot of the output:
Is this a bug? Is there a new way to add new lines with legend in latest versions?