Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 64accfd

Browse filesBrowse files
committed
translucent legend background; remove legend.isaxes; scatterpoints=1
1 parent 1ac0071 commit 64accfd
Copy full SHA for 64accfd

File tree

Expand file treeCollapse file tree

3 files changed

+18
-13
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+18
-13
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ def matplotlib_fname():
861861
_deprecated_ignore_map = {
862862
}
863863

864-
_obsolete_set = set(['tk.pythoninspect', ])
864+
_obsolete_set = set(['tk.pythoninspect', 'legend.isaxes'])
865865
_all_deprecated = set(chain(_deprecated_ignore_map,
866866
_deprecated_map, _obsolete_set))
867867

@@ -880,6 +880,8 @@ class RcParams(dict):
880880
if key not in _all_deprecated)
881881
msg_depr = "%s is deprecated and replaced with %s; please use the latter."
882882
msg_depr_ignore = "%s is deprecated and ignored. Use %s"
883+
msg_obsolete = ("%s is obsolete. Please remove it from your matplotlibrc "
884+
"and/or style files.")
883885

884886
# validate values on the way in
885887
def __init__(self, *args, **kwargs):
@@ -897,6 +899,9 @@ def __setitem__(self, key, val):
897899
alt = _deprecated_ignore_map[key]
898900
warnings.warn(self.msg_depr_ignore % (key, alt))
899901
return
902+
elif key in _obsolete_set:
903+
warnings.warn(self.msg_obsolete % (key,))
904+
return
900905
try:
901906
cval = self.validate[key](val)
902907
except ValueError as ve:
@@ -918,6 +923,10 @@ def __getitem__(self, key):
918923
warnings.warn(self.msg_depr_ignore % (key, alt))
919924
key = alt
920925

926+
elif key in _obsolete_set:
927+
warnings.warn(self.msg_obsolete % (key,))
928+
return None
929+
921930
val = dict.__getitem__(self, key)
922931
if inverse_alt is not None:
923932
return inverse_alt(val)

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+4-8Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,22 +1103,18 @@ def validate_hist_bins(s):
11031103
#legend properties
11041104
'legend.fancybox': [True, validate_bool],
11051105
'legend.loc': ['best', validate_legend_loc],
1106-
1107-
# this option is internally ignored - it never served any useful purpose
1108-
'legend.isaxes': [True, validate_bool],
1109-
11101106
# the number of points in the legend line
11111107
'legend.numpoints': [1, validate_int],
11121108
# the number of points in the legend line for scatter
1113-
'legend.scatterpoints': [3, validate_int],
1109+
'legend.scatterpoints': [1, validate_int],
11141110
'legend.fontsize': ['small', validate_fontsize],
11151111
# the relative size of legend markers vs. original
11161112
'legend.markerscale': [1.0, validate_float],
11171113
'legend.shadow': [False, validate_bool],
11181114
# whether or not to draw a frame around legend
1119-
'legend.frameon': [False, validate_bool],
1115+
'legend.frameon': [True, validate_bool],
11201116
# alpha value of the legend frame
1121-
'legend.framealpha': [None, validate_float_or_None],
1117+
'legend.framealpha': [0.8, validate_float_or_None],
11221118

11231119
## the following dimensions are in fraction of the font size
11241120
'legend.borderpad': [0.4, validate_float], # units are fontsize
@@ -1138,7 +1134,7 @@ def validate_hist_bins(s):
11381134
'legend.markerscale': [1.0, validate_float],
11391135
'legend.shadow': [False, validate_bool],
11401136
'legend.facecolor': ['inherit', validate_color_or_inherit],
1141-
'legend.edgecolor': ['k', validate_color_or_inherit],
1137+
'legend.edgecolor': ['none', validate_color_or_inherit],
11421138

11431139
# tick properties
11441140
'xtick.top': [True, validate_bool], # draw ticks on the top side

‎matplotlibrc.template

Copy file name to clipboardExpand all lines: matplotlibrc.template
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,15 +395,15 @@ backend : $TEMPLATE_BACKEND
395395

396396
### Legend
397397
#legend.loc : best
398-
#legend.frameon : False # whether or not to draw a frame around legend
399-
#legend.framealpha : None # legend frame transparency
398+
#legend.frameon : True # whether or not to draw a frame around legend
399+
#legend.framealpha : 0.8 # legend frame transparency
400400
#legend.facecolor : inherit # inherit from axes.facecolor; or color spec
401-
#legend.edgecolor : k
401+
#legend.edgecolor : none
402402
#legend.fancybox : True # if True, use a rounded box for the
403403
# legend, else a rectangle
404404
#legend.shadow : False
405405
#legend.numpoints : 1 # the number of marker points in the legend line
406-
#legend.scatterpoints : 3 # number of scatter points
406+
#legend.scatterpoints : 1 # number of scatter points
407407
#legend.markerscale : 1.0 # the relative size of legend markers vs. original
408408
#legend.fontsize : small
409409
# Dimensions as fraction of fontsize:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.