#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt iter, w_x, w_y, b = np.loadtxt('ex-7/iters/iters.txt') plt.figure(figsize=(5, 4)) plt.rcParams['font.size'] = 8 plt.subplot(211) plt.title('weight vector', loc='right') plt.plot(iter, w, color='#92182b') plt.ylabel('w') plt.xlabel('N') plt.subplot(212) plt.title('bias', loc='right') plt.plot(iter, b, color='gray') plt.ylabel('b') plt.xlabel('N') plt.tight_layout() plt.show()