ff7d1bec6d558c4467f29c2b4f5ef9a446f4665b,examples/howto/server_embed/tornado_embed.py,,modify_doc,#Any#,23
Before Change
self.write(template.render(script=script, template="Tornado"))
def modify_doc(doc):
x = np.linspace(0, 10, 1000)
y = np.log(x) * np.sin(x)
source = ColumnDataSource(data=dict(x=x, y=y))
plot = figure(title="Simple plot with slider")
plot.line("x", "y", source=source)
After Change
self.write(template.render(script=script, template="Tornado"))
def modify_doc(doc):
data_url = "http://www.neracoos.org/erddap/tabledap/B01_sbe37_all.csvp?time,temperature&depth=1&temperature_qc=0&time>=2016-02-15&time<=2017-03-22"
df = pd.read_csv(data_url, parse_dates=True, index_col=0)
df = df.rename(columns={"temperature (celsius)": "temperature"})
df.index.name = "time"
source = ColumnDataSource(data=df)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: bokeh/bokeh
Commit Name: ff7d1bec6d558c4467f29c2b4f5ef9a446f4665b
Time: 2017-03-22
Author: jsignell@gmail.com
File Name: examples/howto/server_embed/tornado_embed.py
Class Name:
Method Name: modify_doc
Project Name: has2k1/plotnine
Commit Name: 51696521c68b6a1b9af2e05eee4df944981daf5a
Time: 2014-03-30
Author: has2k1@gmail.com
File Name: ggplot/geoms/geom.py
Class Name: geom
Method Name: plot_layer
Project Name: bokeh/bokeh
Commit Name: ff7d1bec6d558c4467f29c2b4f5ef9a446f4665b
Time: 2017-03-22
Author: jsignell@gmail.com
File Name: examples/howto/server_embed/standalone_embed.py
Class Name:
Method Name: modify_doc