代码 import matplotlib.pyplot as plt import numpy as np t = np.arange(0, 2*np.pi,0.01) x = 20 * np.sin(t) **3 y = 13 * np.cos(t) - 5 * np.cos(2*t) - 2 * np.cos(3*t) - np.cos(4*t) plt.plot(x,y,color='r') ax=plt.gca() ax.fill(x,y,'r',0.3) plt.grid() plt.show() 效果