Return a boolean flag, ``True`` if the artist is clipped to the Axes and can thus be skipped in layout calculations. Requires `get_clip_on` is True, one of `clip_box` or `clip_path` is set, ``clip_box.extents`` is equivalent to ``ax.bbox.extents`` (if set), and ``cli
(self)
| 920 | return self._in_autoscale |
| 921 | |
| 922 | def _fully_clipped_to_axes(self): |
| 923 | """ |
| 924 | Return a boolean flag, ``True`` if the artist is clipped to the Axes |
| 925 | and can thus be skipped in layout calculations. Requires `get_clip_on` |
| 926 | is True, one of `clip_box` or `clip_path` is set, ``clip_box.extents`` |
| 927 | is equivalent to ``ax.bbox.extents`` (if set), and ``clip_path._patch`` |
| 928 | is equivalent to ``ax.patch`` (if set). |
| 929 | """ |
| 930 | # Note that ``clip_path.get_fully_transformed_path().get_extents()`` |
| 931 | # cannot be directly compared to ``axes.bbox.extents`` because the |
| 932 | # extents may be undefined (i.e. equivalent to ``Bbox.null()``) |
| 933 | # before the associated artist is drawn, and this method is meant |
| 934 | # to determine whether ``axes.get_tightbbox()`` may bypass drawing |
| 935 | clip_box = self.get_clip_box() |
| 936 | clip_path = self.get_clip_path() |
| 937 | return (self.axes is not None |
| 938 | and self.get_clip_on() |
| 939 | and (clip_box is not None or clip_path is not None) |
| 940 | and (clip_box is None |
| 941 | or np.all(clip_box.extents == self.axes.bbox.extents)) |
| 942 | and (clip_path is None |
| 943 | or isinstance(clip_path, TransformedPatchPath) |
| 944 | and clip_path._patch is self.axes.patch)) |
| 945 | |
| 946 | def get_clip_on(self): |
| 947 | """Return whether the artist uses clipping.""" |