ethanweed / pythonbook

Python adaptation of Danielle Navarro's Learning Statistics with R (http://learningstatisticswithr.com/). Work in progress!
100 stars 34 forks source link

Fix figure captions #18

Open ethanweed opened 1 year ago

ethanweed commented 1 year ago

The new solution for having figure captions without double-plotting figures seems to be something like:

fig, axes = plt.subplots(1, 2, figsize=(15, 5))

plt.close()

from myst_nb import glue
glue("myfigure-fig", fig, display=False)

I'll probably need to go back and fix all the figures.