In [1]:
import sys,os,os.path
sys.path.append("./")
import matplotlib.pyplot as plt
import numpy as np
import utils as u
%matplotlib inline
plt.style.use('ggplot')
bf_01_r = u.read_test_result("results/bellman-ford-0.10.txt")
fw_01_r = u.read_test_result("results/floyd-warshall-0.10.txt")
# Two subplots, the axes array is 1-d
f, axarr = plt.subplots(2, sharex=True)
axarr[0].plot(bf_01_r[0], bf_01_r[1], color="blue")
axarr[0].plot(fw_01_r[0], fw_01_r[1], color="green")
axarr[0].set_title('Sharing X axis')
axarr[1].plot(bf_01_r[0], bf_01_r[2], color="blue")
axarr[1].plot(fw_01_r[0], fw_01_r[2], color="green")
plt.show()
In [ ]:
bf_025_r = u.read_test_result("results/bellman-ford-0.25.txt")
fw_025_r = u.read_test_result("results/floyd-warshall-0.25.txt")
# Two subplots, the axes array is 1-d
f, axarr = plt.subplots(2, sharex=True)
axarr[0].plot(bf_025_r[0], bf_025_r[1], color="blue")
axarr[0].plot(fw_025_r[0], fw_025_r[1], color="green")
axarr[0].set_title('Sharing X axis')
axarr[1].plot(bf_025_r[0], bf_025_r[2], color="blue")
axarr[1].plot(fw_025_r[0], fw_025_r[2], color="green")
plt.show()