Skip to content

Commit edfd1c6

Browse files
authored
handle 'none' alpha case
1 parent a78331d commit edfd1c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tikzplotlib/_text.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ def _bbox(bbox, data, properties, scaling):
246246
properties.append(f"line width={line_width:{ff}}pt")
247247
inner_sep = bbox_style.pad * data["font size"]
248248
properties.append(f"inner sep={inner_sep:{ff}}pt")
249-
properties.append("fill opacity={}".format(bbox.get_alpha()))
249+
if bbox.get_alpha():
250+
properties.append("fill opacity={}".format(bbox.get_alpha()))
250251
# Rounded boxes
251252
if isinstance(bbox_style, mpl.patches.BoxStyle.Round):
252253
properties.append("rounded corners")

0 commit comments

Comments
 (0)