import matplotlib.pyplot as plt import numpy as np ## Bar diagram chunked on different parameters. text_size = 30 stroke = 2 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)), } x = np.arange(len(packet_sizes)) # the label locations ys = np.arange(0,2.25,0.25) width = 0.25 # the width of the bars 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) # Add some text for labels, title and custom x-axis tick labels, etc. ax.set_ylabel('Throughput (B/C)',fontsize=text_size) ax.set_xlabel('Packet Size (B/P)',fontsize=text_size) ax.set_title('Unhindered Throughput of simultaneous 256KiB read and 256KiB write',fontsize=text_size) ax.set_xscale('log') ax.set_xticks(packet_sizes, packet_sizes,fontsize=text_size) ax.set_yticks(ys, ys,fontsize=text_size) ax.legend(loc='upper left', ncols=2,fontsize=text_size) ax.set_ylim(0.2, 2.7) plt.show()