tforest преди 5 месеца
родител
ревизия
23fef174f2
променени са 1 файла, в които са добавени 13 реда и са изтрити 15 реда
  1. 13 15
      swp2.py

+ 13 - 15
swp2.py Целия файл

288
         plt.title(title)
288
         plt.title(title)
289
         plt.savefig(title+'_b'+str(breaks)+'.pdf')
289
         plt.savefig(title+'_b'+str(breaks)+'.pdf')
290
     # plot likelihood against nb of breakpoints
290
     # plot likelihood against nb of breakpoints
291
-
292
     # best possible likelihood from SFS
291
     # best possible likelihood from SFS
293
     # Segregating sites
292
     # Segregating sites
294
     S = sum(SFS_stored)
293
     S = sum(SFS_stored)
390
         for i in range(0, len(x)):
389
         for i in range(0, len(x)):
391
             T += y[i] / (x[i]*(x[i]-1))
390
             T += y[i] / (x[i]*(x[i]-1))
392
             x_2.append(T)
391
             x_2.append(T)
393
-    # Plotting (fig 2)
394
-    plt.plot(x_2, y, 'o', linestyle="dotted", alpha=0.75, lw=2, label = str(epoch)+' brks')
395
-    plt.xlabel("# breaks")
396
-    plt.ylabel("theta")
397
-    plt.legend(loc='upper right')
398
-    plt.savefig(title+'_test'+str(k)+'.pdf')
399
-
400
-    # Plotting (fig 3) which is the same but log scale for x
401
-    plt.plot(x_2, y, 'o', linestyle="dotted", alpha=0.75, lw=2, label = str(epoch)+' brks')
402
-    plt.xscale('log')
403
-    plt.xlabel("# breaks")
404
-    plt.ylabel("theta")
405
-    plt.legend(loc='upper right')
406
-    plt.savefig(title+'_test'+str(k)+'_log.pdf')
392
+        # Plotting (fig 2)
393
+        plt.plot(x_2, y, 'o', linestyle="dotted", alpha=0.75, lw=2, label = str(epoch)+' brks')
394
+        plt.xlabel("# breaks")
395
+        plt.ylabel("theta")
396
+        plt.legend(loc='upper right')
397
+        plt.savefig(title+'_test'+str(k)+'.pdf')
398
+        # Plotting (fig 3) which is the same but log scale for x
399
+        plt.plot(x_2, y, 'o', linestyle="dotted", alpha=0.75, lw=2, label = str(epoch)+' brks')
400
+        plt.xscale('log')
401
+        plt.xlabel("# breaks")
402
+        plt.ylabel("theta")
403
+        plt.legend(loc='upper right')
404
+        plt.savefig(title+'_test'+str(k)+'_log.pdf')
407
 
405
 
408
 def save_multi_image(filename):
406
 def save_multi_image(filename):
409
     pp = PdfPages(filename)
407
     pp = PdfPages(filename)