Python matplotlib pylab 画张图

mac2022-06-30  116

from pylab import * w1 = 1 w2 = 25 fs = 18 y = np.arange(-2,2,0.001) x = w1*y*log(y)-1.0/w2*exp(-(w2*y-w2/exp(1))**4) plt.title(u'DARREN DRAW NAIZI') plt.xlabel(u'x') plt.ylabel(u'y') plt.axis([-1.5,0.5,-0.5,1.2]) text(-1.4,-0.3,r'$x=%sy{log}(y)-\frac{1}{%s}e^{[-(%sy-\frac{%s}{e})^4]}$' % (w1,w2,w2,w2),fontsize=fs) plt.plot(x,y) plt.show()

可以调整代码中的w1 和 w2 画出不同的大小和形状 

 

 

which one would you like? It's a sad story. 

转载于:https://www.cnblogs.com/vercont/p/10210338.html

最新回复(0)