Skip to content

Commit 2b54b87

Browse files
committed
add externals_search_path
1 parent e95b502 commit 2b54b87

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/tikzplotlib/_line2d.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ def _table(obj, data): # noqa: C901
267267
# don't want the \n in the table definition, just in the data (below)
268268
opts.append("row sep=" + data["table_row_sep"].strip())
269269

270+
if data["externals search path"] is not None:
271+
esp = data["externals search path"]
272+
opts.append(f"search path={{{esp}}}")
273+
270274
if len(opts) > 0:
271275
opts_str = ",".join(opts)
272276
content.append(f"table [{opts_str}] {{")

src/tikzplotlib/_save.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def get_tikz_code(
2424
tex_relative_path_to_data: Optional[str] = None,
2525
externalize_tables: bool = False,
2626
override_externals: bool = False,
27+
externals_search_path: Optional[str] = None,
2728
strict: bool = False,
2829
wrap: bool = True,
2930
add_axis_environment: bool = True,
@@ -153,6 +154,7 @@ def get_tikz_code(
153154
data["rel data path"] = tex_relative_path_to_data
154155
data["externalize tables"] = externalize_tables
155156
data["override externals"] = override_externals
157+
data["externals search path"] = externals_search_path
156158

157159
if filepath:
158160
filepath = pathlib.Path(filepath)

0 commit comments

Comments
 (0)