Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4052840

Browse files
committed
fix the pyplot version of rc_context
Before this, when using the rc_context dangling from pyplot, one would get an AttributeError for ``__exit__``, because plt.rc_context wasn't actually returning anything before this change.
1 parent ca476df commit 4052840

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def rc(*args, **kwargs):
197197

198198
@docstring.copy_dedent(matplotlib.rc_context)
199199
def rc_context(rc=None, fname=None):
200-
matplotlib.rc_context(rc, fname)
200+
return matplotlib.rc_context(rc, fname)
201201

202202
@docstring.copy_dedent(matplotlib.rcdefaults)
203203
def rcdefaults():

0 commit comments

Comments
 (0)