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

Class Index

galleries/examples/widgets/buttons.py:26–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25
26class Index:
27 ind = 0
28
29 def next(self, event):
30 self.ind += 1
31 i = self.ind % len(freqs)
32 ydata = np.sin(2*np.pi*freqs[i]*t)
33 l.set_ydata(ydata)
34 plt.draw()
35
36 def prev(self, event):
37 self.ind -= 1
38 i = self.ind % len(freqs)
39 ydata = np.sin(2*np.pi*freqs[i]*t)
40 l.set_ydata(ydata)
41 plt.draw()
42
43callback = Index()
44axprev = fig.add_axes((0.7, 0.05, 0.1, 0.075))

Callers 1

buttons.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…