Skip to content

Style #11684

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 2 commits into from
Jul 18, 2018
Merged

Style #11684

Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion examples/color/colormap_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def plot_color_gradients(cmap_category, cmap_list, nrows):

for ax, name in zip(axes, cmap_list):
ax.imshow(gradient, aspect='auto', cmap=plt.get_cmap(name))
pos = list(ax.get_position().bounds)
pos = ax.get_position().bounds
x_text = pos[0] - 0.01
y_text = pos[1] + pos[3]/2.
fig.text(x_text, y_text, name, va='center', ha='right', fontsize=10)
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backend_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

class Cursors(object):
"""Simple namespace for cursor reference"""
HAND, POINTER, SELECT_REGION, MOVE, WAIT = list(range(5))
HAND, POINTER, SELECT_REGION, MOVE, WAIT = range(5)
cursors = Cursors()

# Views positions tool
Expand Down
4 changes: 1 addition & 3 deletions lib/matplotlib/backends/qt_editor/formlayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,8 @@ def setup(self):
elif isinstance(value, str):
field = QtWidgets.QLineEdit(value, self)
elif isinstance(value, (list, tuple)):
if isinstance(value, tuple):
value = list(value)
selindex = value.pop(0)
field = QtWidgets.QComboBox(self)
selindex, *value = value
if isinstance(value[0], (list, tuple)):
keys = [key for key, _val in value]
value = [val for _key, val in value]
Expand Down
7 changes: 2 additions & 5 deletions lib/mpl_toolkits/axes_grid1/parasite_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ def _get_base_axes_attr(self, attrname):
class ParasiteAxesAuxTransBase(object):
def __init__(self, parent_axes, aux_transform, viewlim_mode=None,
**kwargs):

self.transAux = aux_transform
self.set_viewlim_mode(viewlim_mode)

self._parasite_axes_class.__init__(self, parent_axes, **kwargs)
super().__init__(parent_axes, **kwargs)

def _set_lim_and_transforms(self):

Expand Down Expand Up @@ -188,8 +186,7 @@ def parasite_axes_auxtrans_class_factory(axes_class=None):
parasite_axes_class = axes_class
return type("%sParasiteAuxTrans" % parasite_axes_class.__name__,
(ParasiteAxesAuxTransBase, parasite_axes_class),
{'_parasite_axes_class': parasite_axes_class,
'name': 'parasite_axes'})
{'name': 'parasite_axes'})


ParasiteAxesAuxTrans = parasite_axes_auxtrans_class_factory(
Expand Down