Embedded Plots

Spring 2019

You are not logged in.

If you are a current student, please Log In for full access to the web site.
Note that this link will take you to an external site (https://oidc.mit.edu) to authenticate, and then you will be redirected back to this page.

The link below is a file that generates a web-compatible plot (with some embedded features) from Python using the Bokeh Plotting Package:

http://iesc-s1.mit.edu/608dev/sandbox/mike1997/plot_example.py

This was generated from the following code place on the server, which is just one of the standard bokeh examples they have on their site, except instead of just rendering it locally we use the components functionality to generate the necessary html and javascript in order to place it into a boilerplate piece of html and return the entire string to be rendered in your browser:

Code: plot_example.py.

You can do a ton of stuff with Bokeh. The server is current running version 0.12.13 I believe, so just keep that in mind, but most of what you can see online on their site and around the web is possible.



This page was last updated on Friday April 12, 2019 at 07:53:07 AM (revision a4e5397).
 
Course Site powered by CAT-SOOP 14.0.4.dev5.
CAT-SOOP is free/libre software, available under the terms
of the GNU Affero General Public License, version 3.
(Download Source Code)
CSS/stryling from the Outboxcraft library Beauter, licensed under MIT
Copyright 2017