Skip to content

Add 3 new styles with color schemes from Tableau [backport to 1.4.x] #3700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
Create plot_tableau20.py
  • Loading branch information
rhiever committed Oct 22, 2014
commit e06bf40b9ba41fa12169eb090d18eb41853dae36
20 changes: 20 additions & 0 deletions examples/style_sheets/plot_tableau20.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
This shows an example of the "tableau10" styling, which
uses Tableau's "Tableau20" color scheme.
"""


from matplotlib import pyplot as plt
import numpy as np

x = np.linspace(0, 10)

with plt.style.context('tableau20'):
plt.plot(x, np.sin(x) + x + np.random.randn(50))
plt.plot(x, np.sin(x) + 0.5 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 2 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 3 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 4 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 5 * x + np.random.randn(50))

plt.show()