October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following are the steps to implement the logic:
fig = plt.figure(figsize=(8, 6), dpi=100)
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()
n_slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)n_slider.setRange(3, 10)n_slider.setSingleStep(1)n_slider.setValue(4)n_slider.setTickPosition(QtWidgets.QSlider.TicksBelow)n_slider.setTickInterval(1)n_slider.setFont(QtGui.QFont("Arial",30)) ...Read now
Unlock full access