We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef0f6e4 commit 003ea0bCopy full SHA for 003ea0b
lib/matplotlib/backends/backend_svg.py
@@ -391,16 +391,19 @@ def _write_hatches(self):
391
x="0", y="0", width=str(HATCH_SIZE+1),
392
height=str(HATCH_SIZE+1),
393
fill=fill)
394
- writer.element(
395
- 'path',
396
- d=path_data,
397
- style=generate_css({
+ hatch_style = {
398
'fill': rgb2hex(stroke),
399
'stroke': rgb2hex(stroke),
400
'stroke-width': str(mpl.rcParams['hatch.linewidth']),
401
'stroke-linecap': 'butt',
402
'stroke-linejoin': 'miter'
403
- })
+ }
+ if stroke[3] < 1.:
+ hatch_style['stroke-opacity'] = str(stroke[3])
+ writer.element(
404
+ 'path',
405
+ d=path_data,
406
+ style=generate_css(hatch_style)
407
)
408
writer.end('pattern')
409
writer.end('defs')
0 commit comments