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

Skip to content

Commit dc5a93e

Browse files
tacaswellmdboom
authored andcommitted
API: use 'best' for default legend location
Closes #4671
1 parent d107790 commit dc5a93e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/matplotlib/rcsetup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ def validate_hist_bins(s):
10201020
'legend.fancybox': [False, validate_bool],
10211021

10221022
# at some point, legend.loc should be changed to 'best'
1023-
'legend.loc': ['upper right', validate_legend_loc],
1023+
'legend.loc': ['best', validate_legend_loc],
10241024

10251025
# this option is internally ignored - it never served any useful purpose
10261026
'legend.isaxes': [True, validate_bool],

matplotlibrc.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ backend : %(backend)s
366366
### Legend
367367
#legend.fancybox : False # if True, use a rounded box for the
368368
# legend, else a rectangle
369+
#legend.loc : best
369370
#legend.isaxes : True
370371
#legend.numpoints : 1 # the number of points in the legend line
371372
#legend.fontsize : large

0 commit comments

Comments
 (0)