some ticks in Matplotlib

  • It's import matplotlib.pyplot as plt  ranther than import matplotlib as plt.
  • We often codeplt.subplot(121),plt.imshow(img),plt.title('Input'),plt.xticks([]),plt.yticks([])
  • plt.subplot(rows, columns, index)  plt.subplot(121) means  total column counts is 1,  total row counts is 2, the current figure index is 1  
  • plt.xticks([]),plt.yticks([])  means  hide x and y axis and ticks  
posted @ 2023-08-17 19:17  million_yh  阅读(6)  评论(0编辑  收藏  举报