def multi_trace_plot(traces, corr=True, stack='<STR_LIT>', size=(<NUM_LIT:7>, <NUM_LIT:12>),<EOL>**kwargs):
import matplotlib.pyplot as plt<EOL>from eqcorrscan.core.match_filter import normxcorr2<EOL>n_axes = len(traces)<EOL>if stack in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>n_axes += <NUM_LIT:1><EOL><DEDENT>fig, axes = plt.subplots(n_axes, <NUM_LIT:1>, sharex=True, figsize=size)<EOL>if len(traces) > <NUM_LIT:1>:<EOL><INDENT>axes = axes.ravel()<EOL><DEDENT>traces = [(trace, trace.stats.starttime.datetime) for trace in traces]<EOL>traces.sort(key=lambda tup: tup[<NUM_LIT:1>])<EOL>traces = [trace[<NUM_LIT:0>] for trace in traces]<EOL>for i, tr in enumerate(traces):<EOL><INDENT>y = tr.data<EOL>x = np.arange(len(y))<EOL>x = x / tr.stats.sampling_rate  <EOL>if not stack:<EOL><INDENT>ind = i<EOL><DEDENT>else:<EOL><INDENT>ind = i + <NUM_LIT:1><EOL><DEDENT>axes[ind].plot(x, y, '<STR_LIT:k>', linewidth=<NUM_LIT>)<EOL>axes[ind].yaxis.set_ticks([])<EOL><DEDENT>traces = [Stream(trace) for trace in traces]<EOL>if stack == '<STR_LIT>':<EOL><INDENT>stacked = PWS_stack(traces)<EOL><DEDENT>elif stack == '<STR_LIT>':<EOL><INDENT>stacked = linstack(traces)<EOL><DEDENT>if stack in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>tr = stacked[<NUM_LIT:0>]<EOL>y = tr.data<EOL>x = np.arange(len(y))<EOL>x = x / tr.stats.sampling_rate<EOL>axes[<NUM_LIT:0>].plot(x, y, '<STR_LIT:r>', linewidth=<NUM_LIT>)<EOL>axes[<NUM_LIT:0>].set_ylabel('<STR_LIT>', rotation=<NUM_LIT:0>)<EOL>axes[<NUM_LIT:0>].yaxis.set_ticks([])<EOL><DEDENT>for i, slave in enumerate(traces):<EOL><INDENT>if corr:<EOL><INDENT>cc = normxcorr2(tr.data, slave[<NUM_LIT:0>].data)<EOL><DEDENT>if not stack:<EOL><INDENT>ind = i<EOL><DEDENT>else:<EOL><INDENT>ind = i + <NUM_LIT:1><EOL><DEDENT>if corr:<EOL><INDENT>axes[ind].set_ylabel('<STR_LIT>' + str(round(np.max(cc), <NUM_LIT:2>)), rotation=<NUM_LIT:0>)<EOL><DEDENT>axes[ind].text(<NUM_LIT>, <NUM_LIT>, str(round(np.max(slave[<NUM_LIT:0>].data))),<EOL>bbox=dict(facecolor='<STR_LIT>', alpha=<NUM_LIT>),<EOL>transform=axes[ind].transAxes)<EOL>axes[ind].text(<NUM_LIT>, <NUM_LIT>, slave[<NUM_LIT:0>].stats.starttime.datetime.<EOL>strftime('<STR_LIT>'),<EOL>bbox=dict(facecolor='<STR_LIT>', alpha=<NUM_LIT>),<EOL>transform=axes[ind].transAxes)<EOL><DEDENT>axes[-<NUM_LIT:1>].set_xlabel('<STR_LIT>')<EOL>fig = _finalise_figure(fig=fig, **kwargs)  <EOL>return fig<EOL>
Plot multiple traces (usually from the same station) on the same plot.

Differs somewhat to obspy's stream.plot in that only relative time within
traces is worried about, it will not merge traces together.

:type traces: list
:param traces: List of obspy.core.Trace
:type corr: bool
:param corr:
    To calculate the correlation or not, if True, will add this to the
    axes
:type stack: str
:param stack:
    To plot the stack as the first trace or not, select type of
     stack: 'linstack' or 'PWS', or None.
:type size: tuple
:param size: Size of figure.