Changeset 8274
- Timestamp:
- 04/24/08 17:02:55
- Files:
-
- gnuradio/trunk/gr-wxgui/src/python/fftsink2.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gnuradio/trunk/gr-wxgui/src/python/fftsink2.py
r7997 r8274 283 283 else: 284 284 self.peak_vals = numpy.maximum(dB, self.peak_vals) 285 dB = self.peak_vals286 285 287 286 if self.fftsink.input_is_real: # only plot 1/2 the points … … 292 291 self._points[:,0] = x_vals 293 292 self._points[:,1] = dB[0:L/2] 293 if self.peak_hold: 294 self._peak_points = numpy.zeros((len(x_vals), 2), numpy.float64) 295 self._peak_points[:,0] = x_vals 296 self._peak_points[:,1] = self.peak_vals[0:L/2] 294 297 else: 295 298 # the "negative freqs" are in the second half of the array … … 300 303 self._points[:,0] = x_vals 301 304 self._points[:,1] = numpy.concatenate ((dB[L/2:], dB[0:L/2])) 302 303 lines = plot.PolyLine (self._points, colour='BLUE') 304 graphics = plot.PlotGraphics ([lines], 305 if self.peak_hold: 306 self._peak_points = numpy.zeros((len(x_vals), 2), numpy.float64) 307 self._peak_points[:,0] = x_vals 308 self._peak_points[:,1] = numpy.concatenate ((self.peak_vals[L/2:], self.peak_vals[0:L/2])) 309 310 lines = [plot.PolyLine (self._points, colour='BLUE'),] 311 if self.peak_hold: 312 lines.append(plot.PolyLine (self._peak_points, colour='GREEN')) 313 314 graphics = plot.PlotGraphics (lines, 305 315 title=self.fftsink.title, 306 316 xLabel = self._units, yLabel = "dB")
