I was trying to learn plotting with gnu-plot trough a example with C programming but the following message keeps repeating when i try to plot:
"Warning: Skipping data file with no valid points"
"x rang is invalid"
I don't know what it meant with that. I compiled the file and it didn't give me any errors and this is from a already made example. Why exactly am i not able to plot?
The code is as follows:
#include <stdio.h>
#include <math.h>
int main(void)
{
double t = 0.0, x, y;
FILE *fp;
fp = fopen("data6-7.txt","w");
do
{
x = cos(2*M_PI*t);
y = sin(2*M_PI*t);
fprintf(fp, "%f %f %f\n", t, x, y);
t = t + 0.01;
} while (t <= 1.0);
fclose(fp);
return 0;
}
gnuplot?gnuplotfrom a bash script anyway.