From 262239512c24e3c96fe1b393c929c9a92adcaaea Mon Sep 17 00:00:00 2001 From: Mario Hock Date: Fri, 21 Apr 2017 10:15:04 +0200 Subject: [PATCH] sum line should not be on top.. --- cnl_file_plot.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/cnl_file_plot.py b/cnl_file_plot.py index 40180fc..7ef334a 100755 --- a/cnl_file_plot.py +++ b/cnl_file_plot.py @@ -82,13 +82,6 @@ def plot_net(ax, cnl_file, args): ax.set_ylabel('Throughput (Bit/s)') ax.set_xlabel('Time (s)') - - ## * plot regular * - if ( not args.sum_only ): - # * plot regular * - cnl_plot.plot(ax, cnl_file.x_values, cnl_file.cols, cnl_file.net_col_names, cnl_file.net_col_labels, alpha, - color=args.color, ema_only=True if smooth else False, smooth=smooth) - # * plot summarized * if ( args.sum or args.sum_only ): # summarize @@ -107,7 +100,14 @@ def plot_net(ax, cnl_file, args): # * plot * cnl_plot.plot(ax, cnl_file.x_values, aux_col_dict, ["sum"], ["Total"], alpha, - color=args.color, ema_only=True if smooth else False, smooth=smooth) + color=args.sum_color, ema_only=True if smooth else False, smooth=smooth) + + + ## * plot regular * + if ( not args.sum_only ): + # * plot regular * + cnl_plot.plot(ax, cnl_file.x_values, cnl_file.cols, cnl_file.net_col_names, cnl_file.net_col_labels, alpha, + color=args.color, ema_only=True if smooth else False, smooth=smooth) @@ -274,6 +274,10 @@ if __name__ == "__main__": parser.add_argument("-c", "--color", type=str, nargs='*', help="see: http://matplotlib.org/api/colors_api.html") + parser.add_argument("-sc", "--sum-color", type=str, default="#d400ae", + help="Color for summarized line, use together with --sum") + + ## These arguments can't be given within "--subplots" def add_unique_args(parser): @@ -331,6 +335,7 @@ if __name__ == "__main__": ## adjust arguments args.net_scale *= 10**9 # --> multiply by 10**9 to get Gbit/s + args.sum_color = [args.sum_color] ## Subplots: Read the arguments given as argument to "--subplots" and merge the result -- GitLab