Report: Latency by Percentile Distribution 70/24370/1
authorTibor Frank <tifrank@cisco.com>
Thu, 16 Jan 2020 12:31:08 +0000 (13:31 +0100)
committerTibor Frank <tifrank@cisco.com>
Thu, 16 Jan 2020 12:31:08 +0000 (13:31 +0100)
- legend

Change-Id: I35477ce5c2cabfdcef68424854a8574bd3655e55
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/tools/presentation/generator_plots.py

index d2cc9c0..4411ac8 100644 (file)
@@ -104,7 +104,7 @@ def plot_lat_hdrh_percentile(plot, input_data):
 
     # 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():
@@ -144,8 +144,13 @@ def plot_lat_hdrh_percentile(plot, input_data):
                             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"
                             )

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.