8000 DOC MEP12: pie/polar and color examples + style sheets fix by naoyak · Pull Request #7900 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter 8000

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix style sheet examples
  • Loading branch information
naoyak committed Jan 21, 2017
commit eecad0e931e4524603b40f94757ea589af19d277
1 change: 0 additions & 1 deletion examples/style_sheets/plot_bmh.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
def plot_beta_hist(ax, a, b):
ax.hist(beta(a, b, size=10000), histtype="stepfilled",
bins=25, alpha=0.8, normed=True)
return ax


fig, ax = plt.subplots()
Expand Down
17 changes: 9 additions & 8 deletions examples/style_sheets/plot_fivethirtyeight.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@
from matplotlib import pyplot as plt
import numpy as np

plt.style.use('fivethirtyeight')

x = np.linspace(0, 10)

# Fixing random state for reproducibility
np.random.seed(19680801)

fig, ax = plt.subplots()

with plt.style.context('fivethirtyeight'):
ax.plot(x, np.sin(x) + x + np.random.randn(50))
ax.plot(x, np.sin(x) + 0.5 * x + np.random.randn(50))
ax.plot(x, np.sin(x) + 2 * x + np.random.randn(50))
ax.plot(x, np.sin(x) - 0.5 * x + np.random.randn(50))
ax.plot(x, np.sin(x) - 2 * x + np.random.randn(50))
ax.plot(x, np.sin(x) + np.random.randn(50))
ax.set_title("'fivethirtyeight' style sheet")
ax.plot(x, np.sin(x) + x + np.random.randn(50))
ax.plot(x, np.sin(x) + 0.5 * x + np.random.randn(50))
ax.plot(x, np.sin(x) + 2 * x + np.random.randn(50))
ax.plot(x, np.sin(x) - 0.5 * x + np.random.randn(50))
ax.plot(x, np.sin(x) - 2 * x + np.random.randn(50))
ax.plot(x, np.sin(x) + np.random.randn(50))
ax.set_title("'fivethirtyeight' style sheet")


plt.show()
0