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
In https://bokeh.github.io/blog/2017/6/29/simple_bokeh_server/ we discuss making a simple bokeh server from within Python.
from bokeh.server.server import Server from bokeh.application import Application from bokeh.application.handlers.function import FunctionHandler from bokeh.plotting import figure, ColumnDataSource def make_document(doc): fig = figure(title='Line plot!', sizing_mode='scale_width') fig.line(x=[1, 2, 3], y=[1, 4, 9]) doc.title = "Hello, world!" doc.add_root(fig) apps = {'/': Application(FunctionHandler(make_document))} server = Server(apps, port=5000) server.start()
It might be worth thinking about how to reduce the amount of code, and in particular the number of foreign terms that a beginning user needs to understand to make this work. In my ideal world the following might work:
from bokeh.plotting import figure, ColumnDataSource, Server def make_document(doc): fig = figure(title='Line plot!', sizing_mode='scale_width') fig.line(x=[1, 2, 3], y=[1, 4, 9]) doc.title = "Hello, world!" doc.add_root(fig) apps = {'/': make_document} server = Server(apps, port=5000) server.start()
The text was updated successfully, but these errors were encountered:
closed by #7077
Successfully merging a pull request may close this issue.
In https://bokeh.github.io/blog/2017/6/29/simple_bokeh_server/ we discuss making a simple bokeh server from within Python.
It might be worth thinking about how to reduce the amount of code, and in particular the number of foreign terms that a beginning user needs to understand to make this work. In my ideal world the following might work:
The text was updated successfully, but these errors were encountered: