I have applied following codes to create spectogram plot
from scipy import signal import matplotlib.pyplot as plt import numpy as np # Define the signal Fs = 1e4