MCPcopy Create free account
hub / github.com/Apress/python-for-matlab-development / init

Function init

code/plots/bouncing_ball.py:81–90  ·  view source on GitHub ↗
(bowl, centerline)

Source from the content-addressed store, hash-verified

79 return bowl, centerline, pos, vel
80
81def init(bowl, centerline):
82 global point, trace
83 fig, ax = plt.subplots()
84 plt.plot(bowl[:,0],bowl[:,1],':')
85 plt.plot(centerline[:,0],centerline[:,1])
86 plt.ylim([-1,4])
87 ax.set_aspect('equal')
88 point, = ax.plot([], [], 'o', markersize=25)
89 trace, = ax.plot([], [], ',-', lw=1)
90 return fig
91
92def animate(i):
93 global history_x, history_y

Callers 1

bouncing_ball.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected