首页 > 编程知识 正文

python 3d绘图,python积分函数

时间:2023-05-06 15:28:50 阅读:177260 作者:4030

编译环境: ubuntu17.04 Python3.5

所需的库: numpy、scipy和matplotlib

接下来是理想平面的辐射强度的计算(课堂的大作业~~~ )

1、超越函数积分运算

defintegral(x,c1,c2,t ) :

return((C1*0.98 )/(x**5) ) )1/) ) NP.e** ) C2/(x * t ) ) )-1 ) )

resut,err=integrate.quad(integral,3,5,args=(C1,c2,t ) )

2、情节的实现

PLT.figure(1) )。

ax1=PLT.subplot(211 ) )

这是PLT.SCA(ax1 )

PLT.plot(fi,functionI ) fi,0.5,5,1,e0 ),label='n=5,ks=0.5 ' )

PLT.legend(loc='upperright ',bbox _ to _ anchor=(0.9,0.9 ) )

PLT.xlabel(u'/rad ' ) ) ) ) ) ) ) PLT.xlabel(u'/rad ' ) ) ) ) ) ) ) ) )。

PLT.ylabel(u'I/) w/Sr ) )

ax2=PLT.subplot(212 )

这是PLT.SCA(ax2 )

PLT.plot(fi,functionI ) fi,0.5,5,1,e0 ),label='n=5,ks=0.5 ' )

PLT.legend(loc='upperright ',bbox _ to _ anchor=(0.9,0.9 ) )

PLT.xlabel(u'/rad ' ) ) ) ) ) ) ) PLT.xlabel(u'/rad ' ) ) ) ) ) ) ) ) )。

PLT.ylabel(u'I/) w/Sr ) )

PLT.subplots_adjust(wspace=0.5,hspace=0.5 ) ) ) ) ) ) )。

plt.show () )

让我们来谈谈名为plt.subplots_adjust的函数。 这是为了调整子图之间的间隔

成果图:

以上Python超越了函数积分运算和绘图的实现代码,是编辑分享给大家的全部内容。 希望能作为参考。 另外,希望多支持容易录用的站长站。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。