| 730 | |
| 731 | @_docstring.interpd |
| 732 | def annotate(self, text, xy, xytext=None, xycoords='data', textcoords=None, |
| 733 | arrowprops=None, annotation_clip=None, **kwargs): |
| 734 | # Signature must match Annotation. This is verified in |
| 735 | # test_annotate_signature(). |
| 736 | a = mtext.Annotation(text, xy, xytext=xytext, xycoords=xycoords, |
| 737 | textcoords=textcoords, arrowprops=arrowprops, |
| 738 | annotation_clip=annotation_clip, **kwargs) |
| 739 | a.set_transform(mtransforms.IdentityTransform()) |
| 740 | if kwargs.get('clip_on', False) and a.get_clip_path() is None: |
| 741 | a.set_clip_path(self.patch) |
| 742 | self._add_text(a) |
| 743 | return a |
| 744 | annotate.__doc__ = mtext.Annotation.__init__.__doc__ |
| 745 | #### Lines and spans |
| 746 | |