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.
There was an error while loading. Please reload this page.
2 parents 4230879 + a64686e commit b8d8b1bCopy full SHA for b8d8b1b
lib/matplotlib/__init__.py
@@ -1285,7 +1285,15 @@ class rc_context(object):
1285
plt.plot(x, a)
1286
1287
The 'rc' dictionary takes precedence over the settings loaded from
1288
- 'fname'. Passing a dictionary only is also valid.
+ 'fname'. Passing a dictionary only is also valid. For example a
1289
+ common usage is::
1290
+
1291
+ with mpl.rc_context(rc={'interactive': False}):
1292
+ fig, ax = plt.subplots()
1293
+ ax.plot(range(3), range(3))
1294
+ fig.savefig('A.png', format='png')
1295
+ plt.close(fig)
1296
1297
"""
1298
1299
def __init__(self, rc=None, fname=None):
0 commit comments