MCPcopy Create free account
hub / github.com/PJLab-ADG/OASim / plot_ttc_version_1

Function plot_ttc_version_1

limsim/evaluation/ttc_test.py:11–30  ·  view source on GitHub ↗
(ttc_statistics)

Source from the content-addressed store, hash-verified

9
10
11def plot_ttc_version_1(ttc_statistics) -> None:
12 plt.figure(figsize=(40, 4))
13 # fig, ax = plt.subplots()
14 # ax.spines['top'].set_visible(False)
15 # ax.spines['right'].set_visible(False)
16 font1 = {'family': 'fantasy', 'size': 20}
17
18 x, y = ttc_statistics[:, 0], ttc_statistics[:, 1]
19 # ttc_statistics[:, 1] = np.minimum(ttc_statistics[:, 1], 10)
20 plt.plot(x, y, linewidth=2, color="#70a1ff")
21 plt.xlabel("Timestamp", fontdict=font1)
22 plt.ylabel("TTC (s)", fontdict=font1)
23 plt.ylim([0, 10.1])
24 x_ticks = [2500, 2700, 2800, 3000, 3500, 4000, 4500, 5000]
25 plt.xticks(x_ticks, fontsize=16)
26 y_ticks = [0, 2, 4, 6, 8, 10]
27 y_labels = ['0', '2', '4', '6', '8', '10+']
28 plt.yticks(y_ticks, y_labels, fontsize=16)
29 # plt.grid("on")
30 plt.show()
31
32
33def plot_ttc_version_2(ttc_statistics) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected