Update the plotted function to the new math *expression*. *expression* is a string using "t" as its independent variable, e.g. "t ** 3".
(expression)
| 26 | |
| 27 | |
| 28 | def submit(expression): |
| 29 | """ |
| 30 | Update the plotted function to the new math *expression*. |
| 31 | |
| 32 | *expression* is a string using "t" as its independent variable, e.g. |
| 33 | "t ** 3". |
| 34 | """ |
| 35 | ydata = eval(expression, {'np': np}, {'t': t}) |
| 36 | l.set_ydata(ydata) |
| 37 | ax.relim() |
| 38 | ax.autoscale_view() |
| 39 | plt.draw() |
| 40 | |
| 41 | |
| 42 | axbox = fig.add_axes((0.1, 0.05, 0.8, 0.075)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…