Ich benutze Gnuplot_i Bibliothek (Version 2.11) in C-Code, die einige PNG-Bilder erzeugt. Die Spalte Zeit/Datum wird jedoch nicht korrekt formatiert.Gnuplot_i Datum/Uhrzeit Formatierungsfehler
Quelle:
gnuplot_ctrl * h0 ;
h0 = gnuplot_init() ;
gnuplot_set_xlabel(h0, "Header") ;
gnuplot_cmd(h0, "set terminal png size 800,480") ;
gnuplot_cmd(h0, "set output 'picture.png'") ;
gnuplot_cmd(h0, "set xdata time") ;
gnuplot_cmd(h0, "set timefmt '%Y-%m-%d-%H:%M'") ;
gnuplot_cmd(h0, "set format x '%H:%M' ") ;
gnuplot_cmd(h0, "set grid") ;
gnuplot_cmd(h0, "plot \"datafile.tsv\" u 1:2 w l t \"Title\" ");
gnuplot_close(h0) ;
datafile.tsv enthält:
2017-09-08-18:03 12.69
2017-09-08-18:04 12.69
2017-09-08-18:05 12.69
2017-09-08-18:06 12.69
...
Leider gnuplot_cmd(h0, "show timefmt");
produziert Fehler Befehl:
Warning: empty x range
[1.48323e+09:1.48323e+09],
adjusting to [1.4684e+09:1.49806e+09] Default format for reading time data is "%Y-No such file or directory-0- %H:%M"
Warum% m g et formatiert "Keine solche Datei oder Verzeichnis" und% d wie "0"?