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

Method annotate

lib/matplotlib/axes/_axes.py:732–743  ·  view source on GitHub ↗
(self, text, xy, xytext=None, xycoords='data', textcoords=None,
                 arrowprops=None, annotation_clip=None, **kwargs)

Source from the content-addressed store, hash-verified

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

Callers 15

bar_labelMethod · 0.95
annotateFunction · 0.80
test_annotateMethod · 0.80
test_legend_annotateFunction · 0.80
test_basic_annotateFunction · 0.80
test_pie_center_radiusFunction · 0.80
test_preset_clip_pathsFunction · 0.80
test_font_stylesFunction · 0.80
test_annotation_containsFunction · 0.80

Calls 5

_add_textMethod · 0.80
set_transformMethod · 0.45
getMethod · 0.45
get_clip_pathMethod · 0.45
set_clip_pathMethod · 0.45

Tested by 15

test_annotateMethod · 0.64
test_legend_annotateFunction · 0.64
test_basic_annotateFunction · 0.64
test_pie_center_radiusFunction · 0.64
test_preset_clip_pathsFunction · 0.64
test_font_stylesFunction · 0.64
test_annotation_containsFunction · 0.64
test_annotate_errorsFunction · 0.64
test_set_positionFunction · 0.64