added sig names on rhs, ty maxime

This commit is contained in:
alexmadison 2022-03-08 10:24:42 +01:00
parent a78eec5777
commit 2a4d8c8dee
1 changed files with 8 additions and 0 deletions

View File

@ -54,17 +54,21 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
raise Exception("Unknown colour given. I cba to code up general colours atm.")
# Check if start time given
t0 = None
for arg in argv:
r = re.findall(r'-t0=(\d+)', arg)
if len(r) >= 1:
print(f"Filtering by start time t0 = {r[0]}")
t0 = int[r[0]]
entries = [e for e in entries if int(e[0]) >= int(r[0])]
# Check if end time given
t1 = None
for arg in argv:
r = re.findall(r'-t1=(\d+)', arg)
if len(r) >= 1:
print(f"Filtering by end time t1 = {r[0]}")
t1 = int[r[0]]
entries = [e for e in entries if int(e[0]) <= int(r[0])]
@ -173,8 +177,12 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
# ax.set_ylabel("Signal")
ax.set_yticks([])
# Plot signal names
sig_repeat_period = 20
for sig in unique_sigs:
ax.text(-1, sig_to_index(sig), sig, ha = "right", va = "center", size = 10)
ax.text(num_times, sig_to_index(sig), sig, ha = "left", va = "center", size = 10)
for i in range(num_sigs-1):
ax.axhline(i+0.5, c = "white", lw = 2)