def plot(self, grid=None, size=<NUM_LIT>, limits=None, square=False, center=None, weight=None, weight_stat="<STR_LIT>", figsize=None,<EOL>aspect="<STR_LIT>", f="<STR_LIT>", axes=None, xlabel=None, ylabel=None,<EOL>group_by=None, group_limits=None, group_colors='<STR_LIT>', group_labels=None, group_count=None,<EOL>vmin=None, vmax=None,<EOL>cmap="<STR_LIT>",<EOL>**kwargs):
import pylab<EOL>f = _parse_f(f)<EOL>limits = self.limits(limits)<EOL>if limits is None:<EOL><INDENT>limits = self.limits_sigma()<EOL><DEDENT>if group_limits is None and group_by:<EOL><INDENT>group_limits = tuple(self.df(group_by).minmax()[<NUM_LIT:0>]) + (group_count,)<EOL><DEDENT>if figsize is not None:<EOL><INDENT>pylab.figure(num=None, figsize=figsize, dpi=<NUM_LIT>, facecolor='<STR_LIT:w>', edgecolor='<STR_LIT:k>')<EOL><DEDENT>if axes is None:<EOL><INDENT>axes = pylab.gca()<EOL><DEDENT>fig = pylab.gcf()<EOL>pylab.xlabel(xlabel or self.expressions[<NUM_LIT:0>])<EOL>pylab.ylabel(ylabel or self.expressions[<NUM_LIT:1>])<EOL>rgba8 = self.image_rgba(grid=grid, size=size, limits=limits, square=square, center=center, weight=weight, weight_stat=weight_stat,<EOL>f=f, axes=axes,<EOL>group_by=group_by, group_limits=group_limits, group_colors=group_colors, group_count=group_count,<EOL>vmin=vmin, vmax=vmax,<EOL>cmap=cmap)<EOL>import matplotlib<EOL>if group_by:<EOL><INDENT>if isinstance(group_colors, six.string_types):<EOL><INDENT>group_colors = matplotlib.cm.get_cmap(group_colors)<EOL><DEDENT>if isinstance(group_colors, matplotlib.colors.Colormap):<EOL><INDENT>group_count = group_limits[<NUM_LIT:2>]<EOL>colors = [group_colors(k / float(group_count - <NUM_LIT:1.>)) for k in range(group_count)]<EOL><DEDENT>else:<EOL><INDENT>colors = [matplotlib.colors.colorConverter.to_rgba(k) for k in group_colors]<EOL><DEDENT>colormap = matplotlib.colors.ListedColormap(colors)<EOL>gmin, gmax, group_count = group_limits  <EOL>delta = (gmax - gmin) / (group_count - <NUM_LIT:1.>)<EOL>norm = matplotlib.colors.Normalize(gmin - delta / <NUM_LIT:2>, gmax + delta / <NUM_LIT:2>)<EOL>sm = matplotlib.cm.ScalarMappable(norm, colormap)<EOL>sm.set_array(<NUM_LIT:1>)  <EOL>colorbar = fig.colorbar(sm)<EOL>if group_labels:<EOL><INDENT>colorbar.set_ticks(np.arange(gmin, gmax + delta / <NUM_LIT:2>, delta))<EOL>colorbar.set_ticklabels(group_labels)<EOL><DEDENT>else:<EOL><INDENT>colorbar.set_ticks(np.arange(gmin, gmax + delta / <NUM_LIT:2>, delta))<EOL>colorbar.set_ticklabels(map(lambda x: "<STR_LIT>" % x, np.arange(gmin, gmax + delta / <NUM_LIT:2>, delta)))<EOL><DEDENT>colorbar.ax.set_ylabel(group_by)<EOL>im = axes.imshow(rgba8, extent=np.array(limits).flatten(), origin="<STR_LIT>", aspect=aspect, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>norm = matplotlib.colors.Normalize(<NUM_LIT:0>, <NUM_LIT>)<EOL>sm = matplotlib.cm.ScalarMappable(norm, cmap)<EOL>sm.set_array(<NUM_LIT:1>)  <EOL>colorbar = fig.colorbar(sm)<EOL>im = axes.imshow(rgba8, extent=np.array(limits).flatten(), origin="<STR_LIT>", aspect=aspect, **kwargs)<EOL>colorbar = None<EOL><DEDENT>return im, colorbar<EOL>
Plot the subspace using sane defaults to get a quick look at the data.

        :param grid: A 2d numpy array with the counts, if None it will be calculated using limits provided and Subspace.histogram
        :param size: Passed to Subspace.histogram
        :param limits: Limits for the subspace in the form [[xmin, xmax], [ymin, ymax]], if None it will be calculated using Subspace.limits_sigma
        :param square: argument passed to Subspace.limits_sigma
        :param Executor executor: responsible for executing the tasks
        :param figsize: (x, y) tuple passed to pylab.figure for setting the figure size
        :param aspect: Passed to matplotlib's axes.set_aspect
        :param xlabel: String for label on x axis (may contain latex)
        :param ylabel: Same for y axis
        :param kwargs: extra argument passed to axes.imshow, useful for setting the colormap for instance, e.g. cmap='afmhot'
        :return: matplotlib.image.AxesImage