0
所以我试图在gnuplot中使用pm3d进行绘图。不幸的是,我似乎遇到了这样一个问题,即情节是创建的,没有点或线。gnuplot pm3d没有绘图点
这里是产生点为程序代码:
#include<stdio.h>
#include<math.h>
int main() {
double x = -10000;
double y = 0;
double z = 0;
FILE *cool = fopen("coolbeans.txt", "w");
fprintf(cool, "#x\ty\tz\n");
for (int i = 0; 1 < 10000; i++) {
x = x + 10;
y = sqrt(abs(x));
z = -200*(sin(x));
fprintf(cool, "%1.0f\t%f\t%f\n\n", x, y, z);
}
fclose(cool);
return 0;
}
接下来,我打开gnuplot的,然后输入以下命令:
set term jpeg size 3200, 1800
set output 'example.jpg'
splot 'coolbeans.txt' using 1:2:3 with pm3d
然后我得到这个:
任何帮助将非常感谢!
Ohhhhh,非常感谢你设置这个直线!现在变得更有意义:) – Ben