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

Skip to content

Commit e8032df

Browse files
committed
use validate_linestyle even for rcParam 'contour.negative_linestyle'
1 parent 44c3fde commit e8032df

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

lib/matplotlib/rcsetup.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -530,22 +530,6 @@ def validate_ps_distiller(s):
530530
'top', 'none'])
531531
validate_fillstylelist = _listify_validator(validate_fillstyle)
532532

533-
validate_negative_linestyle = ValidateInStrings('negative_linestyle',
534-
['solid', 'dashed'],
535-
ignorecase=True)
536-
537-
538-
def validate_negative_linestyle_legacy(s):
539-
try:
540-
res = validate_negative_linestyle(s)
541-
return res
542-
except ValueError:
543-
dashes = validate_nseq_float(2)(s)
544-
warnings.warn("Deprecated negative_linestyle specification; use "
545-
"'solid' or 'dashed'",
546-
mplDeprecation)
547-
return (0, dashes) # (offset, (solid, blank))
548-
549533

550534
def validate_corner_mask(s):
551535
if s == 'legacy':
@@ -1081,8 +1065,7 @@ def validate_linestyle(ls):
10811065
'image.composite_image': [True, validate_bool],
10821066

10831067
# contour props
1084-
'contour.negative_linestyle': ['dashed',
1085-
validate_negative_linestyle_legacy],
1068+
'contour.negative_linestyle': ['dashed', validate_linestyle],
10861069
'contour.corner_mask': [True, validate_corner_mask],
10871070

10881071
# errorbar props

matplotlibrc.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ backend : $TEMPLATE_BACKEND
471471
# such as a PDF.
472472

473473
### CONTOUR PLOTS
474-
#contour.negative_linestyle : dashed # dashed | solid
474+
#contour.negative_linestyle : dashed # string or on-off ink sequence
475475
#contour.corner_mask : True # True | False | legacy
476476

477477
### ERRORBAR PLOTS

0 commit comments

Comments
 (0)