Embedded Plots

Spring 2020

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://shimmer.csail.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:


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.