The constructor takes one required argument, an Axes instance, followed by the args and kwargs described by the following pyplot interface documentation: %s
(self, ax, *args,
scale=None, headwidth=3, headlength=5, headaxislength=4.5,
minshaft=1, minlength=1, units='width', scale_units=None,
angles='uv', width=None, color='k', pivot='tail', **kwargs)
| 515 | |
| 516 | @_docstring.Substitution(_quiver_doc) |
| 517 | def __init__(self, ax, *args, |
| 518 | scale=None, headwidth=3, headlength=5, headaxislength=4.5, |
| 519 | minshaft=1, minlength=1, units='width', scale_units=None, |
| 520 | angles='uv', width=None, color='k', pivot='tail', **kwargs): |
| 521 | """ |
| 522 | The constructor takes one required argument, an Axes |
| 523 | instance, followed by the args and kwargs described |
| 524 | by the following pyplot interface documentation: |
| 525 | %s |
| 526 | """ |
| 527 | self._axes = ax # The attr actually set by the Artist.axes property. |
| 528 | X, Y, U, V, C = _parse_args(*args, caller_name='quiver') |
| 529 | self.X = X |
| 530 | self.Y = Y |
| 531 | self.XY = np.column_stack((X, Y)) |
| 532 | self.N = len(X) |
| 533 | self.scale = scale |
| 534 | self.headwidth = headwidth |
| 535 | self.headlength = float(headlength) |
| 536 | self.headaxislength = headaxislength |
| 537 | self.minshaft = minshaft |
| 538 | self.minlength = minlength |
| 539 | self.units = units |
| 540 | self.scale_units = scale_units |
| 541 | self.angles = angles |
| 542 | self.width = width |
| 543 | |
| 544 | if pivot.lower() == 'mid': |
| 545 | pivot = 'middle' |
| 546 | self.pivot = pivot.lower() |
| 547 | _api.check_in_list(self._PIVOT_VALS, pivot=self.pivot) |
| 548 | |
| 549 | self.transform = kwargs.pop('transform', ax.transData) |
| 550 | kwargs.setdefault('facecolors', color) |
| 551 | kwargs.setdefault('linewidths', (0,)) |
| 552 | super().__init__([], offsets=self.XY, offset_transform=self.transform, |
| 553 | closed=False, **kwargs) |
| 554 | self.polykw = kwargs |
| 555 | self.set_UVC(U, V, C) |
| 556 | self._dpi_at_last_init = None |
| 557 | |
| 558 | def _init(self): |
| 559 | """ |
nothing calls this directly
no test coverage detected