packages = ["numpy", "matplotlib"]

Plot sum of harmonics

This page is an example of using PyScript to plot the sum of the first N harmonics of the harmonic series of either a sawtooth, triangular, or square wave.

Plot settings (wait for plot to load)

Matplotlib plot