[英]Surface plot from txt file in python
What is the simplest way to create a surface plot from a .txt
file with data points arranged in, say N
rows and M
columns? 用
.txt
文件创建数据点(例如N
行和M
列)的最简单方法是什么? I just want to see what the file looks when layed onto a plane with each data point representing the height of the surface at that point, so to speak. 我只想看文件放在平面上时的外观,每个数据点代表该点的表面高度。
Assuming you can read the file into a matrix, you can use most popular plotting libraries to create a contour plot. 假设您可以将文件读入矩阵,则可以使用最流行的绘图库来创建轮廓图。 (Contour is the 2D equivalent of surface, which is 3D).
(轮廓是等效于曲面的2D,即3D)。
Examples here: https://plot.ly/python/contour-plots/ 此处的示例: https : //plot.ly/python/contour-plots/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.