Thanks to visit codestin.com
Credit goes to github.com

Skip to content

quiver: add orientation kwarg. Closes #3709 [backport to 1.4.x] #4025

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

Conversation

efiring
Copy link
Member

@efiring efiring commented Jan 22, 2015

The default behavior is unchanged, but there is a new kwarg, "orientation". The default is "absolute", in which arrow angles, whether specified directly or calculated from U and V, are CCW relative to the axis pointing to the right. If set to "relative", then arrow orientation follows the orientation of the x and y data axes; when an axis is inverted, the arrows are reflected about the perpendicular axis. One would use "relative" for displaying gradients, as in #3709.
I'm open to alternative suggestions for the kwarg name and/or values.

@efiring
Copy link
Member Author

efiring commented Jan 22, 2015

Maybe this could go into 1.4.x with the present default, and the default could be changed to "relative" in 1.5. The more I think about it, the more I tend to conclude that the present behavior would be unexpected by just about anyone. It hasn't been a problem only because people haven't been making many quiver plots with inverted axes.

@@ -74,6 +74,20 @@ def test_quiver_with_key():
'size': 'large'})


@image_comparison(baseline_images=['quiver_orientation_test_image'],
Copy link
Member

Choose a reason for hiding this comment

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

Best remove any text from this test. It will make it more resilient to freetype changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

True, but it will also make it very difficult to interpret the plot if someone wants to understand the behavior it is testing.

@tacaswell tacaswell added this to the v1.4.3 milestone Jan 22, 2015
@tacaswell tacaswell changed the title quiver: add orientation kwarg. Closes #3709 quiver: add orientation kwarg. Closes #3709 [backport to 1.4.x] Jan 22, 2015
@efiring
Copy link
Member Author

efiring commented Jan 23, 2015

I'm going to close this; it is not the right solution for v1.4.3. I will submit an alternative that will include the removal of the conditional from the draw method. I think this will fix #3817 as well as #4025 provided the angles='xy' option is used as intended. I will add a bit to the docstring to emphasize this. For 1.5 it might make sense to add the orientation kwarg, which then would apply except in the angles='xy' case.

@efiring efiring closed this Jan 23, 2015
@efiring efiring deleted the quiverflip branch October 24, 2021 19:50
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.

3 participants