import matplotlib.pyplot as plt import pandas as pd # Data data = { "Interactions": list(range(1, 101)), # [f"Intrn-{i}" for i in range(1, 101)], "RiceChain-Plus": [ 9.27477E-05, 9.21069E-05, 0.000092778, 0.000092778, 0.000092778, 9.27789E-05, 9.27786E-05, 9.27783E-05, 9.27792E-05, 9.27798E-05, 9.27798E-05, 9.27804E-05, 9.27816E-05, 9.27801E-05, 9.27813E-05, 0.000092781, 9.27828E-05, 9.27819E-05, 9.27822E-05, 9.27837E-05, 9.29802E-05, 9.30103E-05, 9.30403E-05, 9.30704E-05, 9.31004E-05, 9.31305E-05, 9.31605E-05, 9.31906E-05, 9.32206E-05, 9.32507E-05, 9.32807E-05, 9.33108E-05, 9.33408E-05, 9.33709E-05, 9.34009E-05, 9.3431E-05, 9.3461E-05, 9.34911E-05, 9.35211E-05, 9.35512E-05, 9.35812E-05, 9.36113E-05, 9.36413E-05, 9.36714E-05, 9.37014E-05, 9.37315E-05, 9.37615E-05, 9.37916E-05, 9.38216E-05, 9.38517E-05, 9.38817E-05, 9.39118E-05, 9.39418E-05, 9.39719E-05, 9.40019E-05, 9.4032E-05, 9.4062E-05, 9.40921E-05, 9.41221E-05, 9.41522E-05, 9.41822E-05, 9.42123E-05, 9.42423E-05, 9.42724E-05, 9.43024E-05, 9.43325E-05, 9.43625E-05, 9.43926E-05, 9.44226E-05, 9.44527E-05, 9.44827E-05, 9.45128E-05, 9.45428E-05, 9.45729E-05, 9.46029E-05, 9.4633E-05, 9.46631E-05, 9.46931E-05, 9.47232E-05, 9.47532E-05, 9.47833E-05, 9.48133E-05, 9.48434E-05, 9.48734E-05, 9.49035E-05, 9.49335E-05, 9.49636E-05, 9.49936E-05, 9.50237E-05, 9.50537E-05, 9.50838E-05, 9.51138E-05, 9.51439E-05, 9.51739E-05, 9.5204E-05, 9.5234E-05, 9.52641E-05, 9.52941E-05, 9.53242E-05, 9.53542E-05 ], "MBRRSM (2022)": [ 0.0001113, 0.00011025, 0.000111405, 0.000111405, 0.000111405, 0.000111405, 0.000111405, 0.000111405, 0.000111407, 0.000111407, 0.000111407, 0.000111407, 0.000111409, 0.000111407, 0.000111409, 0.000111407, 0.000111409, 0.000111409, 0.000111409, 0.000111411, 0.000111607, 0.000111638, 0.000111668, 0.000111697, 0.000111728, 0.000111758, 0.000111787, 0.000111817, 0.000111848, 0.000111878, 0.000111907, 0.000111938, 0.000111968, 0.000111997, 0.000112029, 0.000112058, 0.000112088, 0.000112119, 0.000112148, 0.000112178, 0.000112207, 0.000112239, 0.000112268, 0.000112298, 0.000112329, 0.000112358, 0.000112388, 0.000112419, 0.000112449, 0.000112478, 0.00011251, 0.000112539, 0.000112568, 0.0001126, 0.000112629, 0.000112659, 0.000112688, 0.00011272, 0.000112749, 0.000112778, 0.00011281, 0.000112839, 0.000112869, 0.0001129, 0.00011293, 0.000112959, 0.000112991, 0.00011302, 0.000113049, 0.000113081, 0.00011311, 0.00011314, 0.000113171, 0.000113201, 0.00011323, 0.000113261, 0.000113291, 0.00011332, 0.00011335, 0.000113381, 0.000113411, 0.00011344, 0.000113471, 0.000113501, 0.00011353, 0.000113562, 0.000113591, 0.000113621, 0.000113652, 0.000113681, 0.000113711, 0.00011374, 0.000113772, 0.000113801, 0.000113831, 0.000113862, 0.000113891, 0.000113921, 0.00011395, 0.000113982 ], "KRanTi (2021)": [ 0.0000987, 0.00009828, 0.000098805, 0.000098805, 0.000098805, 0.000098805, 0.000098805, 0.000098805, 9.88071E-05, 9.88071E-05, 9.88071E-05, 9.88071E-05, 9.88092E-05, 9.88071E-05, 9.88092E-05, 9.88071E-05, 9.88092E-05, 9.88092E-05, 9.88092E-05, 9.88113E-05, 9.90066E-05, 9.90381E-05, 9.90675E-05, 9.90969E-05, 9.91284E-05, 9.91578E-05, 9.91872E-05, 9.92166E-05, 9.92481E-05, 9.92775E-05, 9.93069E-05, 9.93384E-05, 9.93678E-05, 9.93972E-05, 9.94287E-05, 9.94581E-05, 9.94875E-05, 0.000099519, 9.95484E-05, 9.95778E-05, 9.96072E-05, 9.96387E-05, 9.96681E-05, 9.96975E-05, 0.000099729, 9.97584E-05, 9.97878E-05, 9.98193E-05, 9.98487E-05, 9.98781E-05, 9.99096E-05, 0.000099939, 9.99684E-05, 9.99999E-05, 0.000100029, 0.000100059, 0.000100088, 0.00010012, 0.000100149, 0.000100178, 0.00010021, 0.000100239, 0.000100269, 0.0001003, 0.00010033, 0.000100359, 0.000100391, 0.00010042, 0.000100449, 0.000100481, 0.00010051, 0.00010054, 0.000100571, 0.000100601, 0.00010063, 0.000100661, 0.000100691, 0.00010072, 0.00010075, 0.000100781, 0.000100811, 0.00010084, 0.000100871, 0.000100901, 0.00010093, 0.000100962, 0.000100991, 0.000101021, 0.000101052, 0.000101081, 0.000101111, 0.00010114, 0.000101172, 0.000101201, 0.000101231, 0.000101262, 0.000101291, 0.000101321, 0.00010135, 0.000101382 ], "PoTx (2023)": [ 0.00009, 0.0000895, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.0000901, 0.000092, 0.0000923, 0.0000926, 0.0000928, 0.000093, 0.0000933, 0.0000936, 0.0000938, 0.0000941, 0.0000943, 0.0000946, 0.0000949, 0.0000951, 0.0000954, 0.0000956, 0.0000959, 0.0000961, 0.0000964, 0.0000967, 0.0000969, 0.0000972, 0.0000974, 0.0000977, 0.0000979, 0.0000982, 0.0000985, 0.0000987, 0.000099, 0.0000992, 0.0000995, 0.0000997, 0.0001, 0.0001003, 0.0001005, 0.0001008, 0.000101, 0.0001013, 0.0001015, 0.0001018, 0.000102, 0.0001023, 0.0001025, 0.0001028, 0.0001031, 0.0001034, 0.0001036, 0.0001039, 0.0001041, 0.0001043, 0.0001046, 0.0001048, 0.0001051, 0.0001053, 0.0001056, 0.0001059, 0.0001061, 0.0001064, 0.0001066, 0.0001069, 0.0001071, 0.0001074, 0.0001076, 0.0001079, 0.0001081, 0.0001084, 0.0001087, 0.0001089, 0.0001092, 0.0001094, 0.0001097, 0.0001099, 0.0001102, 0.0001104, 0.0001107, 0.0001109, 0.0001112, 0.0001115, 0.0001117, 0.000112, 0.0001122 ], "RiceChain (2022)": [ 0.000092, 0.0000915, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000921, 0.0000932, 0.0000935, 0.0000938, 0.000094, 0.0000943, 0.0000946, 0.0000949, 0.0000951, 0.0000954, 0.0000957, 0.000096, 0.0000963, 0.0000965, 0.0000968, 0.0000971, 0.0000974, 0.0000977, 0.0000979, 0.0000982, 0.0000985, 0.0000988, 0.000099, 0.0000993, 0.0000996, 0.0000999, 0.0001, 0.0001003, 0.0001006, 0.0001008, 0.0001011, 0.0001014, 0.0001017, 0.000102, 0.0001023, 0.0001025, 0.0001028, 0.0001031, 0.0001034, 0.0001037, 0.0001039, 0.0001042, 0.0001045, 0.0001048, 0.0001051, 0.0001053, 0.0001056, 0.0001059, 0.0001062, 0.0001065, 0.0001067, 0.000107, 0.0001073, 0.0001076, 0.0001078, 0.0001081, 0.0001084, 0.0001087, 0.000109, 0.0001092, 0.0001095, 0.0001098, 0.0001101, 0.0001104, 0.0001106, 0.0001109, 0.0001112, 0.0001114, 0.0001117, 0.000112, 0.0001123, 0.0001125, 0.0001128, 0.0001131, 0.0001134, 0.0001136, 0.0001139, 0.0001142, 0.0001145, 0.0001147, 0.000115 ] } # Create DataFrame df = pd.DataFrame(data) # Plot plt.figure(figsize=(14, 8)) # Continuous line for RiceChain-Plus plt.plot(df["Interactions"], df["RiceChain-Plus"], label="RiceChain-Plus", linestyle='-', color='black', linewidth=3) # Different dotted lines for other models plt.plot(df["Interactions"], df["MBRRSM (2022)"], label="MBRRSM (2022)", linestyle='--', color='blue', linewidth=3) plt.plot(df["Interactions"], df["KRanTi (2021)"], label="KRanTi (2021)", linestyle='-.', color='green', linewidth=3) plt.plot(df["Interactions"], df["PoTx (2023)"], label="PoTx (2023)", linestyle=':', color='red', linewidth=3) plt.plot(df["Interactions"], df["RiceChain (2022)"], label="RiceChain (2022)", linestyle='-.', color='purple', linewidth=3) # Titles and labels #plt.title('Energy Consumption Comparison') plt.xlabel('Interactions', fontsize=15) plt.ylabel('Energy Consumption (Joules)', fontsize=14) # Increasing the fontsize of tick labels plt.xticks(fontsize=13) plt.yticks(fontsize=13) plt.legend(fontsize=14) plt.grid(True) plt.tight_layout() # Show plot plt.show()