def make_plot(self):
args = self.args<EOL>fftlength = float(args.secpfft)<EOL>overlap = args.overlap<EOL>self.log(<NUM_LIT:2>, "<STR_LIT>" %<EOL>(fftlength, overlap))<EOL>if overlap is not None:<EOL><INDENT>overlap *= fftlength<EOL><DEDENT>self.log(<NUM_LIT:3>, '<STR_LIT>' + self.ref_chan)<EOL>groups = OrderedDict()<EOL>for series in self.timeseries:<EOL><INDENT>seg = series.span<EOL>try:<EOL><INDENT>groups[seg][series.channel.name] = series<EOL><DEDENT>except KeyError:<EOL><INDENT>groups[seg] = OrderedDict()<EOL>groups[seg][series.channel.name] = series<EOL><DEDENT><DEDENT>plot = Plot(figsize=self.figsize, dpi=self.dpi)<EOL>ax = plot.gca()<EOL>self.spectra = []<EOL>for seg in groups:<EOL><INDENT>refts = groups[seg].pop(self.ref_chan)<EOL>for name in groups[seg]:<EOL><INDENT>series = groups[seg][name]<EOL>coh = series.coherence(refts, fftlength=fftlength,<EOL>overlap=overlap, window=args.window)<EOL>label = name<EOL>if len(self.start_list) > <NUM_LIT:1>:<EOL><INDENT>label += '<STR_LIT>'.format(series.epoch.gps)<EOL><DEDENT>if self.usetex:<EOL><INDENT>label = label_to_latex(label)<EOL><DEDENT>ax.plot(coh, label=label)<EOL>self.spectra.append(coh)<EOL><DEDENT><DEDENT>if args.xscale == '<STR_LIT>' and not args.xmin:<EOL><INDENT>args.xmin = <NUM_LIT:1>/fftlength<EOL><DEDENT>return plot<EOL>
Generate the coherence plot from all time series