Fix plots

This commit is contained in:
alrevuelta 2024-03-04 15:25:31 +01:00
parent b3c3900ad4
commit 168752757c
No known key found for this signature in database
GPG Key ID: F345C9F3CCDB886E
4 changed files with 3764 additions and 1428 deletions

View File

@ -30,18 +30,14 @@ with plt.style.context(['science', 'ieee']):
ax1.plot(ds, delays_2, color='g', label=r"$N_2=$"+str(N2))
ax1.plot(ds, delays_3, color='b', label=r"$N_3=$"+str(N3))
ax2.plot(ds, ds, color='y', label="Bandwidth ampl.")
print(delays_1)
print(ds)
ax1.autoscale(tight=True)
ax2.autoscale(tight=True)
ax1.legend(loc=0)
ax2.legend(loc=0)
ax1.set(title='Worst case maximum hops vs bandwidth')
ax1.set(**dict(xlabel='Outbound degree (D)', ylabel='Amount of hops'))
ax1.set(title='$h_{max}$ depending on node degree $D$')
ax1.set(**dict(xlabel='Node degree (D)', ylabel='Maximum number of hops ($h_{max}$)'))
ax2.set(**dict(ylabel='Bandwidth amplification'))
#ax2.set_xlim([2, 14])
fig.savefig('message_hops.svg', dpi=300)
plt.close()

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 69 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View File

@ -55,7 +55,7 @@ with plt.style.context(['science', 'ieee']):
else:
pos.legend(fontsize="5", loc="best")
ax[0][0].set(ylabel='Cumulative message share')
ax[0][0].set(ylabel='Message share')
ax[1][0].set(xlabel='Latency (ms)', ylabel='Cumulative message share')
ax[1][1].set(xlabel='Latency (ms)')