def mem_quiver(datax, datay, ax, cells, p, cmap=None):
    """
    Sets up a quiver plot for membrane vectors with tail at cell centres.

    Parameters
    -----------

    datax, datay    Data vectors defined on membrane midpoints
    cells           Instance of cells module
    p               Instance of parameters module
    ax              Existing figure axis to plot currents on

    Returns
    --------
    mvects             Container for quiver plot
    ax                  Modified axis

    """
    scaleval = p.um * p.wsx * 0.8
    mvects = ax.quiver(cells.cell_centres[:, (0)][cells.mem_to_cells] * p.
        um, cells.cell_centres[:, (1)][cells.mem_to_cells] * p.um, datax *
        cells.R[cells.mem_to_cells] * p.um, datay * cells.R[cells.
        mem_to_cells] * p.um, scale=scaleval, color=p.vcolor, cmap=cmap)
    ax.axis('equal')
    ax.axis([cells.xmin * p.um, cells.xmax * p.um, cells.ymin * p.um, cells
        .ymax * p.um])
    return mvects, ax
