So I'm pretty new to GnuPlot, and 开发者_运维问答I can't seem to find out why I'm getting the error I am.
Here's a sample of my data.txt file in the format (irrelevant id,name,time) :
3|Harpos|2010-08-28 02:44:55
4|Harpos|2010-08-29 02:22:25
5|Harpos|2010-08-29 02:09:19
26|Harpos|2010-09-03 03:01:09
With the following configurations (the xrange is the ultimate bounds of my data):
set xdata time
set timefmt x "%Y-%m-%d %H:%M:%S"
set xrange ["2010-08-28 02:44:55":"2010-12-19 16:46:55"]
set yrange [0:500]
What I'm trying to plot is this:
plot '/Users/kyleturner/Desktop/Harpos-placeholder.txt' using 0:3
As I'm trying to generate the # of occurrences (0 being the sequence # for each occurrence) in my data that happen at a specific time (over series of months).
However, I keep getting the error:
"Bad format character"
Am I executing the "using" command incorrectly? Can someone steer me in the right direction? Once I get this down I'll be able to run some extensive sqlite queries to start generating some visuals.
Thank you for your help, please let me know if I missed any details.
I think you are missing
set datafile separator "|"
Also, it seems you want to have the date on the x-axis, and so you probably want
plot '/Users/kyleturner/Desktop/Harpos-placeholder.txt' using 3:0
Your handling of the time format is fine.
精彩评论