I am trying to plot from these 2 sets of data. This is working, except the color. I am trying to match the colors of ufiles and dfiles, so that line from ufile[1] and dfiles[1] will have same color.
How I can get that?
#!/usr/bin/env python3
# import np
import pylab
ufiles = ["dos_u_Co.dat", "dos_u_Fe.dat", "dos_u_Re.dat", "dos_u_tot.dat"]
dfiles = ["dos_d_Co.dat", "dos_d_Fe.dat", "dos_d_Re.dat", "dos_d_tot.dat"]
colors = ('b', 'g', 'r','c')
datalist = [ ( pylab.loadtxt(filename)) for filename in ufiles ]
for data in datalist:
pylab.plot( data[:,0], data[:,1], label=datalist)
datalist = [ ( pylab.loadtxt(filename)) for filename in dfiles ]
for data in datalist:
pylab.plot( data[:,0], -1*data[:,1], label=datalist)
pylab.show()