MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_points

Method get_points

lib/matplotlib/projections/polar.py:738–769  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

736 __str__ = mtransforms._make_str_method("_center", "_viewLim", "_originLim")
737
738 def get_points(self):
739 # docstring inherited
740 if self._invalid:
741 points = self._viewLim.get_points().copy()
742 # Scale angular limits to work with Wedge.
743 points[:, 0] *= 180 / np.pi
744 if points[0, 0] > points[1, 0]:
745 points[:, 0] = points[::-1, 0]
746
747 # Scale radial limits based on origin radius.
748 points[:, 1] -= self._originLim.y0
749
750 # Scale radial limits to match axes limits.
751 rscale = 0.5 / points[1, 1]
752 points[:, 1] *= rscale
753 width = min(points[1, 1] - points[0, 1], 0.5)
754
755 # Generate bounding box for wedge.
756 wedge = mpatches.Wedge(self._center, points[1, 1],
757 points[0, 0], points[1, 0],
758 width=width)
759 self.update_from_path(wedge.get_path())
760
761 # Ensure equal aspect ratio.
762 w, h = self._points[1] - self._points[0]
763 deltah = max(w - h, 0) / 2
764 deltaw = max(h - w, 0) / 2
765 self._points += np.array([[-deltaw, -deltah], [deltaw, deltah]])
766
767 self._invalid = 0
768
769 return self._points
770
771
772class PolarAxes(Axes):

Callers 15

draw_markersMethod · 0.45
draw_pathMethod · 0.45
_print_pgf_clipMethod · 0.45
_print_pgf_pathMethod · 0.45
relimMethod · 0.45
_get_pan_pointsMethod · 0.45
bar_labelMethod · 0.45
test_range_sliderFunction · 0.45
test_remove_from_figureFunction · 0.45

Calls 3

get_pathMethod · 0.95
update_from_pathMethod · 0.80
copyMethod · 0.45

Tested by 15

test_range_sliderFunction · 0.36
test_remove_from_figureFunction · 0.36
test_relim_collectionFunction · 0.36
test_insetFunction · 0.36
test_zoom_insetFunction · 0.36
test_non_default_dpiFunction · 0.36