@@ -253,11 +253,14 @@ def get_draw_options(data, obj, ec, fc, ls, lw, hatch=None):
253
253
254
254
if ec is not None :
255
255
data , ec_col , ec_rgba = _color .mpl_color2xcolor (data , ec )
256
- draw_options .append ("draw={}" .format (ec_col ))
256
+ if ec_rgba [3 ] > 0 :
257
+ draw_options .append ("draw={}" .format (ec_col ))
258
+ else :
259
+ draw_options .append ("draw=none" )
257
260
258
261
if fc is not None :
259
262
data , fc_col , fc_rgba = _color .mpl_color2xcolor (data , fc )
260
- if fc_rgba [3 ] != 0.0 :
263
+ if fc_rgba [3 ] > 0.0 :
261
264
# Don't draw if it's invisible anyways.
262
265
draw_options .append ("fill={}" .format (fc_col ))
263
266
@@ -271,9 +274,9 @@ def get_draw_options(data, obj, ec, fc, ls, lw, hatch=None):
271
274
):
272
275
draw_options .append (("opacity=" + ff ).format (ec [3 ]))
273
276
else :
274
- if ec is not None and 0 < ec_rgba [3 ] != 1.0 :
277
+ if ec is not None and 0 < ec_rgba [3 ] < 1.0 :
275
278
draw_options .append (("draw opacity=" + ff ).format (ec_rgba [3 ]))
276
- if fc is not None and 0 < fc_rgba [3 ] != 1.0 :
279
+ if fc is not None and 0 < fc_rgba [3 ] < 1.0 :
277
280
draw_options .append (("fill opacity=" + ff ).format (fc_rgba [3 ]))
278
281
279
282
if lw is not None :
@@ -309,10 +312,6 @@ def get_draw_options(data, obj, ec, fc, ls, lw, hatch=None):
309
312
finally :
310
313
if h_rgba [3 ] > 0 :
311
314
data , pattern = _mpl_hatch2pgfp_pattern (data , hatch , h_col , h_rgba )
312
- if ec is not None and ec_rgba [3 ] == 0.0 :
313
- # 'draw=none' must be specified for the border to be omitted
314
- # when a pattern is drawn using \draw.
315
- draw_options .append ("draw={}" .format (ec_col ))
316
315
draw_options += pattern
317
316
318
317
return data , draw_options
0 commit comments