Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

ENH: Stricter validation of line style rcParams (and extended accepted types forgrid.linestyle)#8040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
15 commits
Select commitHold shift + click to select a range
061061b
extend 'grid.linestyle' valid types to on-off ink sequences
afvincentFeb 7, 2017
5be29b5
extend 'add test for the new function 'validate_grid_linestyle'
afvincentFeb 7, 2017
25efd07
fix a small typo
afvincentFeb 8, 2017
5cb183c
Relax validation for all ls-related rcParams but contour.negative_lin…
afvincentFeb 9, 2017
d9ff6a8
Check that strings are valid line styles
afvincentFeb 9, 2017
44c3fde
fix PEP8
afvincentFeb 9, 2017
e8032df
use validate_linestyle even for rcParam 'contour.negative_linestyle'
afvincentFeb 10, 2017
2673585
Reintroduce former public validators for negative contours (but they …
afvincentFeb 13, 2017
7bd9bfe
make validate_linestyle private and case insensitive (+ adapt relevan…
afvincentFeb 13, 2017
ad21964
Remove deprecation warning in 'validate_negative_linestyle_legacy'
afvincentFeb 13, 2017
7ab75f5
Deprecate former validation schemes used by 'contour.negative_linestyle'
afvincentFeb 14, 2017
59328e6
Fix typo (a forgotten 'return' statement...)
afvincentFeb 14, 2017
70e87c8
Fix the deprecation decorators
afvincentFeb 17, 2017
c060842
Add a what's new entry
afvincentFeb 17, 2017
aabf385
Fix a typo with the example in the what's new entry
afvincentFeb 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
use validate_linestyle even for rcParam 'contour.negative_linestyle'
  • Loading branch information
@afvincent
afvincent committedFeb 10, 2017
commite8032dff30c077a6e3afece034b59c9294ee4df0
19 changes: 1 addition & 18 deletionslib/matplotlib/rcsetup.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -530,22 +530,6 @@ def validate_ps_distiller(s):
'top', 'none'])
validate_fillstylelist = _listify_validator(validate_fillstyle)

validate_negative_linestyle = ValidateInStrings('negative_linestyle',
['solid', 'dashed'],
ignorecase=True)


def validate_negative_linestyle_legacy(s):
try:
res = validate_negative_linestyle(s)
return res
except ValueError:
dashes = validate_nseq_float(2)(s)
warnings.warn("Deprecated negative_linestyle specification; use "
"'solid' or 'dashed'",
mplDeprecation)
return (0, dashes) # (offset, (solid, blank))


def validate_corner_mask(s):
if s == 'legacy':
Expand DownExpand Up@@ -1081,8 +1065,7 @@ def validate_linestyle(ls):
'image.composite_image': [True, validate_bool],

# contour props
'contour.negative_linestyle': ['dashed',
validate_negative_linestyle_legacy],
'contour.negative_linestyle': ['dashed', validate_linestyle],
'contour.corner_mask': [True, validate_corner_mask],

# errorbar props
Expand Down
2 changes: 1 addition & 1 deletionmatplotlibrc.template
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -471,7 +471,7 @@ backend : $TEMPLATE_BACKEND
# such as a PDF.

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

### ERRORBAR PLOTS
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp