Buttons Constructing a simple button GUI to modify a sine wave. The next and previous button widget helps visualize the wave with new frequencies. import matplotlib.pyplot as plt import numpy as np from matplotlib.widgets import