Plot becomes unresponsive when button widget is appended to layout
See original GitHub issueHi,
I have a problem when appending Button widgets to a VBox in a nested layout.
Python: 2.7.12 64-bit Bokeh Version: 0.12.4 Browser: Chrome & Edge OS: Windows 10
The below code reproduces the problem. When the add button is pressed the new Button widget is displayed, however the plot figure stops updating or responding. A small graphics glitch also occurs on the title of the plot. No console or browser errors are reported.
import numpy as np
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
# Set up data
x = np.linspace(0, 4*np.pi, 200)
y = np.sin(x)
source = ColumnDataSource(data=dict(x=x, y=y))
# Set up plot
plot = figure()
plot.line('x', 'y', source=source)
# Problem Code:
from bokeh.models.widgets import Button
from bokeh.models.layouts import VBox
button = Button(label="Add")
vbox = VBox(children=[button])
def create_button():
button = Button(label=str(len(vbox.children)))
vbox.children.append(button)
button.on_click(create_button)
curdoc().add_root(row(vbox, plot))
curdoc().title = "Sliders"
Thanks in advance for any help on this.
Regards, Simon
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Matplotlib widget button unresponsive after first click and call ...
I am setting up a class that creates a simple XY plot of a line with some markers (X,Y). The idea is to...
Read more >Common Flutter errors
Introduction. This page explains several frequently-encountered Flutter framework errors and gives suggestions on how to resolve them.
Read more >Multithreading PyQt5 applications with QThreadPool
To your user the application will appear to be unresponsive ... the button the counter stops ticking and your application freezes entirely.
Read more >How to Build a Python GUI Application With wxPython
In this step-by-step tutorial, you'll learn how to create a cross-platform graphical user interface (GUI) using Python and the wxPython toolkit.
Read more >Fixed issues in InDesign - Adobe Support
InDesign hangs due to issues with long footnotes. ... The widget to change Variable Fonts design axes gets disabled on opening the Font...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding to
0.12.6
as part of overall layout effortClosing, since the “unresponsinve” part has been fixed in recent work.