Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
3d Gnuplot,如何从不同的文本输入文件绘制三维网格_3d_Gnuplot_Mesh - Fatal编程技术网

3d Gnuplot,如何从不同的文本输入文件绘制三维网格

3d Gnuplot,如何从不同的文本输入文件绘制三维网格,3d,gnuplot,mesh,3d,Gnuplot,Mesh,我有几个包含3列的文本文件,希望使用网格创建3d打印。 这些文件看起来像: file1.txt file2.txt file3.txt 正如您所注意到的,每个文件中的所有y值都是常量,因为我希望研究Z作为函数y的变化。 现在我当然知道我可以用 splot "file1.txt" u 1:2:3 w l \ ,"file2.txt" u 1:2:3 w l \ ,"file3.txt" u 1:2:3 w l 但是,我想创建一个具有常数X的线的网格,这样我就有了一个显示轮

我有几个包含3列的文本文件,希望使用网格创建3d打印。
这些文件看起来像:

file1.txt

file2.txt

file3.txt

正如您所注意到的,每个文件中的所有y值都是常量,因为我希望研究Z作为函数y的变化。
现在我当然知道我可以用

splot "file1.txt" u 1:2:3 w l  \
     ,"file2.txt" u 1:2:3 w l  \
     ,"file3.txt" u 1:2:3 w l

但是,我想创建一个具有常数X的线的网格,这样我就有了一个显示轮廓的网格(通过这种方式,Z如何随X和Y变化变得更清晰)。有什么想法/建议吗?

是的,您可能还可以使用命令行实用程序做一些事情,就像您的另一个问题一样。但是,在不知道其他解决方案是否有效的情况下,继续回答是毫无意义的……嗯,是的,我以前的问题已经解决了,谢谢你!如果您解决了问题,您可以为其他用户发布答案。请验证当您在问题中书写时,数据是否显示双空格,这可能导致不同的答案。(
1 3 12
2 3 11
后面的行,两个空格,而只有一个空格)。
X    Y    Z  

1  2 3

2 2 4

3 2 10

4 2 12
X    Y    Z  

1  3 12

2 3 11

3 3 13

4 3 12
splot "file1.txt" u 1:2:3 w l  \
     ,"file2.txt" u 1:2:3 w l  \
     ,"file3.txt" u 1:2:3 w l