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

Skip to content

Commit b659a88

Browse files
committed
Adjust offsets after super init for barbs
Not the full contianer I'd like, but easy fix to keep tests passing
1 parent 3fa94c4 commit b659a88

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/quiver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,10 +980,11 @@ def __init__(self, ax, *args,
980980
# Make a collection
981981
barb_size = self._length ** 2 / 4 # Empirically determined
982982
super().__init__(
983-
[], (barb_size,), offsets=xy, offset_transform=transform, **kwargs)
983+
[], (barb_size,), offsets=None, offset_transform=transform, **kwargs)
984984
self.set_transform(transforms.IdentityTransform())
985985

986986
self.set_UVC(u, v, c)
987+
self.set_offsets(xy) # Call after super init/set_UVC because it references UVC
987988

988989
def _find_tails(self, mag, rounding=True, half=5, full=10, flag=50):
989990
"""

0 commit comments

Comments
 (0)