MCPcopy Index your code
hub / github.com/pydata/xarray / add_quiverkey

Method add_quiverkey

xarray/plot/facetgrid.py:797–814  ·  view source on GitHub ↗
(self, u: Hashable, v: Hashable, **kwargs: Any)

Source from the content-addressed store, hash-verified

795 )
796
797 def add_quiverkey(self, u: Hashable, v: Hashable, **kwargs: Any) -> None:
798 kwargs = kwargs.copy()
799
800 magnitude = _get_nice_quiver_magnitude(self.data[u], self.data[v])
801 units = self.data[u].attrs.get("units", "")
802 self.quiverkey = self.axs.flat[-1].quiverkey(
803 self._mappables[-1],
804 X=0.8,
805 Y=0.9,
806 U=magnitude,
807 label=f"{magnitude}\n{units}",
808 labelpos="E",
809 coordinates="figure",
810 )
811
812 # TODO: does not work because self.quiverkey.get_window_extent(renderer) = 0
813 # https://github.com/matplotlib/matplotlib/issues/18530
814 # self._adjust_fig_for_guide(self.quiverkey.text)
815
816 def _get_largest_lims(self) -> dict[str, tuple[float, float]]:
817 """

Callers 1

map_datasetMethod · 0.95

Calls 3

copyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected