Skip to content

Commit fe5dcf5

Browse files
authored
Merge pull request #533 from nschloe/posix-fix
posix fix
2 parents 1e30229 + 51b36dd commit fe5dcf5

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1173089.svg?style=flat-square)](https://doi.org/10.5281/zenodo.1173089)
1010
[![GitHub stars](https://img.shields.io/github/stars/nschloe/tikzplotlib.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/tikzplotlib)
1111
[![Downloads](https://pepy.tech/badge/tikzplotlib/month?style=flat-square)](https://pepy.tech/project/tikzplotlib)
12+
1213
<!--[![PyPi downloads](https://img.shields.io/pypi/dm/tikzplotlib.svg?style=flat-square)](https://pypistats.org/packages/tikzplotlib)-->
1314

1415
[![Documentation Status](https://readthedocs.org/projects/tikzplotlib/badge/?version=latest&style=flat-square)](https://readthedocs.org/projects/tikzplotlib/?badge=latest)
@@ -31,9 +32,9 @@ The output of tikzplotlib is in [PGFPlots](https://github.com/pgf-tikz/pgfplots/
3132
library that sits on top of [PGF/TikZ](https://en.wikipedia.org/wiki/PGF/TikZ) and
3233
describes graphs in terms of axes, data etc. Consequently, the output of tikzplotlib
3334

34-
- retains more information,
35-
- can be more easily understood, and
36-
- is more easily editable
35+
- retains more information,
36+
- can be more easily understood, and
37+
- is more easily editable
3738

3839
than [raw TikZ output](https://matplotlib.org/users/whats_new.html#pgf-tikz-backend).
3940
For example, the matplotlib figure

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = tikzplotlib
3-
version = 0.9.16
3+
version = 0.9.17
44
author = Nico Schlömer
55
author_email = [email protected]
66
description = Convert matplotlib figures into TikZ/PGFPlots

src/tikzplotlib/_line2d.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,9 @@ def _table(obj, data): # noqa: C901
288288
esp = data["externals search path"]
289289
opts.append(f"search path={{{esp}}}")
290290

291-
if len(opts) > 0:
292-
opts_str = ",".join(opts)
293-
content.append(f"table [{opts_str}] {{{rel_filepath}}};\n")
294-
else:
295-
content.append(f"table {{{rel_filepath}}};\n")
291+
opts_str = ("[" + ",".join(opts) + "] ") if len(opts) > 0 else ""
292+
posix_filepath = rel_filepath.as_posix()
293+
content.append(f"table {{opts_string}}{{{posix_filepath}}};\n")
296294
else:
297295
if len(opts) > 0:
298296
opts_str = ",".join(opts)

0 commit comments

Comments
 (0)