def glmnetPlot(x, xvar = 'norm', label = False, ptype = 'coef', **options):
    import matplotlib.pyplot as plt

    # process inputs
    xvar = getFromList(xvar, ['norm', 'lambda', 'dev'], 'xvar should be one of ''norm'', ''lambda'', ''dev'' ')    
    ptype = getFromList(ptype, ['coef', '2norm'], 'ptype should be one of ''coef'', ''2norm'' ')    

    if x['class'] in ['elnet', 'lognet', 'coxnet', 'fishnet']:
        handle = plotCoef(x['beta'], [], x['lambdau'], x['df'], x['dev'], 
        label, xvar, '', 'Coefficients', **options)

    elif x['class'] in ['multnet', 'mrelnet']:
        beta = x['beta']
        if xvar == 'norm':
            norm = 0
            nzbeta = beta
            for i in range(len(beta)):
                which = nonzeroCoef(beta[i])
                nzbeta[i] = beta[i][which, :]
                norm = norm + scipy.sum(scipy.absolute(nzbeta[i]), axis = 0)
        else:
            norm = 0