Skip to content

Commit d445bf8

Browse files
committed
"draw=none" is cleaner than "draw opacity=0"
1 parent 84ecab5 commit d445bf8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tikzplotlib/_path.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,7 @@ def get_draw_options(data, obj, ec, fc, ls, lw):
251251

252252
if ec is not None:
253253
data, ec_col, ec_rgba = _color.mpl_color2xcolor(data, ec)
254-
if ec_rgba[3] != 0.0:
255-
# Don't draw if it's invisible anyways.
256-
draw_options.append("draw={}".format(ec_col))
254+
draw_options.append("draw={}".format(ec_col))
257255

258256
if fc is not None:
259257
data, fc_col, fc_rgba = _color.mpl_color2xcolor(data, fc)
@@ -271,7 +269,7 @@ def get_draw_options(data, obj, ec, fc, ls, lw):
271269
):
272270
draw_options.append(("opacity=" + ff).format(ec[3]))
273271
else:
274-
if ec is not None and ec_rgba[3] != 1.0:
272+
if ec is not None and 0 < ec_rgba[3] != 1.0:
275273
draw_options.append(("draw opacity=" + ff).format(ec_rgba[3]))
276274
if fc is not None and 0 < fc_rgba[3] != 1.0:
277275
draw_options.append(("fill opacity=" + ff).format(fc_rgba[3]))

0 commit comments

Comments
 (0)