简体   繁体   English

Polar map 来自现有的笛卡尔坐标和 matplotlib 中的 phi 值

[英]Polar map from existing Cartesian coordinates and phi values in matplotlib

I am trying to plot a polar colour heat map for a set of coordinates (coor) and corresponding phi values.我正在尝试 plot 极色热 map 一组坐标 (coor) 和相应的 phi 值。 I have used the tripcolor function as follows:我使用了 tripcolor function 如下:

plt.tripcolor(coor[:, 0], coor[:, 1], phi, shading=shading, cmap=cmap, edgecolor="face")
plt.show()

This is the result that I got: PlotMesh这是我得到的结果: PlotMesh

Is there a way to make the outer grid circular?有没有办法使外部网格呈圆形?

I would try to create a triangulation from the coordinates:我会尝试从坐标创建三角剖分:

import matplotlib.tri as tri
triang = tri.Triangulation(coor[:, 0], coor[:, 1])
plt.tripcolor(triang, phi, shading=shading, cmap=cmap, edgecolor="face")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM