python polar contour_Python将2darray的最后一行和第二列添加到最后位置 - Polar Contour图...

我创建了一个极坐标轮廓图并尝试通过将第一行的数据添加到结尾来关闭它 . 在这张照片中看到180度:PolarPlot

使用meshgrid和griddata模块创建数据 . 数组大小为nxn类型 . 例如:ri - float64 - (100,100)大小

print ri

[[ 0.00160738 0.00184056 0.00207375 ..., 0.23409252 0.23432571

0.23455889]

[ 0.00160738 0.00184056 0.00207375 ..., 0.23409252 0.23432571

0.23455889]

[ 0.00160738 0.00184056 0.00207375 ..., 0.23409252 0.23432571

0.23455889]

theta和contour创建等效 .

绘图由matplotlib完成

我怎样才能做到这一点?这是在180度“关闭”情节的正确方法吗?

以下是情节片段:

fig4 = plt.figure()

ax = fig4.add_subplot(111)

ax = plt.axes(polar=True)

image=plt.contourf(thetai,ri/d,contourd,128,vmin=0,extent=([-math.pi,+math.pi,min(ri[0]/d),max(ri[0]/d)]),cmap=plt.cm.Paired)

ax.set_xlabel(r'$\Theta$')

ax.set_ylabel(r'$r$')

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值