import numpy as np
import sys
from matplotlib import pyplot as plt

if len(sys.argv) != 3:
  print('Usage: ', sys.argv[0], ' <train> <test>!\n')
  sys.exit(1)

plt.xlabel('Floor size (square feet)')
plt.xlim(xmin=0)
plt.xlim(xmax=4500)
plt.ylabel('Price (x $1000)')
plt.ylim(ymin=0)
plt.ylim(ymax=600)

train = np.loadtxt(sys.argv[1])
plt.scatter(train[:,0], train[:,1] / 1000)

test = np.loadtxt(sys.argv[2])
plt.scatter(test[:,0], test[:,1] / 1000, c = 'lime', marker = '^')

# plt.show()
plt.savefig('train-test.png')
