Parente's Mindtrove

Code Hiding on nbviewer

April 08, 2016

When this notebook first loads on nbviewer, all of the input cells are hidden. To reveal them, click the element tag icon in the top right of nbviewer. Click it again to hide them once more.

The last code cell loads a CDN-hosted script to enable the show/hide interactivity. The script encapsulates the recipe from

It's cool, too, that the example remains interactive on nbviewer as well.

In [1]:
%matplotlib inline
In [2]:
from plotly.offline import init_notebook_mode, iplot, iplot_mpl
import matplotlib.pyplot as plt
import numpy as np
In [3]: