aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_plots.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools/presentation/generator_plots.py')
-rw-r--r--resources/tools/presentation/generator_plots.py29
1 files changed, 20 insertions, 9 deletions
diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py
index 6006ae9b6a..2d723145bf 100644
--- a/resources/tools/presentation/generator_plots.py
+++ b/resources/tools/presentation/generator_plots.py
@@ -777,7 +777,6 @@ def plot_perf_box_name(plot, input_data):
else:
data_y = [y / 1e6 if y else None for y in df_y[col]]
kwargs = dict(
- x=[str(i + 1) + u'.'] * len(df_y[col]),
y=data_y,
name=(
f"{i + 1}. "
@@ -789,6 +788,7 @@ def plot_perf_box_name(plot, input_data):
)
if test_type in (u"SOAK", ):
kwargs[u"boxpoints"] = u"all"
+ kwargs[u"jitter"] = 0.3
traces.append(plgo.Box(**kwargs))
@@ -803,6 +803,8 @@ def plot_perf_box_name(plot, input_data):
try:
# Create plot
layout = deepcopy(plot[u"layout"])
+ layout[u"xaxis"][u"tickvals"] = [i for i in range(len(y_vals))]
+ layout[u"xaxis"][u"ticktext"] = [str(i + 1) for i in range(len(y_vals))]
if layout.get(u"title", None):
if test_type in (u"HOSTSTACK", ):
layout[u"title"] = f"<b>Bandwidth:</b> {layout[u'title']}"
@@ -900,7 +902,6 @@ def plot_ndrpdr_box_name(plot, input_data):
replace(u'2n1l-', u'')
)
kwargs = dict(
- x=[data_x[idx], ] * len(data_x),
y=[y / 1e6 if y else None for y in vals],
name=(
f"{idx + 1}."
@@ -915,6 +916,7 @@ def plot_ndrpdr_box_name(plot, input_data):
if box_points and box_points in \
(u"all", u"outliers", u"suspectedoutliers", False):
kwargs[u"boxpoints"] = box_points
+ kwargs[u"jitter"] = 0.3
traces.append(plgo.Box(**kwargs))
try:
data_y_max.append(max(vals))
@@ -923,6 +925,9 @@ def plot_ndrpdr_box_name(plot, input_data):
try:
# Create plot
layout = deepcopy(plot[u"layout"])
+ layout[u"xaxis"][u"tickvals"] = [i for i in range(len(data_y))]
+ layout[u"xaxis"][u"ticktext"] = \
+ [str(i + 1) for i in range(len(data_y))]
if layout.get(u"title", None):
layout[u"title"] = \
layout[u'title'].format(core=core, test_type=ttype)
@@ -1011,18 +1016,24 @@ def plot_mrr_box_name(plot, input_data):
# Add plot traces
traces = list()
for idx, x_item in enumerate(data_x):
- traces.append(
- plgo.Box(
- x=[x_item, ] * len(data_y[idx]),
- y=data_y[idx],
- name=data_names[idx],
- hoverinfo=u"y+name"
- )
+ kwargs = dict(
+ y=data_y[idx],
+ name=data_names[idx],
+ hoverinfo=u"y+name"
)
+ box_points = plot.get(u"boxpoints", None)
+ if box_points and box_points in \
+ (u"all", u"outliers", u"suspectedoutliers", False):
+ kwargs[u"boxpoints"] = box_points
+ kwargs["jitter"] = 0.3
+ traces.append(plgo.Box(**kwargs))
try:
# Create plot
layout = deepcopy(plot[u"layout"])
+ layout[u"xaxis"][u"tickvals"] = [i for i in range(len(data_y))]
+ layout[u"xaxis"][u"ticktext"] = \
+ [str(i + 1) for i in range(len(data_y))]
if layout.get(u"title", None):
layout[u"title"] = (
f"<b>Tput:</b> {layout[u'title'].format(core=core)}"
*/ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */