Skip to content

Commit 84ecab5

Browse files
committed
Renamed width and style to lw and ls. Added docstring
1 parent ed21e95 commit 84ecab5

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

tikzplotlib/_path.py

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,19 @@ def draw_pathcollection(data, obj):
233233
return data, content
234234

235235

236-
def get_draw_options(data, obj, ec, fc, style, width):
236+
def get_draw_options(data, obj, ec, fc, ls, lw):
237237
"""Get the draw options for a given (patch) object.
238+
Get the draw options for a given (patch) object.
239+
Input:
240+
data -
241+
obj -
242+
ec - edge color
243+
fc - face color
244+
ls - linestyle
245+
lw - linewidth
246+
Output:
247+
draw_options - list, to be ",".join(draw_options) to produce the
248+
draw options passed to PGF
238249
"""
239250
draw_options = []
240251

@@ -265,15 +276,15 @@ def get_draw_options(data, obj, ec, fc, style, width):
265276
if fc is not None and 0 < fc_rgba[3] != 1.0:
266277
draw_options.append(("fill opacity=" + ff).format(fc_rgba[3]))
267278

268-
if width is not None:
269-
w = mpl_linewidth2pgfp_linewidth(data, width)
270-
if w:
271-
draw_options.append(w)
279+
if lw is not None:
280+
lw_ = mpl_linewidth2pgfp_linewidth(data, lw)
281+
if lw_:
282+
draw_options.append(lw_)
272283

273-
if style is not None:
274-
ls = mpl_linestyle2pgfplots_linestyle(style)
275-
if ls is not None and ls != "solid":
276-
draw_options.append(ls)
284+
if ls is not None:
285+
ls_ = mpl_linestyle2pgfplots_linestyle(ls)
286+
if ls_ is not None and ls_ != "solid":
287+
draw_options.append(ls_)
277288

278289
return data, draw_options
279290

0 commit comments

Comments
 (0)