On May 7, 2018, at 09:00, [email protected] wrote:
Hi,
I tried this proposed solution (the code below). It does display the slider and the plot. However, there seems to be no link between the slider and the plot in that the doesn't update when I move the slider. Your advice is much appreciated.
Best,
Kata
On Monday, November 6, 2017 at 10:34:58 AM UTC-8, fabien genty wrote:
Hi,
Tanks you .Here is the solution :
instead of vform you can use column --> from bokeh.layouts import column
Here is an update example from bokeh tutorial
from bokeh.layouts import *
from bokeh.models import CustomJS, ColumnDataSource, Slider
from bokeh.plotting import figure, output_file, show
from bokeh.models.sources import ColumnDataSource
from bokeh.models.widgets import Button, DataTable, TableColumn
from bokeh.layouts import layout, widgetbox, column, row
output_file("callback.html")
x = [x*0.005 for x in range(0, 200)]
y = x
source = ColumnDataSource(data=dict(x=x, y=y))
plot = figure(plot_width=400, plot_height=400)
plot.line('x', 'y', source=source, line_width=3, line_alpha=0.6)
callback = CustomJS(args=dict(source=source), code="""
var data = source.get('data');
var f = cb_obj.get('value')
x = data['x']
y = data['y']
for (i = 0; i < x.length; i++) {
y[i] = Math.pow(x[i], f)
}
source.trigger('change');
""")
slider = Slider(start=0.1, end=4, value=1, step=.1, title="power", callback=callback)
layout = column(slider, plot)
show(layout)
2017-11-06 18:37 GMT+01:00 Bryan Van de ven <[email protected]>:
Hi,
You probably want "widgetbox" or "column" from bokeh.layouts
Thanks,
Bryan
> On Nov 6, 2017, at 11:25, fabien genty <[email protected]> wrote:
>
> Thanks you so much for your quick answer
>
> sincerly
>
> Fabien
>
>
>
> 2017-11-06 18:24 GMT+01:00 Eugene Pakhomov <[email protected]>:
> Hi,
>
> vform was deprecated and eventually removed: https://github.com/bokeh/bokeh/blob/342d55cf41579e3e551e204198d6a3ec39751315/sphinx/source/docs/releases/0.12.5.rst#deprecations-removed
> I'm not sure what it's function was. You should check the most recent Bokeh's documents.
>
> Regards,
> Eugene
>
>
> On Tuesday, November 7, 2017 at 12:20:10 AM UTC+7, fabien genty wrote:
> Hi guys
>
> I need the fonction vform to do some interactive plotting but i get this error:
>
> ImportError Traceback (most recent call last)
> <ipython-input-14-1aff037f3beb> in <module>()
> ----> 1 from bokeh.io import vform
>
> ImportError: cannot import name 'vform'
>
>
> I don't find any answer .So please if someone have the solution
>
>
> Sincerly
>
>
>
> --
> 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+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/8c00b9a6-cef0-4649-8028-0f66a0fade7f%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+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAGP1qPF5ERULFVc%3DatJYi5%2BfL_kwSvW1AVPui6cu7RXtktF9fA%40mail.gmail.com\.
> 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+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/494818F3-4D18-4071-A42B-A5C793FE71FF%40anaconda.com\.
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e8110042-015a-4b51-8aaa-1734f324a3b3%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.