Showing specific values in an STFT plot
Use matplotlib.pyplot's axis() function as follows:
# show section based on bandpass filter cut-off frequencies
plt.title(&quot;Zoomed Short Term Fourier Transform&quot;)
plt.xlabel(&quot;Time (s)&quot;)
plt.ylabel(&quot;Frequency Magnitude&quot;)
plt.pcolormesh(self.segment_times, self.sample_freq, self.abs_stft, shading='gouraud')
plt.axis([self.segment_times[0], self.segment_times[-1], high_pass, low_pass])

plt.show()

where high_pass and low_pass are the frequency cut-offs within which you want to display the y-axis data.