def plot_raster(self, ax, xlim, x, y, pop_names=False,<EOL>markersize=<NUM_LIT>, alpha=<NUM_LIT:1.>, legend=True,<EOL>marker='<STR_LIT:o>', rasterized=True):
yoffset = [sum(self.N_X) if X=='<STR_LIT>' else <NUM_LIT:0> for X in self.X]<EOL>for i, X in enumerate(self.X):<EOL><INDENT>if y[X].size > <NUM_LIT:0>:<EOL><INDENT>ax.plot(x[X], y[X]+yoffset[i], marker,<EOL>markersize=markersize,<EOL>mfc=self.colors[i],<EOL>mec='<STR_LIT:none>' if marker in '<STR_LIT>' else self.colors[i],<EOL>alpha=alpha,<EOL>label=X, rasterized=rasterized,<EOL>clip_on=True)<EOL><DEDENT><DEDENT>N_X_sum = <NUM_LIT:0><EOL>for i, X in enumerate(self.X):<EOL><INDENT>if y[X].size > <NUM_LIT:0>:<EOL><INDENT>N_X_sum += self.N_X[i]<EOL><DEDENT><DEDENT>ax.axis([xlim[<NUM_LIT:0>], xlim[<NUM_LIT:1>],<EOL>self.GIDs[self.X[<NUM_LIT:0>]][<NUM_LIT:0>], self.GIDs[self.X[<NUM_LIT:0>]][<NUM_LIT:0>]+N_X_sum])<EOL>ax.set_ylim(ax.get_ylim()[::-<NUM_LIT:1>])<EOL>ax.set_ylabel('<STR_LIT>', labelpad=<NUM_LIT:0>)<EOL>ax.set_xlabel('<STR_LIT>', labelpad=<NUM_LIT:0>)<EOL>if legend:<EOL><INDENT>ax.legend()<EOL><DEDENT>if pop_names:<EOL><INDENT>yticks = []<EOL>yticklabels = []<EOL>for i, X in enumerate(self.X):<EOL><INDENT>if y[X] != []:<EOL><INDENT>yticks.append(y[X].mean()+yoffset[i])<EOL>yticklabels.append(self.X[i])<EOL><DEDENT><DEDENT>ax.set_yticks(yticks)<EOL>ax.set_yticklabels(yticklabels)<EOL><DEDENT>for i, X in enumerate(self.X):<EOL><INDENT>if y[X].size > <NUM_LIT:0>:<EOL><INDENT>ax.plot([xlim[<NUM_LIT:0>], xlim[<NUM_LIT:1>]],<EOL>[y[X].max()+yoffset[i], y[X].max()+yoffset[i]],<EOL>'<STR_LIT:k>', lw=<NUM_LIT>)<EOL><DEDENT><DEDENT>
Plot network raster plot in subplot object.


Parameters
----------
ax : `matplotlib.axes.AxesSubplot` object
    plot axes
xlim : list
    List of floats. Spike time interval, e.g., [0., 1000.].
x : dict
    Key-value entries are population name and neuron spike times.
y : dict
    Key-value entries are population name and neuron gid number.
pop_names: bool
    If True, show population names on yaxis instead of gid number.
markersize : float
    raster plot marker size
alpha : float in [0, 1]
    transparency of marker
legend : bool
    Switch on axes legends.
marker : str
    marker symbol for matplotlib.pyplot.plot
rasterized : bool
    if True, the scatter plot will be treated as a bitmap embedded in
    pdf file output


Returns
-------
None