From 676912b664d0157b82740998cc25ed5b9ae1b4e8 Mon Sep 17 00:00:00 2001
From: Menardo Fabrizio <fabrizio.menardo@unibas.ch>
Date: Fri, 12 Jan 2018 09:35:57 +0100
Subject: [PATCH] call plot only if stop = 0

---
 Treemmer.py | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/Treemmer.py b/Treemmer.py
index 176f378..d54ebed 100644
--- a/Treemmer.py
+++ b/Treemmer.py
@@ -17,7 +17,7 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-# You have to install ete3 http://etetoolkit.org/download/
+# You have to install ete3 http://etetoolkit.org/
 # and joblib https://pythonhosted.org/joblib/ to run Treemmer
 
 
@@ -399,19 +399,19 @@ if stop == 0:														# create file for plot of rltd
 
 
 #################################################  make plot  directly ##########################################################
-if not arguments.no_plot:
-	import numpy as np
-	import matplotlib.pyplot as plt
-	from matplotlib.ticker import MaxNLocator
-	ax = plt.figure().gca()
-	ax.xaxis.set_major_locator(MaxNLocator(integer=True))	
-	plt.scatter(x, y, s= 2, c= 'black')
-	plt.xlim(ori_length,0)
-	plt.ylim(-0.02,1.02)
-	plt.xlabel('Number of leaves')
-	plt.ylabel('Relative tree length')
-	#plt.savefig(arguments.INFILE+'_res_'+ str(arguments.resolution)+'_TLD.png')
-	plt.savefig(arguments.INFILE+'_res_'+ str(arguments.resolution)+'_TLD.pdf')			
+	if not arguments.no_plot:
+		import numpy as np
+		import matplotlib.pyplot as plt
+		from matplotlib.ticker import MaxNLocator
+		ax = plt.figure().gca()
+		ax.xaxis.set_major_locator(MaxNLocator(integer=True))	
+		plt.scatter(x, y, s= 2, c= 'black')
+		plt.xlim(ori_length,0)
+		plt.ylim(-0.02,1.02)
+		plt.xlabel('Number of leaves')
+		plt.ylabel('Relative tree length')
+		#plt.savefig(arguments.INFILE+'_res_'+ str(arguments.resolution)+'_TLD.png')
+		plt.savefig(arguments.INFILE+'_res_'+ str(arguments.resolution)+'_TLD.pdf')			
 
 
 
-- 
GitLab