def plot(self,high=None,**options): #make a pseudocolor plot fs=self.frequencies() i=None if high is None else find_index(high,fs) fs=fs[:i] ts=self.times() size=len(fs),len(ts) array=np.zeros(size,dtype=np.float) for j,t in enumerate(ts): spectrum=self.spec_map[t] array[:,j]=spectrum.amps[:i] thinkplot.pcolor(ts,fs,array,**options)
def plot(self, high=None, **options): """Make a pseudocolor plot. high: highest frequency component to plot """ fs = self.frequencies() i = None if high is None else find_index(high, fs) fs = fs[:i] ts = self.times() # make the array size = len(fs), len(ts) array = np.zeros(size, dtype=np.float) # copy amplitude from each spectrum into a column of the array for j, t in enumerate(ts): spectrum = self.spec_map[t] array[:, j] = spectrum.amps[:i] thinkplot.pcolor(ts, fs, array, **options)
def plot(self, low=0, high=None, **options): """Make a pseudocolor plot. low: index of the lowest frequency component to plot high: index of the highest frequency component to plot """ ts = self.times() fs = self.frequencies()[low:high] # make the array size = len(fs), len(ts) array = numpy.zeros(size, dtype=numpy.float) # copy amplitude from each spectrum into a column of the array for i, t in enumerate(ts): spectrum = self.spec_map[t] array[:, i] = spectrum.amps[low:high] thinkplot.pcolor(ts, fs, array, **options)
def plot(self, low=0, high=None, **options): """Make a pseudocolor plot. low: index of the lowest frequency component to plot high: index of the highest frequency component to plot """ ts = self.times() fs = self.frequencies()[low:high] # make the array size = len(fs), len(ts) array = numpy.zeros(size, dtype=numpy.float) # copy amplitude from each spectrum into a column of the array for i, t in enumerate(ts): spectrum = self.spec_map[t] array[:,i] = spectrum.amps[low:high] thinkplot.pcolor(ts, fs, array, **options)