]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Move success rate plot to separate function
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Fri, 21 Sep 2018 06:20:01 +0000 (08:20 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Fri, 21 Sep 2018 06:20:01 +0000 (08:20 +0200)
gplot.py

index 91ea854fe4216ed0e6713c1d21ed3ce42efb8691..47c956960577c5f8d9672c4b1d02e92b1424443e 100644 (file)
--- a/gplot.py
+++ b/gplot.py
@@ -66,7 +66,7 @@ def count_if_exist(trajectories, what):
             pass
     return occ
 
-if __name__ == "__main__":
+def plot_successrate():
     """Plot success rate of single/multi-core implementations."""
     ALG=["Karaman2011", "Kuwata2008", "LaValle1998"]
     ALGT={"Karaman2011": "RRT*",
@@ -109,3 +109,6 @@ if __name__ == "__main__":
     ax.legend()
 
     plt.show()
+
+if __name__ == "__main__":
+    plot_successrate()