Skip to content

Add spines and ticks in rcParams #2702

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
trying to fix Travis CI failure on 2.6
  • Loading branch information
olgabot committed Jan 4, 2014
commit 950526a8e9a70d3fea86d39f3447d76fc78186db
4 changes: 2 additions & 2 deletions lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,10 @@ def validate_bbox(s):
raise ValueError("bbox should be 'tight' or 'standard'")

validate_xtick_position = ValidateInStrings('xtick.position',
['both', 'bottom', 'top'])
['both', 'bottom', 'top', 'none'])

validate_ytick_position = ValidateInStrings('ytick.position',
['both', 'left', 'right'])
['both', 'left', 'right', 'none'])


def validate_sketch(s):
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/spines.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def linear_spine(cls, axes, spine_type, **kwargs):
else:
raise ValueError('unable to make path for spine "%s"' % spine_type)
result = cls(axes, spine_type, path, **kwargs)
if not rcParams['axes.spines.{}'.format(spine_type)]:
if not rcParams['axes.spines.{0}'.format(spine_type)]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a .get call in case "type" is something else (from a subclass of Axes).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would also make it more clear what the default value was result.set_visible(rcParams.get('axes.spines.{}'.format(spine_type), True))

result.set_visible(False)

return result
Expand Down