def plot_delta_m(fignum, B, DM, Bcr, s):
    """
    function to plot Delta M curves

    Parameters
    __________
    fignum : matplotlib figure number
    B : array of field values
    DM : array of difference between top and bottom curves in hysteresis loop
    Bcr : coercivity of remanence
    s : specimen name
    """
    plt.figure(num=fignum)
    plt.clf()
    if not isServer:
        plt.figtext(.02, .01, version_num)
    plt.plot(B, DM, 'b')
    plt.xlabel('B (T)')
    plt.ylabel('Delta M')
    linex = [0, Bcr, Bcr]
    liney = [old_div(DM[0], 2.), old_div(DM[0], 2.), 0]
    plt.plot(linex, liney, 'r')
    plt.title(s)