-
Notifications
You must be signed in to change notification settings - Fork 279
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
ENH: Add threshold config for quiver plots #4742
base: main
Are you sure you want to change the base?
Conversation
I just pushed a new version that fixes the logic errors. Originally I wrote it into the contour callback, which has a |
@@ -869,6 +897,25 @@ def _transformed_field(field, data): | |||
periodic, | |||
) | |||
|
|||
if self.threshold_field is not None: | |||
pixT = plot.data.ds.coordinates.pixelize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more question :) Do you think it's worth catching the case when threshold_field
is the same as field_x
or field_y
to avoid this pixelize
call?
self.field_c, | ||
bounds, | ||
(nx, ny), | ||
False, # antialias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not pass the argument as keyword ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. I dunno, I don't know that I wrote that code. The indent just made it show up in the diff.
This adds a thresholding option for quiver plots. Not currently supported in cutting plane.
Closes #4737.