From charlesreid1

 
(12 intermediate revisions by the same user not shown)
Line 5: Line 5:
[[Image:JupyterBase16_Before.png|500px]]
[[Image:JupyterBase16_Before.png|500px]]


==Installing==
==Installing Base16 Jupyter==


Clone repo here: https://github.com/nsonnad/base16-ipython-notebook
Clone repo, and also clone submodules:


Start by creating a custom profile in ipython:
<pre>
git clone https://github.com/charlesreid1/base16-jupyter
</pre>
 
Create a Jupyter config directory in the default location and start a notebook server:


<pre>
<pre>
ipython profile create bespin
jupyter notebook --generate-config
jupyter notebook
</pre>
</pre>


Now locate the directory containing files for that custom profile:
Create a Jupyter config directory in a custom location and start a notebook server with that configuration:


<pre>
<pre>
ipython locate profile bespin
JUPYTER_CONFIG_DIR=~/jupyter_custom jupyter notebook --generate-config
JUPYTER_CONFIG_DIR=~/jupyter_custom jupyter notebook
</pre>
</pre>


Or skip straight to it:
Custom CSS should go in <code>custom/custom.css</code>:


<pre>
<pre>
mkdir -p `ipython locate profile bespin`/static/custom/
mkdir $JUPYTER_CONFIG_DIR/custom
</pre>
</pre>


once per profile, then:
Then copy any of the CSS files into this directory:


<pre>
<pre>
wget -O `ipython locate profile bespin`/static/custom/custom.css \
cd base16-jupyter/
https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/ipython-3/output/base16-bespin-dark.css
cp colors/base16-bespin-dark.css $JUPYTER_CONFIG_DIR/custom/.
</pre>
</pre>
It should look like this:
[[Image:JupyterBase16_after.png|500px]]
==Installing Base16 IPython Matplotlib==
To get this looking even better, we need the matplotlib plots to have a style that matches the notebook theme. We can do this using the Base16-IPython-Matplotlib repository.
Guide: [[Jupyter/Base16mpl]]
End product:
[[Image:JupyterBase16_after_after.png|500px]]
[[Image:JupyterBase16_after_after2.png|500px]]
[[Category:Jupyter]]

Latest revision as of 13:19, 2 December 2017

Applying Base16 themes to ipython notebook via https://github.com/nsonnad/base16-ipython-notebook

Before

JupyterBase16 Before.png

Installing Base16 Jupyter

Clone repo, and also clone submodules:

git clone https://github.com/charlesreid1/base16-jupyter

Create a Jupyter config directory in the default location and start a notebook server:

jupyter notebook --generate-config
jupyter notebook

Create a Jupyter config directory in a custom location and start a notebook server with that configuration:

JUPYTER_CONFIG_DIR=~/jupyter_custom jupyter notebook --generate-config
JUPYTER_CONFIG_DIR=~/jupyter_custom jupyter notebook

Custom CSS should go in custom/custom.css:

mkdir $JUPYTER_CONFIG_DIR/custom

Then copy any of the CSS files into this directory:

cd base16-jupyter/
cp colors/base16-bespin-dark.css $JUPYTER_CONFIG_DIR/custom/.

It should look like this:

JupyterBase16 after.png

Installing Base16 IPython Matplotlib

To get this looking even better, we need the matplotlib plots to have a style that matches the notebook theme. We can do this using the Base16-IPython-Matplotlib repository.

Guide: Jupyter/Base16mpl

End product:

JupyterBase16 after after.png

JupyterBase16 after after2.png