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

Skip to content

Commit 5ac976f

Browse files
committed
Merge remote-tracking branch 'ivanov/rc_context-in-pyplot'
Conflicts: CHANGELOG
2 parents ffef8dd + 0110347 commit 5ac976f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
2012-11-26 deprecate matplotlib/mpl.py, which was used only in pylab.py and is
2121
now replaced by the more suitable `import matplotlib as mpl`. - PI
2222

23+
2012-11-25 Make rc_context available via pyplot interface - PI
24+
2325
2012-11-16 plt.set_cmap no longer throws errors if there is not already
2426
an active colorable artist, such as an image, and just sets
2527
up the colormap to use from that point forward. - PI

lib/matplotlib/pyplot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from matplotlib.image import imread as _imread
2929
from matplotlib.image import imsave as _imsave
3030
from matplotlib import rcParams, rcParamsDefault, get_backend
31+
from matplotlib import rc_context
3132
from matplotlib.rcsetup import interactive_bk as _interactive_bk
3233
from matplotlib.artist import getp, get, Artist
3334
from matplotlib.artist import setp as _setp
@@ -194,6 +195,10 @@ def pause(interval):
194195
def rc(*args, **kwargs):
195196
matplotlib.rc(*args, **kwargs)
196197

198+
@docstring.copy_dedent(matplotlib.rc_context)
199+
def rc_context(rc=None, fname=None):
200+
matplotlib.rc_context(rc, fname)
201+
197202
@docstring.copy_dedent(matplotlib.rcdefaults)
198203
def rcdefaults():
199204
matplotlib.rcdefaults()

0 commit comments

Comments
 (0)