The app will work more smoothly if we create the figure once and then only update the data in the plot when the widgets are manipulated by the users. Check out how the skijumpdesign app does this (starting around here: https://gitlab.com/moorepants/skijumpdesign/-/blob/master/skijumpdesign/app.py#L1107)