Skip to content

keyword arguments for Maptplotlib.pyplot.quiver #11793

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

Closed
wants to merge 2 commits into from
Closed

keyword arguments for Maptplotlib.pyplot.quiver #11793

wants to merge 2 commits into from

Conversation

jaideep-seth
Copy link

@jaideep-seth jaideep-seth commented Jul 29, 2018

PR Summary

Attempt at providing keyword arguments for Matplotlib.pyplot.quiver - Currently unable to pass image comparison tests #11526

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jaideep-seth
Copy link
Author

#11526

@WeatherGod WeatherGod closed this Jul 30, 2018
@WeatherGod WeatherGod reopened this Jul 30, 2018
@WeatherGod
Copy link
Member

power-cycling to retry the test suite

@story645
Copy link
Member

Can you please edit the PR title and text to explain what this pull request is about? While I appreciate that you referenced the issue, it would be really helpful to also have a short summary here.

@jaideep-seth jaideep-seth changed the title attempt attempt at providing kewyword arguments for Maptplotlib.pyplot.quiver - Currently unable to pass image comparison tests Jul 30, 2018
@jaideep-seth jaideep-seth changed the title attempt at providing kewyword arguments for Maptplotlib.pyplot.quiver - Currently unable to pass image comparison tests attempt at providing keyword arguments for Maptplotlib.pyplot.quiver - Currently unable to pass image comparison tests Jul 30, 2018
@jaideep-seth
Copy link
Author

I'm unable to clear some image comparison tests, although the ones in tests/tests_collections.py::test_quiver_limits do. @story645

-Thank you.

@story645 story645 changed the title attempt at providing keyword arguments for Maptplotlib.pyplot.quiver - Currently unable to pass image comparison tests keyword arguments for Maptplotlib.pyplot.quiver #11526 Jul 30, 2018
@anntzer
Copy link
Contributor

anntzer commented Jul 30, 2018

I think the much simpler solution is to do something like https://github.com/matplotlib/matplotlib/blob/v2.2.2/lib/matplotlib/axes/_axes.py#L2135, define

matchers = [
    lambda U, V, **kwargs: (None, None, U, V, None),
    lambda U, V, C, **kwargs: (None, None, U, V, C),
    lambda X, Y, U, V, **kwargs: (X, Y, U, V, None),
    lambda X, Y, V, V, C, **kwargs: (X, Y, U, V, C),
]

and call the matchers in order until one doesn't raise TypeError; the returned value gives the correct values of X, Y, U, V, C.

@jklymak jklymak changed the title keyword arguments for Maptplotlib.pyplot.quiver #11526 keyword arguments for Maptplotlib.pyplot.quiver Aug 4, 2018
Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

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

Proposing to reject per #11526 (comment). Thank you for your contribution, but I think the problem was ill-posed to start with... Sorry!

@anntzer
Copy link
Contributor

anntzer commented Aug 29, 2018

Closing per decision in #11526.

@anntzer anntzer closed this Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants