Skip to content

Instantly share code, notes, and snippets.

@gillespilon
Last active August 24, 2023 21:21
Show Gist options
  • Save gillespilon/d8969901c68da8906e3c5a7eaf5b1546 to your computer and use it in GitHub Desktop.
Save gillespilon/d8969901c68da8906e3c5a7eaf5b1546 to your computer and use it in GitHub Desktop.
Ensure inline graphs display in Jupyter Notebook using the matplotlib library.
# Add these lines after importing other modules
import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format='svg'
# Put all of your graph code in one cell
# The last line of the cell displays the graph.
plt.show
# reference https://matplotlib.org/faq/usage_faq.html#what-is-a-backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment