October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following are the steps to implement the logic:
qApp = QtWidgets.QApplication(sys.argv)window = QtWidgets.QMainWindow()
fig = Figure(figsize=(8, 6), dpi=100)canvas = FigureCanvas(fig)toolbar = NavigationToolbar(canvas, window)
ax = fig.add_subplot(111,projection='polar')theta = np.arange(0., 2., 1./180.)*np.piax.plot(theta, 5*np.cos(4*theta))
def update(): n=n_slider.value() ax.clear() ax.plot(theta, 5*np.cos(n*theta)) fig.canvas.draw()
Read now
Unlock full access