Skip to content

Commit 607924b

Browse files
committed
remove six dependency
1 parent 1c4a50c commit 607924b

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def read(fname):
2121
url="https://github.com/nschloe/tikzplotlib",
2222
author=about["__author__"],
2323
author_email=about["__email__"],
24-
install_requires=["matplotlib >= 1.4.0", "numpy", "Pillow", "six"],
24+
install_requires=["matplotlib >= 1.4.0", "numpy", "Pillow"],
2525
description="Convert matplotlib figures into TikZ/PGFPlots",
2626
long_description=read("README.md"),
2727
long_description_content_type="text/markdown",

tikzplotlib/line2d.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import datetime
22

33
import numpy
4-
import six
54
from matplotlib.dates import num2date
65

76
from . import color as mycol
@@ -213,7 +212,7 @@ def _marker(
213212
if extra_mark_options:
214213
mark_options.append(extra_mark_options)
215214
if marker_face_color is None or (
216-
isinstance(marker_face_color, six.string_types) and marker_face_color == "none"
215+
isinstance(marker_face_color, str) and marker_face_color == "none"
217216
):
218217
mark_options.append("fill opacity=0")
219218
else:

tikzplotlib/save.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import matplotlib as mpl
77
import matplotlib.pyplot as plt
8-
import six
98

109
from . import axes
1110
from . import image as img
@@ -257,11 +256,7 @@ def save(filepath, *args, encoding=None, **kwargs):
257256
"""
258257
code = get_tikz_code(*args, filepath=filepath, **kwargs)
259258
file_handle = codecs.open(filepath, "w", encoding)
260-
try:
261-
file_handle.write(code)
262-
except UnicodeEncodeError:
263-
# We're probably using Python 2, so treat unicode explicitly
264-
file_handle.write(six.text_type(code).encode("utf-8"))
259+
file_handle.write(code)
265260
file_handle.close()
266261
return
267262

0 commit comments

Comments
 (0)