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

Function test_basic_annotate

lib/matplotlib/tests/test_axes.py:775–787  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

773
774@image_comparison(['offset_points'], remove_text=True, style='mpl20')
775def test_basic_annotate():
776 # Setup some data
777 t = np.arange(0.0, 5.0, 0.01)
778 s = np.cos(2.0*np.pi * t)
779
780 # Offset Points
781
782 fig = plt.figure()
783 ax = fig.add_subplot(autoscale_on=False, xlim=(-1, 5), ylim=(-3, 5))
784 line, = ax.plot(t, s, lw=3, color='purple')
785
786 ax.annotate('local max', xy=(3, 1), xycoords='data',
787 xytext=(3, 3), textcoords='offset points')
788
789
790@image_comparison(['arrow_simple.png'], remove_text=True, style='_classic_test')

Callers

nothing calls this directly

Calls 4

figureMethod · 0.80
add_subplotMethod · 0.80
annotateMethod · 0.80
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…