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 5720387

Browse filesBrowse files
committed
Minor refactor for clarity
1 parent 09991e6 commit 5720387
Copy full SHA for 5720387

File tree

Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed

‎lib/matplotlib/axis.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axis.py
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,10 @@ def get_view_interval(self):
334334
raise NotImplementedError('Derived must override')
335335

336336
def _apply_params(self, **kw):
337-
switchkw = ['gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On']
338-
switches = [k for k in kw if k in switchkw]
339-
for k in switches:
340-
setattr(self, k, kw.pop(k))
341-
newmarker = [k for k in kw if k in ['size', 'width', 'pad', 'tickdir']]
342-
if newmarker:
337+
for name in ['gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On']:
338+
if name in kw:
339+
setattr(self, name, kw.pop(name))
340+
if any(k in kw for k in ['size', 'width', 'pad', 'tickdir']):
343341
self._size = kw.pop('size', self._size)
344342
# Width could be handled outside this block, but it is
345343
# convenient to leave it here.

0 commit comments

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