We extend the preceding example by providing two sliders, one for the amplitude and another for the frequency, and we put the sliders in vertical mode.
First, we define the two slider axes:
sldo_ax = axes([0.95, 0.15, 0.01, 0.6]) # axes for frequency slider
slda_ax = axes([0.85, 0.15, 0.01, 0.6]) # axes for amplitude slider
Then, we define the two sliders with different minimum and maximum values and an orientation parameter:
sld_omega = Slider(sldo_ax, label='$\omega$ [Hz]', valmin=1.,
valmax=5., valinit=1.5, valfmt='%1.1f',
valstep=0.1, orientation='vertical')
sld_amp = Slider(slda_ax, label='$a$ [m]', valmin=0.5,
valmax=2.5, valinit=1.0, valfmt='%1.1f',
valstep=0.1, orientation='vertical')
Both sliders have different call-back functions. They use the value of the related slider as an argument and the value of the other slider...