Skip to content

Commit

Permalink
Simplify check for nbagg.transparent.
Browse files Browse the repository at this point in the history
`rcParams` is a `dict`, so there's no need for the roundabout
`set(rcParams.keys())`.
  • Loading branch information
QuLogic committed May 20, 2020
1 parent b9ecf0c commit 0359984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipympl/backend_nbagg.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def closer(event):
Gcf.destroy(num)

canvas = Canvas(figure)
if 'nbagg.transparent' in set(rcParams.keys()) and rcParams['nbagg.transparent']:
if 'nbagg.transparent' in rcParams and rcParams['nbagg.transparent']:
figure.patch.set_alpha(0)
manager = FigureManager(canvas, num)

Expand Down

0 comments on commit 0359984

Please sign in to comment.