File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ 2007-12-26 Reduce too-late use of matplotlib.use() to a warning
2+ instead of an exception, for backwards compatibility - EF
3+
142007-12-25 Fix bug in errorbar, identified by Noriko Minakawa - EF
25
362007-12-25 Changed masked array importing to work with the upcoming
Original file line number Diff line number Diff line change @@ -727,8 +727,11 @@ def rcdefaults():
727727 except :
728728 from config import rcParams , rcdefaults
729729
730- _use_error_msg = """ matplotlib.use() must be called *before* pylab
731- or matplotlib.backends is imported for the first time."""
730+ _use_error_msg = """ This call to matplotlib.use() has no effect
731+ because the the backend has already been chosen;
732+ matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
733+ or matplotlib.backends is imported for the first time.
734+ """
732735
733736def use (arg ):
734737 """
@@ -747,7 +750,7 @@ def use(arg):
747750 be called before importing matplotlib.backends.
748751 """
749752 if 'matplotlib.backends' in sys .modules :
750- raise RuntimeError (_use_error_msg )
753+ warnings . warn (_use_error_msg )
751754 be_parts = arg .split ('.' )
752755 name = validate_backend (be_parts [0 ])
753756 rcParams ['backend' ] = name
You can’t perform that action at this time.
0 commit comments