From 64dfab39a7e60333681fc42a4567a1c91044712a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20=C3=96rtenberg?= Date: Mon, 16 Jun 2025 15:37:02 +0200 Subject: [PATCH] added dashed lines to throughput results --- plots/throughput_results.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/plots/throughput_results.py b/plots/throughput_results.py index 1e2130b..a830cb8 100644 --- a/plots/throughput_results.py +++ b/plots/throughput_results.py @@ -3,15 +3,15 @@ import numpy as np ## Bar diagram chunked on different parameters. text_size = 30 -stroke = 2 +stroke = 4 marker_width = 8 packet_sizes = (4,8,16,32,64,128) configs = { - 'Single Issue' : ('X',marker_width,(0.4414, 0.6095, 0.7529, 0.8312, 0.8889, 0.9275)), - 'Performance Optimized' : ('s',marker_width,(0.4211, 0.6957, 1.0323, 1.3333, 1.5799, 1.7527)), - 'Resource Utilization Optimized': ('^',marker_width-4,(0.4211, 0.6957, 1.0323, 1.3333, 1.5799, 1.7527)), - 'Ideal Addressed' : ('o',marker_width,(0.5714, 0.8889, 1.2308, 1.5238, 1.7297, 1.8551)), -# 'Ideal non-Addressed' : ('v',marker_width,(1.3333, 1.6000, 1.7778, 1.8824, 1.9394, 1.9692)), + 'Single Issue' : ('X',marker_width, stroke, False, (0.4414, 0.6095, 0.7529, 0.8312, 0.8889, 0.9275)), + 'Performance Optimized' : ('s',marker_width+4,stroke, False, (0.4211, 0.6957, 1.0323, 1.3333, 1.5799, 1.7527)), + 'Resource Utilization Optimized': ('^',marker_width, stroke, True , (0.4211, 0.6957, 1.0323, 1.3333, 1.5799, 1.7527)), + 'Ideal Addressed' : ('o',marker_width, stroke, False, (0.5714, 0.8889, 1.2308, 1.5238, 1.7297, 1.8551)), + 'Ideal non-Addressed' : ('v',marker_width, stroke, False, (1.3333, 1.6000, 1.7778, 1.8824, 1.9394, 1.9692)), } @@ -22,8 +22,11 @@ multiplier = 0 fig, ax = plt.subplots(layout='constrained') -for attribute, (marker, lw, measurement) in configs.items(): - ax.plot(packet_sizes, measurement, label=attribute, marker=marker, lw=stroke, mew=lw) +for attribute, (marker, lw, st, isDashed ,measurement) in configs.items(): + if isDashed: + ax.plot(packet_sizes, measurement, label=attribute, marker=marker, dashes=[2,2], lw=st, mew=lw) + else: + ax.plot(packet_sizes, measurement, label=attribute, marker=marker, lw=st, mew=lw) # Add some text for labels, title and custom x-axis tick labels, etc. ax.set_ylabel('Throughput (B/C)',fontsize=text_size)