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

Skip to content

Rcparam validation fix #3564

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Oct 14, 2014
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
BUG : fixed string list default values
The other fixes on this branch make this un-needed (as the default
values of are now properly validated and a single word string (as
separated by commas) are correctly converted into length 1 list) but
out of principle make the default value of things labeled an 'string
lists' should have default values which are lists of strings.
  • Loading branch information
tacaswell committed Oct 5, 2014
commit 4cc899c9eaf6b760a162a5759244f88e6f1189cb
16 changes: 8 additions & 8 deletions lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def __call__(self, s):


## font props
'font.family': ['sans-serif', validate_stringlist], # used by text object
'font.family': [['sans-serif'], validate_stringlist], # used by text object
'font.style': ['normal', six.text_type],
'font.variant': ['normal', six.text_type],
'font.stretch': ['normal', six.text_type],
Expand Down Expand Up @@ -782,14 +782,14 @@ def __call__(self, s):
'keymap.home': [['h', 'r', 'home'], validate_stringlist],
'keymap.back': [['left', 'c', 'backspace'], validate_stringlist],
'keymap.forward': [['right', 'v'], validate_stringlist],
'keymap.pan': ['p', validate_stringlist],
'keymap.zoom': ['o', validate_stringlist],
'keymap.save': [('s', 'ctrl+s'), validate_stringlist],
'keymap.quit': [('ctrl+w', 'cmd+w'), validate_stringlist],
'keymap.grid': ['g', validate_stringlist],
'keymap.yscale': ['l', validate_stringlist],
'keymap.pan': [['p'], validate_stringlist],
'keymap.zoom': [['o'], validate_stringlist],
'keymap.save': [['s', 'ctrl+s'], validate_stringlist],
'keymap.quit': [['ctrl+w', 'cmd+w'], validate_stringlist],
'keymap.grid': [['g'], validate_stringlist],
'keymap.yscale': [['l'], validate_stringlist],
'keymap.xscale': [['k', 'L'], validate_stringlist],
'keymap.all_axes': ['a', validate_stringlist],
'keymap.all_axes': [['a'], validate_stringlist],

# sample data
'examples.directory': ['', six.text_type],
Expand Down