|
From: Daniel J S. <dan...@ie...> - 2016-11-19 07:41:42
|
I just used the time format in a plot. It's nice, incorporating the date and time and all. So thank you to whomever. It did take me a bit to figure out though why something like this failed: set timefmt "%m/%d/%y %H:%M" plot "data" using 1:2 with data something like 03/03/16 11:30 23.5 03/03/16 11:45 24.8 ... It's because the datafile.c reading routine recognizes that first space as a delimiter such that field ':2' is actually 11 in both cases shown. That's fine, as the following works: plot "data" using 1:3 and the documentation gives proper examples and all, if not explicitly stating. However, it's a bit of a mental juxtaposition because the person scripting the code is thinking of the "03/03/16 11:30" as the "first" entry. Now, gnuplot has string inputs, such as in energy_circles.dat of the demo subdirectory. So, I'm wondering if the the date/time data entry could also accept a datafile string. It shouldn't be too much of a C-code alteration. For example, this might be the equivalent to the above: plot "data" using 1:2 with data "03/03/16 11:30" 23.5 "03/03/16 11:45" 24.8 ... I tried that, and gnuplot doesn't allow it (no surprise, as it isn't documented to do so). The way I see it, the user might be more inclined to think of date/time data in that fashion. Dan |