X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_plots.py;h=e674a3e5c8115faf68f2702ab68fc051e6913f33;hp=8161a5a5664fd1bd1eebeced27310aaddb3e2dfd;hb=6c8ba1c706a4e9e467ab5e2a4b676b9016f9e610;hpb=f975cf2f1e2f5baef0ab0da75a53948d025562a2 diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index 8161a5a566..e674a3e5c8 100644 --- a/resources/tools/presentation/generator_plots.py +++ b/resources/tools/presentation/generator_plots.py @@ -664,7 +664,7 @@ def plot_perf_box_name(plot, input_data): try: val_max = max(df_y[col]) if val_max: - y_max.append(int(val_max / 1e6) + 2) + y_max.append(int(val_max / 1e6)) except (ValueError, TypeError) as err: logging.error(repr(err)) continue @@ -683,8 +683,8 @@ def plot_perf_box_name(plot, input_data): layout[u"yaxis"][u"title"] = u"Connection Rate [Mrps]" else: layout[u"title"] = f"Throughput: {layout[u'title']}" - if y_max: - layout[u"yaxis"][u"range"] = [0, max(y_max)] + if y_max and max(y_max) > 1: + layout[u"yaxis"][u"range"] = [0, max(y_max) + 2] plpl = plgo.Figure(data=traces, layout=layout) # Export Plot