import matplotlib.pyplot as plt import pandas as pd # Data interactions = list(range(1, 101)) ricechain_plus = [ 44165.57143, 43860.42857, 44180, 44180, 44180, 44180.42857, 44180.28571, 44180.14286, 44180.57143, 44180.85714, 44180.85714, 44181.14286, 44181.71429, 44181, 44181.57143, 44181.42857, 44182.28571, 44181.85714, 44182, 44182.71429, 44276.30752, 44290.61708, 44304.92664, 44319.2362, 44333.54576, 44347.85532, 44362.16488, 44376.47444, 44390.784, 44405.09356, 44419.40311, 44433.71267, 44448.02223, 44462.33179, 44476.64135, 44490.95091, 44505.26047, 44519.57003, 44533.87959, 44548.18915, 44562.49871, 44576.80827, 44591.11783, 44605.42739, 44619.73695, 44634.04651, 44648.35607, 44662.66563, 44676.97519, 44691.28475, 44705.59431, 44719.90387, 44734.21343, 44748.52299, 44762.83255, 44777.14211, 44791.45166, 44805.76122, 44820.07078, 44834.38034, 44848.6899, 44862.99946, 44877.30902, 44891.61858, 44905.92814, 44920.2377, 44934.54726, 44948.85682, 44963.16638, 44977.47594, 44991.7855, 45006.09506, 45020.40462, 45034.71418, 45049.02374, 45063.3333, 45077.64286, 45091.95242, 45106.26198, 45120.57154, 45134.8811, 45149.19066, 45163.50021, 45177.80977, 45192.11933, 45206.42889, 45220.73845, 45235.04801, 45249.35757, 45263.66713, 45277.97669, 45292.28625, 45306.59581, 45320.90537, 45335.21493, 45349.52449, 45363.83405, 45378.14361, 45392.45317, 45406.76273 ] mbrrsm = [ 53000, 52500, 53050, 53050, 53050, 53050, 53050, 53050, 53051, 53051, 53051, 53051, 53052, 53051, 53052, 53051, 53052, 53052, 53052, 53053, 53146, 53161, 53175, 53189, 53204, 53218, 53232, 53246, 53261, 53275, 53289, 53304, 53318, 53332, 53347, 53361, 53375, 53390, 53404, 53418, 53432, 53447, 53461, 53475, 53490, 53504, 53518, 53533, 53547, 53561, 53576, 53590, 53604, 53619, 53633, 53647, 53661, 53676, 53690, 53704, 53719, 53733, 53747, 53762, 53776, 53790, 53805, 53819, 53833, 53848, 53862, 53876, 53891, 53905, 53919, 53934, 53948, 53962, 53976, 53991, 54005, 54019, 54034, 54048, 54062, 54077, 54091, 54105, 54120, 54134, 54148, 54162, 54177, 54191, 54205, 54220, 54234, 54248, 54262, 54277 ] kranti = [ 47000, 46800, 47050, 47050, 47050, 47050, 47050, 47050, 47051, 47051, 47051, 47051, 47052, 47051, 47052, 47051, 47052, 47052, 47052, 47053, 47146, 47161, 47175, 47189, 47204, 47218, 47232, 47246, 47261, 47275, 47289, 47304, 47318, 47332, 47347, 47361, 47375, 47390, 47404, 47418, 47432, 47447, 47461, 47475, 47490, 47504, 47518, 47533, 47547, 47561, 47576, 47590, 47604, 47619, 47633, 47647, 47661, 47676, 47690, 47704, 47719, 47733, 47747, 47762, 47776, 47790, 47805, 47819, 47833, 47848, 47862, 47876, 47891, 47905, 47919, 47934, 47948, 47962, 47976, 47991, 48005, 48019, 48034, 48048, 48062, 48077, 48091, 48105, 48120, 48134, 48148, 48162, 48177, 48191, 48205, 48220, 48234, 48248, 48262, 48277 ] potx = [ 43000, 42800, 43050, 43050, 43050, 43050, 43050, 43050, 43051, 43051, 43051, 43051, 43052, 43051, 43052, 43051, 43052, 43052, 43052, 43053, 43146, 43161, 43175, 43189, 43204, 43218, 43232, 43246, 43261, 43275, 43289, 43304, 43318, 43332, 43347, 43361, 43375, 43390, 43404, 43418, 43432, 43447, 43461, 43475, 43490, 43504, 43518, 43533, 43547, 43561, 43576, 43590, 43604, 43619, 43633, 43647, 43661, 43676, 43690, 43704, 43719, 43733, 43747, 43762, 43776, 43790, 43805, 43819, 43833, 43848, 43862, 43876, 43891, 43905, 43919, 43934, 43948, 43962, 43976, 43991, 44005, 44019, 44034, 44048, 44062, 44077, 44091, 44105, 44120, 44134, 44148, 44162, 44177, 44191, 44205, 44220, 44234, 44248, 44262, 44277 ] ricechain = [ 44000, 43800, 44050, 44050, 44050, 44050, 44050, 44050, 44051, 44051, 44051, 44051, 44052, 44051, 44052, 44051, 44052, 44052, 44052, 44053, 44146, 44161, 44175, 44189, 44204, 44218, 44232, 44246, 44261, 44275, 44289, 44304, 44318, 44332, 44347, 44361, 44375, 44390, 44404, 44418, 44432, 44447, 44461, 44475, 44490, 44504, 44518, 44533, 44547, 44561, 44576, 44590, 44604, 44619, 44633, 44647, 44661, 44676, 44690, 44704, 44719, 44733, 44747, 44762, 44776, 44790, 44805, 44819, 44833, 44848, 44862, 44876, 44891, 44905, 44919, 44934, 44948, 44962, 44976, 44991, 45005, 45019, 45034, 45048, 45062, 45077, 45091, 45105, 45120, 45134, 45148, 45162, 45177, 45191, 45205, 45220, 45234, 45248, 45262, 45277 ] # Creating DataFrame df = pd.DataFrame({ 'Interactions': interactions, 'RiceChain-Plus': ricechain_plus, 'MBRRSM': mbrrsm, 'KRanTi': kranti, 'PoTx': potx, 'RiceChain': ricechain }) # Plotting plt.figure(figsize=(14, 8)) plt.plot(df['Interactions'], df['RiceChain-Plus'], label='RiceChain-Plus', linestyle='-', color='black', linewidth=3) plt.plot(df['Interactions'], df['MBRRSM'], label='MBRRSM', linestyle='--', color='blue', linewidth=3) plt.plot(df['Interactions'], df['KRanTi'], label='KRanTi', linestyle='-.', color='green', linewidth=3) plt.plot(df['Interactions'], df['PoTx'], label='PoTx', linestyle=':', color='red', linewidth=3) plt.plot(df['Interactions'], df['RiceChain'], label='RiceChain', linestyle='-.', color='purple', linewidth=3) #plt.title('Average Execution Costs Across Interactions') plt.xlabel('Interactions', fontsize=15) plt.ylabel('Average Execution Costs (gas)', fontsize=14) plt.xticks(fontsize=13) plt.yticks(fontsize=13) plt.legend(fontsize=14) plt.grid(True) plt.show()