By Tim Hopper: tdhopper.com
Available at pythonplot.com
The site is generated from plots in the Examples.ipynb
Python 3, Jupyter notebook.
You can create a Conda dev environment to run the notebook with make dev_environment
.
Each plot in the notebook is tagged with metadata using Jupyter cell tags. You can view the cell tags in your notebook with View > Cell Toolbar > Tags
.
The tags look like this:
ex
name:scatter-with-regression
package:ggplot
If you are using Jupyter lab, these are available through the Cell Tools
left sidebar menu:
{
"tags": [
"ex",
"name:scatter-with-regression",
"package:ggplot"
]
}
ex
identifies the cell as an example. The name
tag corresponds to an item in the names
dictionary in render.py
. The package
tag corresponds to a package in the packages
dict in render.py
.
The site layout current allows for ~46 characters in the code window. Please keep this in mind and wrap your code to avoid too much side scrolling.
At the moment, the code must return a png image into the output cell. To generate image files with plotly
, using their server is currently the only way. Please see the getting started page for instructions on the .credentials
file.
A Markdown comment can be added within triple quotes on the first line of the cell. (This currently doesn't work for R
cells.)
You can render the images to web/img/plots
by running $ make
. Afterward, launch a local server (e.g. python -m http.server
) from the web
directory.