New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appending layout regression #6213

Closed
bryevdv opened this Issue Apr 28, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@bryevdv
Member

bryevdv commented Apr 28, 2017

@mattpap not sure if this is covered by other issues but I am making a new one specifically because it is a regression. This code works in 0.12.5 and 0.12.4 (plots are added below) but does not work in master (plots stack on top of each other)

from tornado.ioloop import IOLoop
import numpy as np

from bokeh.application.handlers import FunctionHandler
from bokeh.application import Application
from bokeh.plotting import figure
from bokeh.server.server import Server
from bokeh.models.layouts import VBox

io_loop = IOLoop.current()
layout = VBox()


def modify_doc(doc):
    doc.add_root(layout)
    doc.add_periodic_callback(add_plot, 3000)


def add_plot():
    print("add plot")
    x = np.linspace(0, 4 * np.pi, 1000)
    y = np.sin(x)
    plot2 = figure(y_range=(-1.2, 1.2), plot_width=300, plot_height=300)
    plot2.line(x, y, line_width=2, legend="x")
    layout.children.append(plot2)

bokeh_app = Application(FunctionHandler(modify_doc))
server = Server({'/': bokeh_app}, io_loop=io_loop)
server.start()


if __name__ == '__main__':
    print('Opening Bokeh application on http://localhost:5006/')
    io_loop.add_callback(server.show, "/")
    io_loop.start()
@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jun 1, 2017

Member

Just confirming that this is not fixed by any work up to 0.12.6dev7

Member

bryevdv commented Jun 1, 2017

Just confirming that this is not fixed by any work up to 0.12.6dev7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment