Skip to content

Commit 5e55b7a

Browse files
committed
more make clean
1 parent 95ff705 commit 5e55b7a

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ publish: tag upload
1818

1919
clean:
2020
@find . | grep -E "(__pycache__|\.pyc|\.pyo$\)" | xargs rm -rf
21-
@rm -rf *.egg-info/ build/ dist/ MANIFEST
21+
@rm -rf src/*.egg-info/ build/ dist/ MANIFEST .tox/ .cache/ .pytest_cache/
2222

2323
format:
2424
isort .
2525
black .
26+
blacken-docs README.md
2627

2728
lint:
2829
black --check .

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ to install.
125125
2. Instead of `pyplot.show()`, invoke tikzplotlib by
126126
```python
127127
import tikzplotlib
128+
128129
tikzplotlib.save("mytikz.tex")
129130
# or
130131
tikzplotlib.save("mytikz.tex", flavor="context")
@@ -160,6 +161,7 @@ to install.
160161
You can also get the code via:
161162
```python
162163
import tikzplotlib
164+
163165
tikzplotlib.Flavors.latex.preamble()
164166
# or
165167
tikzplotlib.Flavors.context.preamble()
@@ -170,9 +172,10 @@ to install.
170172
import matplotlib.pyplot as plt
171173
import numpy as np
172174

173-
#... do your plotting
175+
# ... do your plotting
174176

175177
import tikzplotlib
178+
176179
tikzplotlib.clean_figure()
177180
tikzplotlib.save("test.tex")
178181
```

src/tikzplotlib/_cleanfigure.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,25 +439,25 @@ def _update_line_data(linehandle, data):
439439

440440

441441
def _split_data_2D(data):
442-
""" data --> xData, yData """
442+
"""data --> xData, yData"""
443443
xData, yData = np.split(data, 2, axis=1)
444444
return xData.reshape((-1,)), yData.reshape((-1,))
445445

446446

447447
def _stack_data_2D(xData, yData):
448-
""" xData, yData --> data """
448+
"""xData, yData --> data"""
449449
data = np.stack([xData, yData], axis=1)
450450
return data
451451

452452

453453
def _split_data_3D(data):
454-
""" data --> xData, yData, zData """
454+
"""data --> xData, yData, zData"""
455455
xData, yData, zData = np.split(data, 3, axis=1)
456456
return xData.reshape((-1,)), yData.reshape((-1,)), zData.reshape((-1,))
457457

458458

459459
def _stack_data_3D(xData, yData, zData):
460-
""" xData, yData, zData --> data """
460+
"""xData, yData, zData --> data"""
461461
data = np.stack([xData, yData, zData], axis=1)
462462
return data
463463

@@ -653,7 +653,7 @@ def _isempty(array):
653653

654654

655655
def _line_has_lines(linehandle):
656-
""" check if linestyle is not None and linewidth is larger than 0 """
656+
"""check if linestyle is not None and linewidth is larger than 0"""
657657
hasLines = (linehandle.get_linestyle() is not None) and (
658658
linehandle.get_linewidth() > 0.0
659659
)

src/tikzplotlib/_hatches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def add_custom_pattern(mpl_hatch, pattern_name, pattern_definition=None):
6060

6161

6262
def __validate_hatch(hatch):
63-
""" Warn about the shortcomings of patterns """
63+
"""Warn about the shortcomings of patterns"""
6464
if len(hatch) > 1:
6565
warnings.warn(
6666
f"tikzplotlib: Hatch '{hatch}' cannot be rendered. "

src/tikzplotlib/_patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _is_in_legend(obj):
5050

5151

5252
def _patch_legend(obj, draw_options, legend_type):
53-
""" Decorator for handling legend of mpl.Patch """
53+
"""Decorator for handling legend of mpl.Patch"""
5454
legend = ""
5555
if _is_in_legend(obj):
5656
# Unfortunately, patch legend entries need \addlegendimage in Pgfplots.

src/tikzplotlib/_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def _transform_positioning(ha, va):
143143

144144

145145
def _parse_annotation_coords(ff, coords, xy):
146-
""" Convert a coordinate name and xy into a tikz coordinate string """
146+
"""Convert a coordinate name and xy into a tikz coordinate string"""
147147
# todo: add support for all the missing ones
148148
if coords == "data":
149149
x, y = xy

tests/test_custom_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def draw(self, renderer):
3838

3939

4040
def rot(theta):
41-
""" Get a stack of rotation matrices """
41+
"""Get a stack of rotation matrices"""
4242
return np.stack(
4343
[
4444
np.stack([np.cos(theta), -np.sin(theta)], axis=-1),

0 commit comments

Comments
 (0)