Skip to content

Commit 3899747

Browse files
authored
Merge branch 'master' into patch-1
2 parents a90b415 + 1264bca commit 3899747

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+706
-603
lines changed

.pylintrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[MESSAGES CONTROL]
2+
3+
disable=
4+
bad-continuation,
5+
duplicate-code,
6+
fixme,
7+
invalid-name,
8+
locally-disabled,
9+
missing-docstring,
10+
no-member,
11+
too-few-public-methods,
12+
too-many-branches,
13+
too-many-statements,
14+
too-many-arguments,
15+
too-many-locals

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ addons:
3131
- python-tk
3232

3333
before_install:
34-
- pip install pytest pytest-cov
34+
- pip install pytest pytest-cov code_extract pylint
35+
# Make sure to put the readme test at the very end; otherwise it's messing
36+
# around with the other tests.
37+
- code_extract README.md test/zzz_readme_test.py --filter python,test
3538

3639
install:
3740
- pip install -r test_requirements.txt
@@ -48,6 +51,8 @@ before_script:
4851

4952
# run tests
5053
script:
54+
- pylint matplotlib2tikz/
55+
- pylint test/*py
5156
# cd into test directory to make sure we're using the pip-installed
5257
# matplotlib2tikz.
5358
- cd test && MPLBACKEND=Agg pytest --cov matplotlib2tikz

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ default:
1010

1111
README.rst: README.md
1212
pandoc README.md -o README.rst
13+
sed -i 's/python,test/python/g' README.rst
1314
python setup.py check -r -s || exit 1
1415

1516
upload: setup.py README.rst

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# matplotlib2tikz
22

33
[![Build Status](https://travis-ci.org/nschloe/matplotlib2tikz.svg?branch=master)](https://travis-ci.org/nschloe/matplotlib2tikz)
4-
[![Code Health](https://landscape.io/github/nschloe/matplotlib2tikz/master/landscape.png)](https://landscape.io/github/nschloe/matplotlib2tikz/master)
54
[![codecov](https://codecov.io/gh/nschloe/matplotlib2tikz/branch/master/graph/badge.svg)](https://codecov.io/gh/nschloe/matplotlib2tikz)
65
[![Documentation Status](https://readthedocs.org/projects/matplotlib2tikz/badge/?version=latest)](https://readthedocs.org/projects/matplotlib2tikz/?badge=latest)
76
[![PyPi Version](https://img.shields.io/pypi/v/matplotlib2tikz.svg)](https://pypi.python.org/pypi/matplotlib2tikz)
@@ -11,7 +10,7 @@ This is matplotlib2tikz, a Python tool for converting matplotlib figures into
1110
[PGFPlots](https://www.ctan.org/pkg/pgfplots)
1211
([TikZ](https://www.ctan.org/pkg/pgf)) figures like
1312

14-
![](https://nschloe.github.io/matplotlib2tikz/latex3.png)
13+
![](https://nschloe.github.io/matplotlib2tikz/example.png)
1514

1615
for native inclusion into LaTeX documents.
1716

@@ -21,12 +20,12 @@ sits on top of TikZ and describes graphs in terms of axes, data etc.
2120
Consequently, the output of matplotlib2tikz retains more information, can be
2221
more easily understood, and is more easily editable than [raw TikZ output](http://matplotlib.org/users/whats_new.html#pgf-tikz-backend).
2322
For example, the matplotlib figure
24-
```python
25-
from matplotlib import pyplot as plt
26-
from matplotlib import style
23+
```python,test
24+
import matplotlib.pyplot as plt
2725
import numpy as np
28-
fig = plt.figure()
29-
style.use('ggplot')
26+
27+
plt.style.use('ggplot')
28+
3029
t = np.arange(0.0, 2.0, 0.1)
3130
s = np.sin(2*np.pi*t)
3231
s2 = np.cos(2*np.pi*t)
@@ -52,24 +51,25 @@ tikz_save('test.tex')
5251
title={Simple plot $\frac{\alpha}{2}$},
5352
xlabel={time(s)},
5453
ylabel={Voltage (mV)},
55-
xmin=0, xmax=2,
56-
ymin=-1, ymax=1,
54+
xmin=-0.095, xmax=1.995,
55+
ymin=-1.1, ymax=1.1,
5756
tick align=outside,
57+
tick pos=left,
5858
xmajorgrids,
5959
x grid style={white},
6060
ymajorgrids,
6161
y grid style={white},
6262
axis line style={white},
6363
axis background/.style={fill=white!89.803921568627459!black}
6464
]
65-
\addplot [line width=1.64pt, color0, mark=*, mark size=3, mark options={solid,draw=black}]
65+
\addplot [line width=1.64pt, color0, mark=*, mark size=3, mark options={solid}]
6666
table {%
6767
0 0
6868
0.1 0.587785252292473
6969
% [...]
7070
1.9 -0.587785252292473
7171
};
72-
\addplot [line width=1.64pt, color1, mark=*, mark size=3, mark options={solid,draw=black}]
72+
\addplot [line width=1.64pt, color1, mark=*, mark size=3, mark options={solid}]
7373
table {%
7474
0 1
7575
0.1 0.809016994374947

codecov.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
comment: no
2+
# https://github.com/codecov/support/issues/396#issuecomment-300879528
3+
codecov:
4+
disable_default_path_fixes: true
5+
fixes:
6+
- ".*/dist-packages/::"
7+
- ".*/site-packages/::"

matplotlib2tikz/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
__copyright__ = 'Copyright (c) 2010-2017, %s <%s>' % (__author__, __email__)
66
__credits__ = []
77
__license__ = 'License :: OSI Approved :: MIT License'
8-
__version__ = '0.6.7'
8+
__version__ = '0.6.9'
99
__maintainer__ = u'Nico Schlömer'
1010
__status__ = 'Development Status :: 5 - Production/Stable'

matplotlib2tikz/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
'''Script to convert Matplotlib generated figures into TikZ/PGFPlots figures.
44
'''
5+
from __future__ import print_function
56

67
from matplotlib2tikz.__about__ import (
78
__author__,

0 commit comments

Comments
 (0)