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

Add a method to "reset" a figure #5071

Closed
swevrywhere opened this Issue Sep 1, 2016 · 8 comments

Comments

Projects
None yet
10 participants
@swevrywhere

swevrywhere commented Sep 1, 2016

I want the ability to reset a figure via code in the same way as the figure reset tool.

I asked a related question on Stack Overflow, and it was recommended that I open an issue to track the request.

http://stackoverflow.com/questions/39278110/whats-the-command-to-reset-a-bokeh-plot

@birdsarah birdsarah added this to the short-term milestone Sep 2, 2016

@markjay4k

This comment has been minimized.

markjay4k commented Jun 27, 2017

I would like the same.

Looking for a way to easily clear a bokeh figure

@ross8711

This comment has been minimized.

ross8711 commented Jul 14, 2017

I also would need way of doing this.

@uweschmitt

This comment has been minimized.

uweschmitt commented Jul 24, 2017

Would also need this.

@nanodan

This comment has been minimized.

nanodan commented Oct 19, 2017

Also need this.

@pchavanne

This comment has been minimized.

pchavanne commented Dec 12, 2017

Would need this too.

@Milly

This comment has been minimized.

Milly commented Dec 13, 2017

Need this.

@malewick

This comment has been minimized.

malewick commented Feb 12, 2018

Would also need this.

@bryevdv bryevdv modified the milestones: 0.12.x, 0.12.16 Mar 17, 2018

@bryevdv bryevdv referenced this issue Apr 5, 2018

Merged

add reset signal to plots #7757

1 of 1 task complete
@bryevdv

This comment has been minimized.

Member

bryevdv commented Apr 5, 2018

After #7757 is merged, this will work:

from bokeh.io import show
from bokeh.layouts import column
from bokeh.models import Button, CustomJS
from bokeh.plotting import figure

p = figure(tools="reset,pan,wheel_zoom,lasso_select")
p.circle(list(range(10)), list(range(10)))

b = Button()
b.js_on_click(CustomJS(args=dict(p=p), code="""
    p.reset.emit()
"""))

show(column(p, b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment