I sometimes made charts for fun. While most of them were built with some Python scripts and Jupyer notebooks, I usually just export the PNG images from the notebooks. However this “method” ignores what Jupyter is desinged for: making a notebook which is executable.
import matplotlib import numpy as np import matplotlib.pyplot as plt
# It doesn't work nicely since images in Markdown don't have width/height # https://github.com/jupyter/nbconvert/blob/master/nbconvert/exporters/tests/test_markdown.py # %config InlineBackend.figure_format = 'retina'
x = np.linspace(0, 3*np.pi, 500) plt.plot(x, np.sin(x**2))
[<matplotlib.lines.Line2D at 0x1181f68d0>]