8000 FIX: provide __ne__ implementation for transforms in py2 by tacaswell · Pull Request #9468 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

FIX: provide __ne__ implementation for transforms in py2 #9468

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 1 commit into from
Oct 18, 2017
Merged
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
8000
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5353,3 +5353,19 @@ def test_patch_deprecations():
assert fig.patch == fig.figurePatch

assert len(w) == 2


def test_polar_gridlines():
fig = plt.figure()
ax = fig.add_subplot(111, polar=True)

# make all major grid lines lighter, only x grid lines set in 2.1.0
ax.grid(alpha=0.2)

# hide y tick labels, no effect in 2.1.0
plt.setp(ax.yaxis.get_ticklabels(), visible=False)

fig.canvas.draw()

assert ax.xaxis.majorTicks[0].gridline.get_alpha() == .2
assert ax.yaxis.majorTicks[0].gridline.get_alpha() == .2
4 changes: 4 additions & 0 deletions lib/matplotlib/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,10 @@ def __radd__(self, other):
# override `__eq__`), but some subclasses, such as TransformWrapper &
# AffineBase, override this behavior.

if six.PY2:
def __ne__(self, other):
return not (self == other)

def _iter_break_from_left_to_right(self):
"""
Returns an iterator breaking down this transform stack from left to
Expand Down
0