Adds fancy plot settings for eps export.
This commit is contained in:
@@ -46,6 +46,7 @@ if __name__ == "__main__":
|
|||||||
"-p", "--pcap_csv_folder", required=True, help="PCAP csv folder."
|
"-p", "--pcap_csv_folder", required=True, help="PCAP csv folder."
|
||||||
)
|
)
|
||||||
parser.add_argument("--save", required=True, help="Location to save pdf file.")
|
parser.add_argument("--save", required=True, help="Location to save pdf file.")
|
||||||
|
parser.add_argument("--fancy", action="store_true", help="Create fancy plot.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-i",
|
"-i",
|
||||||
"--interval",
|
"--interval",
|
||||||
@@ -182,10 +183,11 @@ if __name__ == "__main__":
|
|||||||
# transmission timeline
|
# transmission timeline
|
||||||
scaley = 1.5
|
scaley = 1.5
|
||||||
scalex = 1.0
|
scalex = 1.0
|
||||||
plt.title("{} with {}".format(transmission_direction, cc_algo))
|
|
||||||
fig, ax = plt.subplots(2, 1, figsize=[6.4 * scaley, 4.8 * scalex])
|
fig, ax = plt.subplots(2, 1, figsize=[6.4 * scaley, 4.8 * scalex])
|
||||||
fig.subplots_adjust(right=0.75)
|
fig.subplots_adjust(right=0.75)
|
||||||
fig.suptitle("{} with {}".format(transmission_direction, cc_algo))
|
if not args.fancy:
|
||||||
|
plt.title("{} with {}".format(transmission_direction, cc_algo))
|
||||||
|
fig.suptitle("{} with {}".format(transmission_direction, cc_algo))
|
||||||
ax0 = ax[0]
|
ax0 = ax[0]
|
||||||
ax1 = ax0.twinx()
|
ax1 = ax0.twinx()
|
||||||
ax2 = ax0.twinx()
|
ax2 = ax0.twinx()
|
||||||
@@ -303,9 +305,12 @@ if __name__ == "__main__":
|
|||||||
ax0.set_ylabel("cwnd")
|
ax0.set_ylabel("cwnd")
|
||||||
ax01.set_ylabel("Bandwidth [MHz]")
|
ax01.set_ylabel("Bandwidth [MHz]")
|
||||||
|
|
||||||
fig.legend(loc="lower right")
|
if args.fancy:
|
||||||
|
fig.legend(ncols=4, fontsize=12, loc="lower right")
|
||||||
plt.savefig("{}{}_plot.pdf".format(args.save, csv.replace(".csv", "")), bbox_inches="tight")
|
plt.savefig("{}{}_plot.eps".format(args.save, csv.replace(".csv", "")), bbox_inches="tight")
|
||||||
|
else:
|
||||||
|
fig.legend(loc="lower right")
|
||||||
|
plt.savefig("{}{}_plot.pdf".format(args.save, csv.replace(".csv", "")), bbox_inches="tight")
|
||||||
# except Exception as e:
|
# except Exception as e:
|
||||||
# print("Error processing file: {}".format(csv))
|
# print("Error processing file: {}".format(csv))
|
||||||
# print(str(e))
|
# print(str(e))
|
||||||
|
|||||||
Reference in New Issue
Block a user