Skip to content

Bug Fix: Issue #6000 #6093

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 1 commit into from
Closed

Bug Fix: Issue #6000 #6093

wants to merge 1 commit into from

Conversation

klampzlamps
Copy link

For issue #6000 , the problem was that calling streamplot.arrows.set_visible(False) was setting the PatchCollection instance's visible flag to False, and when the arrows were being rendered only the arrow's visible flag was checked (bypassing the check to PatchCollection altogether). This is why the arrows were drawn even when the collection's visible flag was False.

The fix was simply to add the arrows at the end as a whole collection to the axes (instead of adding them one at time), and also removing the transform=transform parameter from the FancyArrowPatch creation since it is no longer needed. However I noticed that the default arrow style of '-|>' did not work as some arrows were misplaced so I changed the default style to 'wedge' and this seems to work just fine.

@@ -20,7 +20,7 @@


def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
cmap=None, norm=None, arrowsize=1, arrowstyle='-|>',
Copy link
Member

Choose a reason for hiding this comment

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

Changing the defaults is an API change which we should only do with a very good reason.

@tacaswell
Copy link
Member

This is going to end up coupled with #6054 I suspect.

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Mar 2, 2016
@@ -3153,7 +3153,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
If True, will toggle on the rendering of the caps

showbox : bool, default = True
If True, will toggle on the rendering of the box
If True, will toggle on the rendering of box
Copy link
Member

Choose a reason for hiding this comment

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

I don't really know why you changed any of these docstrings.

Copy link
Author

Choose a reason for hiding this comment

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

Woops, looks like I accidentally used an older _axes.py file when making the changes.

@QuLogic
Copy link
Member

QuLogic commented Mar 2, 2016

Please rebase, and squash the unnecessary commits (e.g., adding and removing extra files) and (force) push an update once you have corrected the comments. (A new PR would not be necessary.)

@tacaswell
Copy link
Member

Please remove the API change.

@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0.2 (next bug fix release) May 3, 2017
@tacaswell tacaswell modified the milestones: 2.1.1 (next bug fix release), 2.2 (next feature release) Oct 9, 2017
@sharma7
Copy link

sharma7 commented Mar 14, 2018

@tacaswell I see that work on this bug has come to a halt. I'm just wondering if it was the right approach, whether I should continue on this approach and what the next steps are?

@jklymak
Copy link
Member

jklymak commented Jul 14, 2020

I'll close this fix, though someone could use it to make their own...

@jklymak jklymak closed this Jul 14, 2020
@story645 story645 removed this from the future releases milestone Oct 6, 2022
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.

7 participants