]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Remove unused functions
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Fri, 21 Dec 2018 08:22:55 +0000 (09:22 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Fri, 21 Dec 2018 08:56:35 +0000 (09:56 +0100)
gplot.py

index 10cf3722b6a89bff93c817beefd5de8a68758e1e..c5c46519227164e2918016d8334aed95d750f709 100644 (file)
--- a/gplot.py
+++ b/gplot.py
@@ -41,7 +41,7 @@ def load_trajectories(dname):
     return trajectories
 
 def gplot():
-    """Plot graph."""
+    """Plot graph. Template."""
     plt.rcParams["font.size"] = 24
     fig = plt.figure()
     ax = fig.add_subplot(111)
@@ -107,68 +107,6 @@ def get_maxs_if_exist(trajectories, what):
             pass
     return val
 
-def plot_successrate():
-    """Plot success rate of single/multi-core implementations."""
-
-    r={}
-    for sf in LOGSF:
-        r["{}".format(LEG[sf])] = load_trajectories("{}/{}".format(LOGF, sf))
-
-    v={}
-    for a in r.keys():
-        v[a] = (100 * count_if_exist(r[a], "traj") /
-                count_if_exist(r[a], "elap"))
-    vs = sorted(v.items(), key=lambda kv: kv[1])
-
-    plt.rcParams["font.size"] = 24
-    fig = plt.figure()
-    ax = fig.add_subplot(111)
-    ax.set_title("Success rate of trajectories found within 10 seconds limit")
-
-    ax.set_ylabel("Framework tested [-]")
-    ax.set_xlabel("Found successfully [%]")
-    ax.set_xlim(0, 100)
-    ax.set_yticklabels([])
-    j = 0
-    for (k, i) in vs:
-        print("{}: {}%".format(k, i))
-        ax.barh(j, float(i), 4, label=k)
-        j += -5
-    ax.legend()
-
-    plt.show()
-
-def plot_mintrajcost():
-    """Plot minimum trajectory cost found."""
-
-    r={}
-    for a in ALG:
-        for st in ST:
-            for co in CO:
-                r["{}, {}, {}".format(ALGT[a], STT[st], COT[co])] = (
-                        load_trajectories("{}/{}st{}co{}_lpar".format(
-                            LOGF, a, st, co)))
-
-    v={}
-    for a in r.keys():
-        v[a] = get_lasts_if_exist(r[a], "cost")
-
-    #plt.rcParams["font.size"] = 24
-    fig = plt.figure()
-    for i in range(len(r.keys())):
-        ax = fig.add_subplot(3, 1, i + 1)
-        ax.set_title("Minimum trajectory cost found in 10 seconds (sequential)")
-
-        ax.set_ylabel("Framework tested [-]")
-        ax.set_xlabel("Minimum trajectory cost [m]")
-        #ax.set_yticklabels([])
-
-        plt.bar(range(len(v[r.keys()[i]])), v[r.keys()[i]], label=r.keys()[i])
-
-        ax.legend()
-    plt.show()
-    return
-
 def plot_costdist():
     """Plot distribution of last costs across measured tests."""
     v = {}