如何绘制3列数据的轮廓图
我有一个格式[XYZ]的3列不规则数据。我很难创建轮廓
绘图是相同的,因为它需要一个人创建一个网格,并且数据之间的数据是统一的。
我需要一些方向或提示才能开始。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我有一个格式[XYZ]的3列不规则数据。我很难创建轮廓
绘图是相同的,因为它需要一个人创建一个网格,并且数据之间的数据是统一的。
我需要一些方向或提示才能开始。
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
如您所提到的那样,我提供了两种方式,可以为数据创建一个以3列格式和不规则的数据的轮廓/密度图。
您可以使用Mathematica:请参阅 listDensentyPlot [{{x1,y1,f1},…,{xk,yk,fk}}] ,这将绘制所寻求的密度图。
在Python中也有一种简单的方法:您可以看到 tricontourf ,matplotlib的模块。它的功能类似于
Contourf
的功能,除了您给出1D数组而不是网格网格格式的数据。I am providing two ways in which you can create a contour/density plot for the data which is in 3-column format and irregular, as you have mentioned.
You can use Mathematica: see the documentation of ListDensityPlot. You can directly provide the data as,
ListDensityPlot[{{x1,y1,f1},…,{xk,yk,fk}}]
, and this will plot the sought density plot.There is also a simple way to do this in python: You can see the documentation of tricontourf, a module of matplotlib. Its functionality is similar to that of
contourf
, except that you give 1D arrays rather than the data in mesh grid format.