import matplotlib.pyplot as plt import numpy as np #解決中文顯示問題 plt.rcParams['font.sans-serif'] = ['KaiTi'] # 指定預設字型 plt.rcParams['axes.unicode_minus'] = False