What does the "srouce=" parameter does?

For example in this simple example:

df = pd.DataFrame(from_some_dict)
tmp = ColumnDataSource(df)
p = figure()
p.scatter(df[‘datetime’], df[‘val’], source=tmp)
show(p)

``

I couldn’t figure out where to find the related documentation :frowning:

you would either do:

p.scatter(‘datetime’, ‘val’, source=tmp)

or

p.scatter(df[‘datetime’], df[‘val’])

the reason you would use source explicitly is to do something like this:

p = figure()

p.scatter(‘datetime’, ‘val1’, source=tmp)

p2 = figure()

p2.scatter(‘datetime’, ‘val2’, source=tmp)

show(VBox(children=[p, p2])

If you do this, then p1/p2 are connected (linked brushing)

···

On Fri, Feb 27, 2015 at 8:52 AM, Dror Atariah [email protected] wrote:

For example in this simple example:

df = pd.DataFrame(from_some_dict)
tmp = ColumnDataSource(df)
p = figure()
p.scatter(df[‘datetime’], df[‘val’], source=tmp)
show(p)

``

I couldn’t figure out where to find the related documentation :frowning:

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/5959738b-db90-49c9-adb0-d6af5dd53eb5%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.