def plot_density(population,  <EOL>bins=<NUM_LIT:100>, new_fig=True, subplot=<NUM_LIT>, levels=None, plane='<STR_LIT>',<EOL>colorlabel='<STR_LIT>', labelfontsize=<NUM_LIT:16>,<EOL>color_map='<STR_LIT>', no_colorbar=False, threshold=<NUM_LIT>,<EOL>neurite_type=NeuriteType.basal_dendrite, **kwargs):
fig, ax = common.get_figure(new_fig=new_fig, subplot=subplot)<EOL>H1, xedges1, yedges1 = extract_density(population, plane=plane, bins=bins,<EOL>neurite_type=neurite_type)<EOL>mask = H1 < threshold  <EOL>H2 = np.ma.masked_array(H1, mask)<EOL>getattr(plt.cm, color_map).set_bad(color='<STR_LIT>', alpha=None)<EOL>plots = ax.contourf((xedges1[:-<NUM_LIT:1>] + xedges1[<NUM_LIT:1>:]) / <NUM_LIT:2>,<EOL>(yedges1[:-<NUM_LIT:1>] + yedges1[<NUM_LIT:1>:]) / <NUM_LIT:2>,<EOL>np.transpose(H2), <EOL>cmap=getattr(plt.cm, color_map), levels=levels)<EOL>if not no_colorbar:<EOL><INDENT>cbar = plt.colorbar(plots)<EOL>cbar.ax.set_ylabel(colorlabel, fontsize=labelfontsize)<EOL><DEDENT>kwargs['<STR_LIT:title>'] = kwargs.get('<STR_LIT:title>', '<STR_LIT>')<EOL>kwargs['<STR_LIT>'] = kwargs.get('<STR_LIT>', plane[<NUM_LIT:0>])<EOL>kwargs['<STR_LIT>'] = kwargs.get('<STR_LIT>', plane[<NUM_LIT:1>])<EOL>return common.plot_style(fig=fig, ax=ax, **kwargs)<EOL>
Plots the 2d histogram of the center
       coordinates of segments in the selected plane.