aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-05-07 17:44:49 +0200
committerTibor Frank <tifrank@cisco.com>2019-05-07 17:46:49 +0200
commit23185b233e4dd7984a404aa54d5dd0da2502074b (patch)
treebd79b709a5273feae0942cbc881df301351f94f8 /resources/tools
parent6fb043d8e4450d7db31a5f5903e84f600aa807a4 (diff)
Report: NFV Graphs
Change-Id: I75055264a1b1bc250174eb72228a1f0d5d74b313 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools')
-rw-r--r--resources/tools/presentation/generator_plots.py39
1 files changed, 21 insertions, 18 deletions
diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py
index 0e237e50aa..48af343245 100644
--- a/resources/tools/presentation/generator_plots.py
+++ b/resources/tools/presentation/generator_plots.py
@@ -1528,39 +1528,42 @@ def plot_service_density_heatmap_compare(plot, input_data):
showarrow=False
)
+ point_text_r = "Not present"
+ point_text_c = "Not present"
+ point_text_diff = ""
try:
- point_r = str(data_r[c][n])
- point_text_r = text_r.format(
- val_r=point_r,
- stdev_r=vals[txt_chains[c]][txt_nodes[n]]["stdev_r"],
- nr_r=vals[txt_chains[c]][txt_nodes[n]]["nr_r"])
+ point_r = data_r[c][n]
+ if point_r is not None:
+ point_text_r = text_r.format(
+ val_r=point_r,
+ stdev_r=vals[txt_chains[c]][txt_nodes[n]]["stdev_r"],
+ nr_r=vals[txt_chains[c]][txt_nodes[n]]["nr_r"])
except KeyError:
point_r = None
- point_text_r = "Not present"
point["text"] = "" if point_r is None else point_r
annotations_r.append(deepcopy(point))
try:
- point_c = str(data_c[c][n])
- point_text_c = text_c.format(
- val_c=point_c,
- stdev_c=vals[txt_chains[c]][txt_nodes[n]]["stdev_c"],
- nr_c=vals[txt_chains[c]][txt_nodes[n]]["nr_c"])
+ point_c = data_c[c][n]
+ if point_c is not None:
+ point_text_c = text_c.format(
+ val_c=point_c,
+ stdev_c=vals[txt_chains[c]][txt_nodes[n]]["stdev_c"],
+ nr_c=vals[txt_chains[c]][txt_nodes[n]]["nr_c"])
except KeyError:
point_c = None
- point_text_c = "Not present"
point["text"] = "" if point_c is None else point_c
annotations_c.append(deepcopy(point))
try:
- point_d = str(diff[c][n])
- point_text_diff = text_diff.format(
- title_r=plot["reference"]["name"],
- title_c=plot["compare"]["name"],
- diff=point_d)
+ point_d = diff[c][n]
+ if point_d is not None:
+ point_text_diff = text_diff.format(
+ title_r=plot["reference"]["name"],
+ title_c=plot["compare"]["name"],
+ diff=point_d)
except KeyError:
point_d = None
- point_text_diff = ""
point["text"] = "" if point_d is None else point_d
annotations_diff.append(deepcopy(point))