Skip to content

Commit

Permalink
black style for README snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
nschloe committed Jun 9, 2018
1 parent 7404b39 commit f29d5b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -29,7 +29,7 @@ jobs:
- run: pip3 install .[all]
- run: pip3 check
# format and lint
- run: black --check setup.py matplotlib2tikz/ test/*.py
- run: LC_ALL=C.UTF-8 black --check setup.py matplotlib2tikz/ test/*.py
- run: flake8 setup.py matplotlib2tikz/ test/*.py
# The actual test
- run: cd test/ && MPLBACKEND=Agg pytest --cov matplotlib2tikz
Expand Down
19 changes: 10 additions & 9 deletions README.md
Expand Up @@ -30,20 +30,21 @@ For example, the matplotlib figure
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('ggplot')
plt.style.use("ggplot")
t = np.arange(0.0, 2.0, 0.1)
s = np.sin(2*np.pi*t)
s2 = np.cos(2*np.pi*t)
plt.plot(t, s, 'o-', lw=4.1)
plt.plot(t, s2, 'o-', lw=4.1)
plt.xlabel('time (s)')
plt.ylabel('Voltage (mV)')
plt.title('Simple plot $\\frac{\\alpha}{2}$')
s = np.sin(2 * np.pi * t)
s2 = np.cos(2 * np.pi * t)
plt.plot(t, s, "o-", lw=4.1)
plt.plot(t, s2, "o-", lw=4.1)
plt.xlabel("time (s)")
plt.ylabel("Voltage (mV)")
plt.title("Simple plot $\\frac{\\alpha}{2}$")
plt.grid(True)
from matplotlib2tikz import save as tikz_save
tikz_save('test.tex')
tikz_save("test.tex")
```
(see above) gives
```latex
Expand Down

0 comments on commit f29d5b7

Please sign in to comment.