import numpy as np
import scipy as sp
import scipy.sparse as sparse
import scipy.sparse.linalg as sla
import matplotlib.pyplot as plt
%matplotlib inline
m = 4
k = 4
nf = 2**m + 1
xf = np.linspace(0,1,nf)
yf = sp.sin(k * np.pi * xf)
nc = 2**(m-1) + 1
xc = np.linspace(0,1,nc)
yc = sp.sin(k * np.pi * xc)
print(nc)
print(nf)
plt.plot(xc, yc, 'g-s', lw=3, clip_on=False, label='coarse')
plt.plot(xf, yf, 'b-o', lw=3, clip_on=False, label='fine')
plt.legend(frameon=False)