Example coding page from Jupyter Notebook¶
In [1]:
Copied!
import numpy as np
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.pyplot as plt
Jupyter Notebooks are not supported out-of-the-box, and require the use of the
mkdocs-jupyterextension, which can be found here.
LaTeX-style equations are not supported out of the box, and require this modification and this bodge for Notebooks.
We will plot the equation
$$y = x^2$$
This text in this cell is written in Markdown, and the equation using LaTeX.
In [2]:
Copied!
x = np.arange(0, 100)
y = x**2
x = np.arange(0, 100)
y = x**2
In [3]:
Copied!
fig, ax = plt.subplots()
ax.plot(x, y)
ax.set_xlabel("$x$")
ax.set_ylabel("$y$")
ax.set_title("$y = x^2$")
plt.show()
fig, ax = plt.subplots()
ax.plot(x, y)
ax.set_xlabel("$x$")
ax.set_ylabel("$y$")
ax.set_title("$y = x^2$")
plt.show()