Ejemplo n.º 1
0
    else:
        seed = fpat.search(doc)
        if seed:
            leg = str(seed.group('nom'))
        else:
            leg = ''
    f = open(doc, 'r')
    line = f.readlines()[1]
    f.close()
    msd = np.array(re.split(r'\s+', line)[1:-1], dtype=float)
    x = np.arange(0, len(msd)) * dt
    if (args.mp or args.eps != 'noeps' or args.xg):
        if (args.mp or args.eps != 'noeps'):
            graf.plot(x, msd, color=colo[tiq], label=leg)
        if args.xg:
            df = xg.Data(x=x, y=msd, symbol=s1, line=l1)

if (args.mp or args.eps != 'noeps'):
    graf.set_xlabel(args.xlabel)
    graf.set_ylabel(args.ylabel)
    if args.yaxis:
        graf.set_ylim(args.yaxis)
    if args.xaxis:
        graf.set_xlim(args.xaxis)
    if (args.scale == 'logx' or args.scale == 'logxy'):
        graf.set_xscale('log')
    if (args.scale == 'logy' or args.scale == 'logxy'):
        graf.set_yscale('log')
    fig.suptitle(args.title)
    graf.grid(True)
    graf.legend(loc='best',
Ejemplo n.º 2
0
                                          y - eror,
                                          y + eror,
                                          alpha=args.shade,
                                          facecolor=colo[colcount],
                                          edgecolor='k',
                                          linewidth=0)
                if args.xg:
                    df = xg.DataXYDY(x=x, y=y, dy=eror, symbol=s1, line=l1)
            else:
                if (args.mp or args.eps != 'noeps'):
                    graf.plot(x,
                              data[:, int(cc)],
                              color=colo[colcount],
                              label=leg[i])
                if args.xg:
                    df = xg.Data(x=x, y=data[:, int(cc)], symbol=s1, line=l1)
            colcount += 1

if (args.mp or args.eps != 'noeps'):
    graf.set_xlabel(xlab)
    graf.set_ylabel(args.ylabel)
    if args.yaxis:
        graf.set_ylim(args.yaxis)
    if args.xaxis:
        graf.set_xlim(args.xaxis)
    if (args.scale == 'logx' or args.scale == 'logxy'):
        graf.set_xscale('log')
    if (args.scale == 'logy' or args.scale == 'logxy'):
        graf.set_yscale('log')
    fig.suptitle(args.title)
    graf.grid(True)
Ejemplo n.º 3
0
        if seed:
            leg = str(seed.group('nom'))
        else:
            leg = ''
    f = open(doc, 'r')
    lines = f.readlines()
    f.close()
    params = np.array(re.split(r'\s+', lines[0])[1:-1], dtype=float)
    gdr = np.append(np.zeros(int(params[1])),
                    np.array(re.split(r'\s+', lines[1])[1:-1], dtype=float))
    x = np.arange(0, (params[2] + 1) * params[0], params[0])
    if (args.mp or args.eps != 'noeps' or args.xg):
        if (args.mp or args.eps != 'noeps'):
            graf.plot(x, gdr, color=colo[tiq], label=leg)
        if args.xg:
            df = xg.Data(x=x, y=gdr, symbol=s1, line=l1)

if (args.mp or args.eps != 'noeps'):
    graf.set_xlabel(args.xlabel)
    graf.set_ylabel(args.ylabel)
    if args.yaxis:
        graf.set_ylim(args.yaxis)
    if args.xaxis:
        graf.set_xlim(args.xaxis)
    if (args.scale == 'logx' or args.scale == 'logxy'):
        graf.set_xscale('log')
    if (args.scale == 'logy' or args.scale == 'logxy'):
        graf.set_yscale('log')
    fig.suptitle(args.title)
    graf.grid(True)
    graf.legend(loc='best',