- It's
import matplotlib.pyplot as plt
ranther thanimport matplotlib as plt
. - We often code
plt.subplot(121),plt.imshow(img),plt.title('Input'),plt.xticks([]),plt.yticks([])
plt.subplot(rows, columns, index) plt.subplot(121)
means column count is 1, row count is 2, figure 1plt.xticks([]),plt.yticks([])
means hide x and y axis and ticks