On Jul 24, 2017, at 23:28, leela vathi <leelamails4u@gmail.com> wrote:
hi
you peoples are know very much about python can you tell how to read external text file in python or anaconda i am using codes but i didn't any result tell me solution as early as possible.
Thanking you,
On Tue, Jul 25, 2017 at 8:12 AM, Sébastien Roche <sebastienroche11@gmail.com> wrote:
You can write a callback for the ColumnDataSource that you use to plot your data like below.
from bokeh.io import show
from bokeh.models import ColumnDataSource, CustomJS, Div
from bokeh.layouts import gridplot
from bokeh.plotting import figure
TOOLS = 'tap'
fig = figure(tools=TOOLS)
source = ColumnDataSource(data={'x':range(10),'y':range(10)})
fig.scatter(x='x',y='y',size=20,source=source)
txt = Div(text='Text will be updated with current time anytime anything happens to the ColumnDataSource')
source_code = """
var time = new Date()
txt.text = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds();
"""
source.callback = CustomJS(args={'txt':txt},code=source_code)
grid = gridplot([[fig,txt]],toolbar_location=None)
show(grid)
Here the text is updated anytime something happens to the data (it can only be clicked on in the example), but you could have it updated under certain conditions only.
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/58041e8b-6708-4bdc-a326-798ae8cb435d%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAA0r%2BooYu-QQJ_ucVkyr__voMWb9WNZv7vBTn5BALjZF6AM36Q%40mail.gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.