Skip to content

Instantly share code, notes, and snippets.

@hashABCD
Created March 25, 2021 10:42
Show Gist options
  • Save hashABCD/93a2a45f4dc48f0f5ebfdc610633678e to your computer and use it in GitHub Desktop.
Save hashABCD/93a2a45f4dc48f0f5ebfdc610633678e to your computer and use it in GitHub Desktop.
matplotlib_style_iterator
import matplotlib.pyplot as plt
a=[1,2,3,4]
b=[4,8,7,3]
def plotter(s):
plt.figure()
plt.style.use(s)
plt.plot(a,b)
plt.title(s)
plt.show()
styles=plt.style.available
for s in styles:
plotter(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment