Skip to content
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 · 2 comments · Fixed by #6384
Closed

Appending layout regression #6213

bryevdv opened this issue Apr 28, 2017 · 2 comments · Fixed by #6384

Comments

@bryevdv
Copy link
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
Copy link
Member Author

bryevdv commented Jun 1, 2017

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

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants