NGL remd fog
[django_unres.git] / files / matplotlib_hist.py
index 2c54ebe..168195b 100755 (executable)
@@ -22,7 +22,7 @@ else:
 hall,binall=np.histogram(y,bins=40,density=False)
 
 plt.xlim(min(binall), max(binall[hall>4]))
-plt.ylim(0,max(hall)/4)
+#plt.ylim(0,max(hall)/4)
 plt.ylabel('number of samples')
 plt.xlabel('potential energy [kcal/mol]')
 
@@ -34,7 +34,7 @@ Tremd=map(float,sys.argv[1].split())
 colors = cm.rainbow(np.linspace(0, 1, len(Tremd)))
 for T,c in zip(Tremd,colors):
  yt=y[x==T]
- h,bin=np.histogram(yt,bins=40,density=False)
+ h,bin=np.histogram(yt,bins=40,range=(min(binall),max(binall[hall>4])),density=False)
  center = (bin[:-1] + bin[1:]) / 2
  plt.plot(center,h,'-',color=c)
 # plt.bar(bin[:-1], h, width = bin[2]-bin[1],color=c)
@@ -62,7 +62,9 @@ plt.ylabel('bath temperature [K]')
 plt.xlabel('step*replica')
 
 replica=range(int(sys.argv[2]))
-colors = cm.rainbow(np.linspace(0, 1, len(replica)))
+#colors = cm.rainbow(np.linspace(0, 1, len(replica)))
+cmap = plt.get_cmap('hot')
+colors = cmap(np.linspace(0, 1, len(replica)*1.4))
 for i,c in zip(replica,colors):
  yt=x0[r0==i]
  xt=(s0+r0*max(s0))[r0==i]