Skip to content

Commit 960d9e2

Browse files
committed
proper legend opacity handling
1 parent a670137 commit 960d9e2

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tag:
99
@echo "Tagging v$(VERSION)..."
1010
git tag v$(VERSION)
1111
git push --tags
12+
curl -H "Authorization: token `cat $(HOME)/.github-access-token`" -d '{"tag_name": "$(VERSION)"}' https://api.github.com/repos/nschloe/tikzplotlib/releases
1213

1314
upload: setup.py
1415
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi

tikzplotlib/_legend.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,8 @@ def draw_legend(data, obj):
3838
position = [bbox_center[0], bbox_center[1]]
3939

4040
legend_style = [
41-
# These are the mpl default setting for legends, see
42-
# <https://matplotlib.org/3.1.1/api/legend_api.html#matplotlib.legend.Legend>.
43-
# Keep an eye on <https://github.com/matplotlib/matplotlib/issues/15764> to see
44-
# if we can get() the opacity from the legend object.
45-
"fill opacity=0.8",
41+
# https://github.com/matplotlib/matplotlib/issues/15764#issuecomment-557823370
42+
"fill opacity={}".format(obj.get_frame().get_alpha()),
4643
"draw opacity=1",
4744
"text opacity=1",
4845
]

0 commit comments

Comments
 (0)