@@ -21,7 +21,7 @@ The output of matplotlib2tikz is in
21
21
[ PGFPlots] ( http://pgfplots.sourceforge.net/pgfplots.pdf ) , a LaTeX library that
22
22
sits on top of TikZ and describes graphs in terms of axes, data etc.
23
23
Consequently, the output of matplotlib2tikz retains more information, can be
24
- more easily understood, and is more easily editable than [ raw TikZ output] ( http ://matplotlib.org/users/whats_new.html#pgf-tikz-backend) .
24
+ more easily understood, and is more easily editable than [ raw TikZ output] ( https ://matplotlib.org/users/whats_new.html#pgf-tikz-backend) .
25
25
For example, the matplotlib figure
26
26
``` python,test
27
27
import matplotlib.pyplot as plt
@@ -34,7 +34,7 @@ s = np.sin(2*np.pi*t)
34
34
s2 = np.cos(2*np.pi*t)
35
35
plt.plot(t, s, 'o-', lw=4.1)
36
36
plt.plot(t, s2, 'o-', lw=4.1)
37
- plt.xlabel('time(s)')
37
+ plt.xlabel('time (s)')
38
38
plt.ylabel('Voltage (mV)')
39
39
plt.title('Simple plot $\\frac{\\alpha}{2}$')
40
40
plt.grid(True)
@@ -52,7 +52,7 @@ tikz_save('test.tex')
52
52
53
53
\begin{axis}[
54
54
title={Simple plot $\frac{\alpha}{2}$},
55
- xlabel={time(s)},
55
+ xlabel={time (s)},
56
56
ylabel={Voltage (mV)},
57
57
xmin=-0.095, xmax=1.995,
58
58
ymin=-1.1, ymax=1.1,
@@ -105,7 +105,7 @@ to install/update.
105
105
106
106
2 . Instead of ` pyplot.show() ` , invoke matplotlib2tikz by
107
107
``` python
108
- tikz_save(' mytikz.tex' );
108
+ tikz_save(' mytikz.tex' )
109
109
```
110
110
to store the TikZ file as `mytikz.tex` . Load the library with :
111
111
```python
@@ -124,8 +124,8 @@ to install/update.
124
124
```python
125
125
tikz_save(
126
126
' mytikz.tex' ,
127
- figureheight = ' \\ figureheight' ,
128
- figurewidth = ' \\ figurewidth'
127
+ figureheight = ' \\ figureheight' ,
128
+ figurewidth = ' \\ figurewidth'
129
129
)
130
130
```
131
131
and in the LaTeX source
@@ -181,7 +181,7 @@ pytest
181
181
```
182
182
183
183
The final pHash may depend on any of the tools used during the process. For
184
- example, if your version of [Pillow](https:// pypi.python.org/ pypi/ Pillow/ 3.0 .0)
184
+ example, if your version of [Pillow](https:// pypi.python.org/ pypi/ Pillow/ 4.3 .0)
185
185
is too old, the pHash function might operate slightly differently and produce a
186
186
slightly different pHash, resulting in a failing test. If tests are failing on
187
187
your local machine, you should first make sure to have an up- to- date Pillow.
0 commit comments