@@ -1255,9 +1255,9 @@ def rc(group, **kwargs):
1255
1255
1256
1256
rc('font', **font) # pass in the font dict as kwargs
1257
1257
1258
- This enables you to easily switch between several configurations.
1259
- Use :func:`~matplotlib.pyplot. rcdefaults` to restore the default
1260
- rc params after changes.
1258
+ This enables you to easily switch between several configurations. Use
1259
+ ``matplotlib.style.use('default')`` or :func:`~matplotlib.rcdefaults` to
1260
+ restore the default rc params after changes.
1261
1261
"""
1262
1262
1263
1263
aliases = {
@@ -1284,15 +1284,26 @@ def rc(group, **kwargs):
1284
1284
1285
1285
1286
1286
def rcdefaults ():
1287
- """
1288
- Restore the default rc params. These are not the params loaded by
1289
- the rc file, but mpl's internal params. See rc_file_defaults for
1290
- reloading the default params from the rc file
1287
+ """Restore the rc params from Matplotlib's internal defaults.
1288
+
1289
+ See Also
1290
+ --------
1291
+ rc_file_defaults :
1292
+ Restore the rc params from the rc file originally loaded by Matplotlib.
1293
+ matplotlib.style.use :
1294
+ Use a specific style file. Call ``style.use('default')`` to restore
1295
+ the default style.
1291
1296
"""
1292
1297
rcParams .clear ()
1293
1298
rcParams .update (rcParamsDefault )
1294
1299
1295
1300
1301
+ def rc_file_defaults ():
1302
+ """Restore the rc params from the original rc file loaded by Matplotlib.
1303
+ """
1304
+ rcParams .update (rcParamsOrig )
1305
+
1306
+
1296
1307
def rc_file (fname ):
1297
1308
"""
1298
1309
Update rc params from file.
@@ -1347,16 +1358,9 @@ def __exit__(self, type, value, tb):
1347
1358
rcParams .update (self ._rcparams )
1348
1359
1349
1360
1350
- def rc_file_defaults ():
1351
- """
1352
- Restore the default rc params from the original matplotlib rc that
1353
- was loaded
1354
- """
1355
- rcParams .update (rcParamsOrig )
1356
-
1357
- _use_error_msg = """ This call to matplotlib.use() has no effect
1358
- because the backend has already been chosen;
1359
- matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
1361
+ _use_error_msg = """
1362
+ This call to matplotlib.use() has no effect because the backend has already
1363
+ been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
1360
1364
or matplotlib.backends is imported for the first time.
1361
1365
"""
1362
1366
0 commit comments