Re: [OT] [Solved]Datensatz format GNUPlot
>>> Hallo,
>>>
>>> ich habe ein File das Daten enthält die ich mit Gnuplot plotten möchte.
>>> Die Daten sehen wie folgt aus:
>>> '2007-02-07 14:05:00', 781, 252
>>> '2007-02-07 14:05:01', 281, 886
>>> '2007-02-07 14:05:01', 781, 657
>>> '2007-02-07 14:05:02', 281, 150
>>> Problem ist das Gnuplot das Leerzeichen ja als Trennung für den
>>> nächsten Datensatz benutzt. Ich möchte aber das z.B. "2007-02-07 14:05:00"
und "781"
>>> zusammen als ein Wert (x-Wert) und die "252" als y-Wert interpretiert wird.
>>> Kennt sich hier jemand mit Gnuplot aus und weiß wie ich das machen
>>> kann oder muss ich mein Datenfile vorher umstricken...?
>>aus der Hilfe zu GnuPlot:
>>Examples:
>>This creates a plot of the sum of the 2nd and 3rd data against the
>>first: The format string specifies comma- rather than space-separated
>>columns. The same result could be achieved by specifying `set datafile
>>separator ","`.
>> plot 'file' using 1:($2+$3) '%lf,%lf,%lf'
>>MfG
>>Frank
>Danke erstmal, funktioniert aber mit den obigen Daten nicht.
>Hier meine eingabe:
>gnuplot> set datafile separator ","
>gnuplot> plot 'data1.dat' using ($1+$2):3
^
> x range is invalid
>gnuplot>
Habe es hinbekommen! Man kann Gnuplot sagen das die Daten im Timeformat
vorliegen, dann gehts auch!
gnuplot> set xdata time
gnuplot> set timefmt "%Y-%m-%d %H:%M:%S
gnuplot> plot "data1.dat" using 1:2
funktioniert jetzt! Zwar ohne Milliseconds aber ist nicht so schlimm.
Danke & Gruß
--
Haeufig gestellte Fragen und Antworten (FAQ):
http://www.de.debian.org/debian-user-german-FAQ/
Zum AUSTRAGEN schicken Sie eine Mail an
debian-user-german-REQUEST@lists.debian.org
mit dem Subject "unsubscribe". Probleme? Mail an listmaster@lists.debian.org
(engl)
Reply to: