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 streamplot when color argument has NaNs #1514

Merged
merged 3 commits into from Dec 2, 2012

Conversation

tonysyu
Copy link
Contributor

@tonysyu tonysyu commented Nov 16, 2012

Bug report and fix provided by Jon Ramsey.

Bug report and fix provided by Jon Ramsey.
@dmcdougall
Copy link
Member

@tonysyu Could you also add a test for this so we don't run into it again?

@tonysyu
Copy link
Contributor Author

tonysyu commented Nov 17, 2012

@dmcdougall Good point. I just added tests for streamplot.

Note that I'm on OS X, which marks SVG tests as KnownFails. I'm not sure if this is due to issues with the testing infrastructure or with the generation of SVGs on OS X, but if it's the latter I assume someone else will need to replace the SVGs that I pushed.

@pelson
Copy link
Member

pelson commented Nov 19, 2012

Thanks for adding the tests @tonysyu. Just to note, the comparison files such as streamplot_colormap_test_image_pdf.png should not be included in the baseline images (streamplot_colormap_test_image.pdf should and is).

Cheers,

@tonysyu
Copy link
Contributor Author

tonysyu commented Nov 21, 2012

@pelson Thanks for the help. Fixed.

@dmcdougall
Copy link
Member

Note that I'm on OS X, which marks SVG tests as KnownFails. I'm not sure if this is due to issues with the testing infrastructure or with the generation of SVGs on OS X, but if it's the latter I assume someone else will need to replace the SVGs that I pushed.

Does anyone know what the situation is here?

@tonysyu Do you have inkscape installed? That might be why you're getting KnownFails for the SVG tests.

@tonysyu
Copy link
Contributor Author

tonysyu commented Nov 27, 2012

@dmcdougall I do actually have inkscape installed, but it appears that I have the CLI for inkscape linked in some incompatible way. I'll look into fixing this, but I'm a bit short on time.

Do you know if the tests fail on your system using the SVGs in this PR?

@dmcdougall
Copy link
Member

Do you know if the tests fail on your system using the SVGs in this PR?

$ python tests.py matplotlib.tests.test_streamplot
....../opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/ma/core.py:3785: UserWarning: Warning: converting a masked element to nan.
  warnings.warn("Warning: converting a masked element to nan.")
...
----------------------------------------------------------------------
Ran 9 tests in 24.685s

OK

@tonysyu
Copy link
Contributor Author

tonysyu commented Dec 2, 2012

Thanks for checking the SVG tests @dmcdougall. I guess that means the SVG test images are fine.

Is there anything else I should add/fix for this PR?

@dmcdougall
Copy link
Member

@tonysyu Nope, you're good. Merging.

dmcdougall added a commit that referenced this pull request Dec 2, 2012
Fix streamplot when color argument has NaNs
@dmcdougall dmcdougall merged commit 295f9fa into matplotlib:master Dec 2, 2012
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

3 participants