Bug Fix: Issue #6000#6093
Bug Fix: Issue #6000#6093klampzlamps wants to merge 1 commit intomatplotlib:masterfrom klampzlamps:Issue6000
Conversation
|
|
||
|
|
||
| def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None, | ||
| cmap=None, norm=None, arrowsize=1, arrowstyle='-|>', |
There was a problem hiding this comment.
Changing the defaults is an API change which we should only do with a very good reason.
|
This is going to end up coupled with #6054 I suspect. |
lib/matplotlib/axes/_axes.py
Outdated
|
|
||
| showbox : bool, default = True | ||
| If True, will toggle on the rendering of the box | ||
| If True, will toggle on the rendering of box |
There was a problem hiding this comment.
I don't really know why you changed any of these docstrings.
There was a problem hiding this comment.
Woops, looks like I accidentally used an older _axes.py file when making the changes.
|
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.) |
|
Please remove the API change. |
|
@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? |
|
I'll close this fix, though someone could use it to make their own... |
For issue #6000 , the problem was that calling
streamplot.arrows.set_visible(False)was setting thePatchCollectioninstance's visible flag to False, and when the arrows were being rendered only the arrow's visible flag was checked (bypassing the check toPatchCollectionaltogether). This is why the arrows were drawn even when the collection's visible flag wasFalse.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 thetransform=transformparameter from theFancyArrowPatchcreation 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.