code: def make_plot(self):
          
          args = self.args
  
          fftlength = float(args.secpfft)
          overlap = args.overlap
          self.log(2, "Calculating spectrum secpfft: %s, overlap: %s" %
                   (fftlength, overlap))
          if overlap is not None:
              overlap *= fftlength
  
          self.log(3, 'Reference channel: ' + self.ref_chan)
  
          # group data by segment
          groups = OrderedDict()
          for series in self.timeseries:
              seg = series.span
              try:
                  groups[seg][series.channel.name] = series
              except KeyError:
                  groups[seg] = OrderedDict()
                  groups[seg][series.channel.name] = series
  
          # -- plot
  
          plot = Plot(figsize=self.figsize, dpi=self.dpi)
          ax = plot.gca()
          self.spectra = []
  
          # calculate coherence
          for seg in groups:
              refts = groups[seg].pop(self.ref_chan)
              for name in groups[seg]:
                  series = groups[seg][name]
                  coh = series.coherence(refts, fftlength=fftlength,
                                         overlap=overlap, window=args.window)
  
                  label = name
                  if len(self.start_list) > 1:
                      label += ', {0}'.format(series.epoch.gps)
                  if self.usetex:
                      label = label_to_latex(label)
  
                  ax.plot(coh, label=label)
                  self.spectra.append(coh)
  
          if args.xscale == 'log' and not args.xmin:
              args.xmin = 1/fftlength
  
          return plot
docs: Generate the coherence plot from all time series