def plot_correlation(z_vec, x0, x1, ax, lag=<NUM_LIT>, title='<STR_LIT>'):
zvec = np.r_[z_vec]<EOL>zvec = np.r_[zvec, zvec[-<NUM_LIT:1>] + np.diff(zvec)[-<NUM_LIT:1>]]<EOL>xcorr_all=np.zeros((np.size(z_vec), x0.shape[<NUM_LIT:0>]))<EOL>for i, z in enumerate(z_vec):<EOL><INDENT>x2 = x1[i, ]<EOL>xcorr1 = np.correlate(normalize(x0),<EOL>normalize(x2), '<STR_LIT>') / x0.size<EOL>xcorr_all[i,:]=xcorr1  <EOL><DEDENT>vlim = abs(xcorr_all).max()<EOL>vlimround = <NUM_LIT>**np.round(np.log2(vlim))<EOL>yticklabels=[]<EOL>yticks = []<EOL>ylimfound=np.zeros((<NUM_LIT:1>,<NUM_LIT:2>))<EOL>for i, z in enumerate(z_vec):<EOL><INDENT>ind = np.arange(x0.size) - x0.size/<NUM_LIT:2><EOL>ax.plot(ind, xcorr_all[i,::-<NUM_LIT:1>] * <NUM_LIT> / vlimround + z, '<STR_LIT:k>',<EOL>clip_on=True, rasterized=False)<EOL>yticklabels.append('<STR_LIT>' %(i+<NUM_LIT:1>))<EOL>yticks.append(z)    <EOL><DEDENT>remove_axis_junk(ax)<EOL>ax.set_title(title)<EOL>ax.set_xlabel(r'<STR_LIT>')<EOL>ax.set_xlim(-lag, lag)<EOL>ax.set_ylim(z-<NUM_LIT:100>, <NUM_LIT:100>)<EOL>axis = ax.axis()<EOL>ax.vlines(<NUM_LIT:0>, axis[<NUM_LIT:2>], axis[<NUM_LIT:3>], '<STR_LIT:r>', '<STR_LIT>')<EOL>ax.yaxis.set_ticks(yticks)<EOL>ax.yaxis.set_ticklabels(yticklabels)<EOL>ax.xaxis.set_ticks_position('<STR_LIT>')<EOL>ax.yaxis.set_ticks_position('<STR_LIT:left>')<EOL>ax.plot([lag, lag],<EOL>[<NUM_LIT:0>, <NUM_LIT:100>], lw=<NUM_LIT:2>, color='<STR_LIT:k>', clip_on=False)<EOL>ax.text(lag, <NUM_LIT:50>, r'<STR_LIT>' % vlimround,<EOL>rotation='<STR_LIT>', va='<STR_LIT>')<EOL>
mls
    on axes plot the correlation between x0 and x1

    args:
    ::
        x0 : first dataset
        x1 : second dataset - e.g., the multichannel LFP
        ax : matplotlib.axes.AxesSubplot object
        title : text to be used as current axis object title