Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bcce38f commit d80564bCopy full SHA for d80564b
1 file changed
lib/matplotlib/__init__.py
@@ -1062,6 +1062,9 @@ def rc_context(rc=None, fname=None):
1062
1063
The :rc:`backend` will not be reset by the context manager.
1064
1065
+ rcParams changed both through the context manager invocation and
1066
+ in the body of the context will be reset on context exit.
1067
+
1068
Parameters
1069
----------
1070
rc : dict
@@ -1089,6 +1092,13 @@ def rc_context(rc=None, fname=None):
1089
1092
with mpl.rc_context(fname='print.rc'):
1090
1093
plt.plot(x, y) # uses 'print.rc'
1091
1094
1095
+ Setting in the context body::
1096
1097
+ with mpl.rc_context():
1098
+ # will be reset
1099
+ mpl.rcParams['lines.linewidth'] = 5
1100
+ plt.plot(x, y)
1101
1102
"""
1103
orig = dict(rcParams.copy())
1104
del orig['backend']
0 commit comments