# Prepare the data for the plot
directions = [u"W-E", u"E-W"]
- for test in data[0][0]:
+ for color, test in enumerate(data[0][0]):
try:
if test[u"type"] in (u"NDRPDR",):
if u"-pdr" in plot_title.lower():
continue
name = re.sub(REGEX_NIC, u"", test[u"parent"].
replace(u'-ndrpdr', u'').
- replace(u'2n1l-', u'').
- replace(u'avf-', u''))
+ replace(u'2n1l-', u''))
for idx, direction in enumerate(
(u"direction1", u"direction2", )):
try:
plgo.Scatter(
x=xaxis,
y=yaxis,
- name=f"{name} ({directions[idx]})",
+ name=name,
mode=u"lines",
+ legendgroup=name,
+ showlegend=bool(idx),
+ line=dict(
+ color=COLORS[color]
+ ),
hovertext=hovertext,
hoverinfo=u"text"
)