aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-06-19 10:46:42 +0200
committerTibor Frank <tifrank@cisco.com>2018-06-19 14:03:59 +0200
commit67c6fbcb8c531d1013ee4cc866e6743589a90ba2 (patch)
tree9bfc9cb2d862f28755073239f035248fe583824d /resources
parent0c2c57d9965ab1db0d5404ad103871ac250339cb (diff)
CSIT-1133: Cosmetic improvements in trending plots
- Remove "outlier" from the colorbar - Remove anomalies from the legend Change-Id: Idd3255d912c48c80347a773a6b19307e90a53926 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/tools/presentation/generator_CPTA.py6
-rw-r--r--resources/tools/presentation/new/generator_CPTA.py29
2 files changed, 18 insertions, 17 deletions
diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py
index c996aca0bd..40fed8be78 100644
--- a/resources/tools/presentation/generator_CPTA.py
+++ b/resources/tools/presentation/generator_CPTA.py
@@ -163,8 +163,9 @@ def _generate_trending_traces(in_data, job_name, build_info, moving_win_size=10,
line={
"width": 1
},
+ showlegend=True,
legendgroup=name,
- name="{name}-thput".format(name=name),
+ name="{name}".format(name=name),
marker={
"size": 5,
"color": color,
@@ -180,7 +181,7 @@ def _generate_trending_traces(in_data, job_name, build_info, moving_win_size=10,
y=anomalies.values,
mode='markers',
hoverinfo="none",
- showlegend=True,
+ showlegend=False,
legendgroup=name,
name="{name}-anomalies".format(name=name),
marker={
@@ -231,6 +232,7 @@ def _generate_trending_traces(in_data, job_name, build_info, moving_win_size=10,
"width": 1,
"color": color,
},
+ showlegend=False,
legendgroup=name,
name='{name}-trend'.format(name=name)
)
diff --git a/resources/tools/presentation/new/generator_CPTA.py b/resources/tools/presentation/new/generator_CPTA.py
index 4dc5e6f57a..d4ac06d09f 100644
--- a/resources/tools/presentation/new/generator_CPTA.py
+++ b/resources/tools/presentation/new/generator_CPTA.py
@@ -136,9 +136,8 @@ def _generate_trending_traces(in_data, job_name, build_info,
anomalies_colors = list()
anomalies_avgs = list()
anomaly_color = {
- "outlier": 0.0,
- "regression": 0.33,
- "normal": 0.66,
+ "regression": 0.0,
+ "normal": 0.5,
"progression": 1.0
}
if anomaly_classification:
@@ -150,7 +149,7 @@ def _generate_trending_traces(in_data, job_name, build_info,
anomalies_colors.append(
anomaly_color[anomaly_classification[idx]])
anomalies_avgs.append(avgs[idx])
- anomalies_colors.extend([0.0, 0.33, 0.66, 1.0])
+ anomalies_colors.extend([0.0, 0.5, 1.0])
# Create traces
@@ -161,8 +160,9 @@ def _generate_trending_traces(in_data, job_name, build_info,
line={
"width": 1
},
+ showlegend=True,
legendgroup=name,
- name="{name}-thput".format(name=name),
+ name="{name}".format(name=name),
marker={
"size": 5,
"color": color,
@@ -183,6 +183,7 @@ def _generate_trending_traces(in_data, job_name, build_info,
"width": 1,
"color": color,
},
+ showlegend=False,
legendgroup=name,
name='{name}-trend'.format(name=name)
)
@@ -193,20 +194,18 @@ def _generate_trending_traces(in_data, job_name, build_info,
y=anomalies_avgs,
mode='markers',
hoverinfo="none",
- showlegend=True,
+ showlegend=False,
legendgroup=name,
name="{name}-anomalies".format(name=name),
marker={
"size": 15,
"symbol": "circle-open",
"color": anomalies_colors,
- "colorscale": [[0.00, "grey"],
- [0.25, "grey"],
- [0.25, "red"],
- [0.50, "red"],
- [0.50, "white"],
- [0.75, "white"],
- [0.75, "green"],
+ "colorscale": [[0.00, "red"],
+ [0.33, "red"],
+ [0.33, "white"],
+ [0.66, "white"],
+ [0.66, "green"],
[1.00, "green"]],
"showscale": True,
"line": {
@@ -221,8 +220,8 @@ def _generate_trending_traces(in_data, job_name, build_info,
"size": 14
},
"tickmode": 'array',
- "tickvals": [0.125, 0.375, 0.625, 0.875],
- "ticktext": ["Outlier", "Regression", "Normal", "Progression"],
+ "tickvals": [0.167, 0.500, 0.833],
+ "ticktext": ["Regression", "Normal", "Progression"],
"ticks": "",
"ticklen": 0,
"tickangle": -90,