1
データファイルからGNUplotを使用してグラフをプロットするコードを書いています。GNUPlot:警告:有効なポイントのないデータファイルをスキップ
それは警告を与えている:
警告:
{ FILE *gnuplotPipe, *tempDataFile; FILE * pFile; char *tempDataFileName; char *Datafile; double x, y; int i; tempDataFileName = "Pulse.txt"; Datafile = "PulseFinal.dat"; gnuplotPipe = _popen("gnuplot", "w"); if (gnuplotPipe) { fprintf(gnuplotPipe, "plot \"%s\" '-' using 1:2 with lines", Datafile); fflush(gnuplotPipe); printf("press enter to continue..."); getchar(); fprintf(gnuplotPipe, "exit \n"); } else { printf("gnuplot not found..."); } }
データファイルは次のとおりです:
有効なポイント0.000000 0.018519 1.000000 0.000000 2.000000 0.000000 3.000000 0.000000 4.000000 0.000000 5.000000 0.000000 6.000000 0.000000 7.000000 0.000000 8.000000 0.000000 9.000000 0.000000 10.000000 -0.006173
コードがあると、データファイルをスキップ
誰かがこれで私を助けてくれますか?
ファイルにあなたのパイプ出力を送信し、それが有効なgnuplotのスクリプトであるかどうか確認をお勧めすることができます。 Btw: "GNUplot"ではなく "gnuplot"です。 – Karl