Matplotlib Pyplot极面图

Matplotlib Pyplot极面图,matplotlib,plot,limit,axes,Matplotlib,Plot,Limit,Axes,我是pyplot的新手 我有一个笛卡尔曲面图: # offset and omega are arrays Z = my_function(omega,offset) # my_function give and arrays of omega.size*offset.size fig, ax = plt.subplots(1) p = ax.pcolor(offset,omega,Z.T,cmap=cm.jet,vmin=abs(Z).min(),vmax=abs(Z).max()) cb

我是pyplot的新手

我有一个笛卡尔曲面图:

# offset and omega are arrays

Z = my_function(omega,offset) # my_function give and arrays of omega.size*offset.size
fig, ax = plt.subplots(1)
p = ax.pcolor(offset,omega,Z.T,cmap=cm.jet,vmin=abs(Z).min(),vmax=abs(Z).max())
cb = fig.colorbar(p,ax=ax)
也许有一种更简单的方法来绘制曲面,但这就是我在互联网上找到的方法

好了,现在我想用极坐标将我的函数绘制成一个曲面,我尝试了以下方法:

ax2 = plt.subplot(111, polar=True)
p2 = ax2.pcolor(offset,omega,Z.T,cmap=cm.jet,vmin=abs(Z).min(),vmax=abs(Z).max())
这是一种工作,我有一个曲面图,但它没有考虑Y的限制

例如,如果Y定义在-15和15°之间,我只希望在这些角度之间绘制和显示我的函数,而不是像我的示例那样在0到360°之间绘制和显示

我该怎么做

我提前感谢你的回答