import matplotlib.pyplot as plt
import mpld3
mpld3.enable_notebook()
Let's try an example:
import numpy as np
dur, amp, freq, fs = 0.5, 0.3, 500, 44100
t = np.arange(np.ceil(dur * fs)) / fs
y = amp * np.sin(2 * np.pi * freq * t)
len(y)
22050
plt.plot(y)
plt.ylim(-0.5, 0.5);
We can't really see anything at first, but notice the zoom-symbol when you hover over the plot?
Now you can zoom in at your heart's content and inspect the very exciting sine wave.
There seems to be maximum supported length (at 32768 elements, see https://github.com/jakevdp/mpld3/issues/270).
But for large datasets this gets very un-responsive, anyway.
And the notebook file gets really big!