def imap(imap, vmin=None, vmax=None, cmap='YlGnBu_r', length_unit='cm'):
    """
    Convenience base function to plot any IntensityMap2D instance

    Parameters
    ----------
    ratemap : IntensityMap2D
        Intensity map to plot
    cmap : Colormap or registered colormap name, optional
        Colormap to use for the plot.
    length_unit : string, optional
        The length unit to add to the axis labels. If None, no length unit is
        printed.

    Returns
    -------
    See `IntensityMap2D.plot`.

    """
    axes, cbar = imap.plot(cmap=cmap, vmin=vmin, vmax=vmax,
                           #edgecolor='face',
                           )

    #cbar.solids.set(edgecolor='face')

    range_ = imap.range_
    axes.set(xticks=range_[0], yticks=range_[1])
    if length_unit is None:
        axes.set(xlabel=r"$x$",
                 ylabel=r"$y$")
    else:
        axes.set(xlabel=r"$x \ / \ \mathrm{{{}}}$".format(length_unit),
                 ylabel=r"$y \ / \ \mathrm{{{}}}$".format(length_unit))

    return axes, cbar