@@ -1206,9 +1206,9 @@ def rc(group, **kwargs):
1206
1206
1207
1207
rc('font', **font) # pass in the font dict as kwargs
1208
1208
1209
- This enables you to easily switch between several configurations.
1210
- Use :func:`~matplotlib.pyplot. rcdefaults` to restore the default
1211
- rc params after changes.
1209
+ This enables you to easily switch between several configurations. Use
1210
+ ``matplotlib.style.use('default')`` or :func:`~matplotlib.rcdefaults` to
1211
+ restore the default rc params after changes.
1212
1212
"""
1213
1213
1214
1214
aliases = {
@@ -1235,15 +1235,26 @@ def rc(group, **kwargs):
1235
1235
1236
1236
1237
1237
def rcdefaults ():
1238
- """
1239
- Restore the default rc params. These are not the params loaded by
1240
- the rc file, but mpl's internal params. See rc_file_defaults for
1241
- reloading the default params from the rc file
1238
+ """Restore the rc params from Matplotlib's internal defaults.
1239
+
1240
+ See Also
1241
+ --------
1242
+ rc_file_defaults :
1243
+ Restore the rc params from the rc file originally loaded by Matplotlib.
1244
+ matplotlib.style.use :
1245
+ Use a specific style file. Call ``style.use('default')`` to restore
1246
+ the default style.
1242
1247
"""
1243
1248
rcParams .clear ()
1244
1249
rcParams .update (rcParamsDefault )
1245
1250
1246
1251
1252
+ def rc_file_defaults ():
1253
+ """Restore the rc params from the original rc file loaded by Matplotlib.
1254
+ """
1255
+ rcParams .update (rcParamsOrig )
1256
+
1257
+
1247
1258
def rc_file (fname ):
1248
1259
"""
1249
1260
Update rc params from file.
@@ -1306,14 +1317,6 @@ def __exit__(self, type, value, tb):
1306
1317
rcParams .update (self ._rcparams )
1307
1318
1308
1319
1309
- def rc_file_defaults ():
1310
- """
1311
- Restore the default rc params from the original matplotlib rc that
1312
- was loaded
1313
- """
1314
- rcParams .update (rcParamsOrig )
1315
-
1316
-
1317
1320
_use_error_msg = """
1318
1321
This call to matplotlib.use() has no effect because the backend has already
1319
1322
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
0 commit comments