return trajectories
def gplot():
- """Plot graph."""
+ """Plot graph. Template."""
plt.rcParams["font.size"] = 24
fig = plt.figure()
ax = fig.add_subplot(111)
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 = {}