# Import the module for plotting
# _*_ coding:utf-8 _*_
import numpy as np
import matplotlib.pyplot as plt
if __name__ == '__main__':
a = 1
t = np.linspace(-50,50,num=1000)
p = a * np.cos(2*t)
x = p * np.sin(t)
y = p * np.cos(t)
plt.figure(figsize=(4, 4), facecolor='w')
plt.plot(x, y, 'r-', linewidth=0.5)
plt.savefig('四叶草.jpg')
plt.grid()
plt.show()
画四叶草
最新推荐文章于 2022-10-27 18:59:55 发布