如何绘制3列数据的轮廓图

发布于 2025-02-10 15:28:28 字数 107 浏览 3 评论 0 原文

我有一个格式[XYZ]的3列不规则数据。我很难创建轮廓 绘图是相同的,因为它需要一个人创建一个网格,并且数据之间的数据是统一的。

我需要一些方向或提示才能开始。

I have a 3 column irregular data in the format [X Y Z]. I am having difficulty in creating a contourf
plot for the same since it requires one to create a meshgrid and also that data be uniform among the grid.

I need some direction or hint to get started.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伤感在游骋 2025-02-17 15:28:28

如您所提到的那样,我提供了两种方式,可以为数据创建一个以3列格式和不规则的数据的轮廓/密度图。

  1. 您可以使用Mathematica:请参阅 listDensentyPlot [{{x1,y1,f1},…,{xk,yk,fk}}] ,这将绘制所寻求的密度图。


  2. 在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.

  1. 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.

  2. 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文