【发布时间】:2015-12-01 11:51:13
【问题描述】:
我创建了一个极线图,并尝试通过将第一行的数据添加到末尾来关闭它。 在这张图片中看到 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 和轮廓是等价的。
绘图由matplotlib完成
我该怎么做?这是以 180 度“关闭”情节的正确方法吗?
这里是剧情 sn-p:
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$')
【问题讨论】:
-
请显示实际绘图的代码...
标签: python arrays matplotlib