胸形线

代码

import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl 

mpl.rcParams['font.sans-serif'] = [u'SimHei']  #FangSong/黑体 FangSong/KaiTi
x = np.arange(1, 0, -0.001)
y = (-3 * x * np.log(x) + np.exp(-(40 * (x - 1 / np.e)) ** 4) / 25) / 2
plt.figure(figsize=(5,7), facecolor='w')
plt.plot(y, x, 'r-', linewidth=2)
plt.grid(True)
plt.title(u'胸型线', fontsize=20)
plt.savefig('breast.png')
plt.show()

结果

猜你喜欢

转载自www.cnblogs.com/monsterhy123/p/13166084.html