Skip to content
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

Fix for bug in set_cmap in NonUniformImage #5109

Merged
merged 4 commits into from Sep 21, 2015
Merged

Conversation

Cadair
Copy link
Contributor

@Cadair Cadair commented Sep 21, 2015

I think this is a legitimate bug and attached fix.

Running the regression test without the fix produced the following error:

Traceback (most recent call last):
  File "/opt/miniconda/envs/matplotlib-dev/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "test_image.py", line 447, in test_nonuniformimage_setcmap
    im.set_cmap('Blues')
  File "/home/stuart/GitHub/matplotlib/lib/matplotlib/image.py", line 855, in set_cmap
    super(NonUniformImage, self).set_cmap(self, cmap)
TypeError: set_cmap() takes exactly 2 arguments (3 given)

@Tillsten
Copy link
Contributor

Looks right.

@@ -441,6 +441,11 @@ def test_zoom_and_clip_upper_origin():
ax.set_xlim(-0.5, 2.0)


def test_nonuniformimage_setcmap():
Copy link
Member

Choose a reason for hiding this comment

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

needs a @cleanup in order to prevent inadvertent side-effects for other tests.

@WeatherGod
Copy link
Member

By the way, could you also fix the same bug for set_norm just above?

@Cadair
Copy link
Contributor Author

Cadair commented Sep 21, 2015

@WeatherGod updated.

WeatherGod added a commit that referenced this pull request Sep 21, 2015
Fix for bug in set_cmap in NonUniformImage
@WeatherGod WeatherGod merged commit 2706edb into matplotlib:master Sep 21, 2015
@WeatherGod
Copy link
Member

Good catch! Thanks!

@Cadair
Copy link
Contributor Author

Cadair commented Sep 21, 2015

No problem. :)

@tacaswell
Copy link
Member

Gah, sorry I put those lines in 😱 .

Thanks for cleaning up my mess 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants