def plot_sim_tstep(fig, ax, cell, synapse, grid_electrode, point_electrode, tstep=<NUM_LIT:0>,<EOL>letter='<STR_LIT:a>',title='<STR_LIT>', cbar=True, show_legend=False):
ax.set_title(title)<EOL>if letter != None:<EOL><INDENT>phlp.annotate_subplot(ax, ncols=<NUM_LIT:3>, nrows=<NUM_LIT:1>, letter=letter, linear_offset=<NUM_LIT>, fontsize=<NUM_LIT:16>)<EOL><DEDENT>LFP = grid_electrode.LFP[:, tstep].reshape(X.shape).copy()<EOL>LFP *= <NUM_LIT> <EOL>vlim = <NUM_LIT:50><EOL>levels = np.linspace(-vlim*<NUM_LIT:2>, vlim*<NUM_LIT:2>, <NUM_LIT>)<EOL>cbarticks = np.mgrid[-<NUM_LIT:50>:<NUM_LIT>:<NUM_LIT:20>]<EOL>linestyles = []<EOL>for level in levels:<EOL><INDENT>if analysis_params.bw:<EOL><INDENT>if level > <NUM_LIT:0>:<EOL><INDENT>linestyles.append('<STR_LIT:->')<EOL><DEDENT>elif level == <NUM_LIT:0>:<EOL><INDENT>linestyles.append((<NUM_LIT:0>, (<NUM_LIT:5>, <NUM_LIT:5>)))<EOL><DEDENT>else:<EOL><INDENT>linestyles.append((<NUM_LIT:0>, (<NUM_LIT:1.0>, <NUM_LIT:1.0>)))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if level > <NUM_LIT:0>:<EOL><INDENT>linestyles.append('<STR_LIT:->')<EOL><DEDENT>elif level == <NUM_LIT:0>:<EOL><INDENT>linestyles.append((<NUM_LIT:0>, (<NUM_LIT:5>, <NUM_LIT:5>)))<EOL><DEDENT>else:<EOL><INDENT>linestyles.append('<STR_LIT:->')<EOL><DEDENT><DEDENT><DEDENT>if np.any(LFP != np.zeros(LFP.shape)):<EOL><INDENT>im = ax.contour(X, Z, LFP,<EOL>levels=levels,<EOL>cmap='<STR_LIT>' if analysis_params.bw else '<STR_LIT>',<EOL>vmin=-vlim,<EOL>vmax=vlim,<EOL>linewidths=<NUM_LIT:3>,<EOL>linestyles=linestyles,<EOL>zorder=-<NUM_LIT:2>,<EOL>rasterized=False)<EOL>bbox = np.array(ax.get_position()).flatten()<EOL>if cbar:<EOL><INDENT>cax = fig.add_axes((bbox[<NUM_LIT:2>]-<NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>), frameon=False)<EOL>cbar = fig.colorbar(im, cax=cax, format=FormatStrFormatter('<STR_LIT>'), values=[-vlim, vlim])<EOL>cbar.set_ticks(cbarticks)<EOL>cbar.set_label('<STR_LIT>', labelpad=<NUM_LIT:0>)<EOL>cbar.outline.set_visible(False)<EOL><DEDENT>if show_legend:<EOL><INDENT>proxy = [plt.Line2D((<NUM_LIT:0>,<NUM_LIT:1>),(<NUM_LIT:0>,<NUM_LIT:1>), color='<STR_LIT>' if analysis_params.bw else plt.get_cmap('<STR_LIT>', <NUM_LIT:3>)(<NUM_LIT:2>), ls='<STR_LIT:->', lw=<NUM_LIT:3>),<EOL>plt.Line2D((<NUM_LIT:0>,<NUM_LIT:1>),(<NUM_LIT:0>,<NUM_LIT:1>), color='<STR_LIT>' if analysis_params.bw else plt.get_cmap('<STR_LIT>', <NUM_LIT:3>)(<NUM_LIT:1>), ls=(<NUM_LIT:0>, (<NUM_LIT:5>, <NUM_LIT:5>)), lw=<NUM_LIT:3>),<EOL>plt.Line2D((<NUM_LIT:0>,<NUM_LIT:1>),(<NUM_LIT:0>,<NUM_LIT:1>), color='<STR_LIT>' if analysis_params.bw else plt.get_cmap('<STR_LIT>', <NUM_LIT:3>)(<NUM_LIT:0>), ls=(<NUM_LIT:0>, (<NUM_LIT:1>, <NUM_LIT:1>)), lw=<NUM_LIT:3>), ]<EOL>ax.legend(proxy, [r'<STR_LIT>',<EOL>r'<STR_LIT>',<EOL>r'<STR_LIT>'],<EOL>loc=<NUM_LIT:1>,<EOL>bbox_to_anchor=(<NUM_LIT>, <NUM_LIT:1>),<EOL>fontsize=<NUM_LIT:10>,<EOL>frameon=False)<EOL><DEDENT><DEDENT>zips = []<EOL>for x, z in cell.get_idx_polygons():<EOL><INDENT>zips.append(list(zip(x, z)))<EOL><DEDENT>polycol = PolyCollection(zips,<EOL>edgecolors='<STR_LIT:k>',<EOL>linewidths=<NUM_LIT:0.5>,<EOL>facecolors='<STR_LIT:k>')<EOL>ax.add_collection(polycol)<EOL>ax.plot([<NUM_LIT:100>, <NUM_LIT:200>], [-<NUM_LIT>, -<NUM_LIT>], '<STR_LIT:k>', lw=<NUM_LIT:2>, clip_on=False)<EOL>ax.text(<NUM_LIT>, -<NUM_LIT>, r'<STR_LIT>', va='<STR_LIT>', ha='<STR_LIT>')<EOL>ax.axis('<STR_LIT>')<EOL>ax.plot(cell.xmid[cell.synidx],cell.zmid[cell.synidx], '<STR_LIT:o>', ms=<NUM_LIT:6>,<EOL>markeredgecolor='<STR_LIT:k>',<EOL>markerfacecolor='<STR_LIT:w>' if analysis_params.bw else '<STR_LIT:r>')<EOL>color_vec = ['<STR_LIT:k>' if analysis_params.bw else '<STR_LIT:b>', '<STR_LIT>' if analysis_params.bw else '<STR_LIT:g>']<EOL>for i in range(<NUM_LIT:2>):<EOL><INDENT>ax.plot(point_electrode_parameters['<STR_LIT:x>'][i],<EOL>point_electrode_parameters['<STR_LIT:z>'][i],'<STR_LIT:o>',ms=<NUM_LIT:6>,<EOL>markeredgecolor='<STR_LIT:k>',<EOL>markerfacecolor=color_vec[i])<EOL><DEDENT>bbox = np.array(ax.get_position()).flatten()<EOL>ax1 = fig.add_axes((bbox[<NUM_LIT:0>], bbox[<NUM_LIT:1>], <NUM_LIT>, <NUM_LIT>))<EOL>ax1.plot(cell.tvec,point_electrode.LFP[<NUM_LIT:0>]*<NUM_LIT>,color=color_vec[<NUM_LIT:0>], clip_on=False)<EOL>ax1.plot(cell.tvec,point_electrode.LFP[<NUM_LIT:1>]*<NUM_LIT>,color=color_vec[<NUM_LIT:1>], clip_on=False)<EOL>axis = ax1.axis(ax1.axis('<STR_LIT>'))<EOL>ax1.yaxis.set_major_locator(MaxNLocator(<NUM_LIT:4>))<EOL>ax1.vlines(cell.tvec[tstep], axis[<NUM_LIT:2>], axis[<NUM_LIT:3>], lw=<NUM_LIT>)<EOL>ax1.set_ylabel(r'<STR_LIT>', labelpad=<NUM_LIT:0>) <EOL>ax1.set_xlabel('<STR_LIT>', labelpad=<NUM_LIT:0>)<EOL>for loc, spine in ax1.spines.items():<EOL><INDENT>if loc in ['<STR_LIT:right>', '<STR_LIT>']:<EOL><INDENT>spine.set_color('<STR_LIT:none>')            <EOL><DEDENT><DEDENT>ax1.xaxis.set_ticks_position('<STR_LIT>')<EOL>ax1.yaxis.set_ticks_position('<STR_LIT:left>')<EOL>ax2 = fig.add_axes((bbox[<NUM_LIT:0>], bbox[<NUM_LIT:1>]+<NUM_LIT>, <NUM_LIT>, <NUM_LIT>))<EOL>ax2.plot(cell.tvec,synapse.i*<NUM_LIT>, color='<STR_LIT:k>' if analysis_params.bw else '<STR_LIT:r>',<EOL>clip_on=False)<EOL>axis = ax2.axis(ax2.axis('<STR_LIT>'))<EOL>ax2.yaxis.set_major_locator(MaxNLocator(<NUM_LIT:4>))<EOL>ax2.vlines(cell.tvec[tstep], axis[<NUM_LIT:2>], axis[<NUM_LIT:3>])<EOL>ax2.set_ylabel(r'<STR_LIT>', labelpad=<NUM_LIT:0>) <EOL>for loc, spine in ax2.spines.items():<EOL><INDENT>if loc in ['<STR_LIT:right>', '<STR_LIT>']:<EOL><INDENT>spine.set_color('<STR_LIT:none>')            <EOL><DEDENT><DEDENT>ax2.xaxis.set_ticks_position('<STR_LIT>')<EOL>ax2.yaxis.set_ticks_position('<STR_LIT:left>')<EOL>ax2.set_xticklabels([])<EOL>
create a plot