|
From: Ico <gn...@ze...> - 2015-10-21 14:40:22
|
* On 2015-10-21 16:23:06 +0200, Marek W. Gutowski wrote:
> "%S" breaks at 60, not 100. You didn't read gnuplot's help, did you?
My apologies if I seem ignorant, but I did read all that before posting,
which is why I was using %s and not %S in the first place. Testing shows
that %S works well up to 99, and not 59 however. The documentation of
timefmt says about %S:
%S second, integer 0--60 on output, (double) on input
Which implies that output is limited from 0 to 60, but input is not.
> Anyway, the time format is tricky, I agree.
It seems, because I still can't get it right.
> Start your commands with
> gnuplot> set xdata time # this is concerns input data
> gnuplot> set format x "%H:%M:%S" # this is for ticks at plot's x axis,
> maybe "%M:%S" will suit you better?
> gnuplot> set timefmt "%s" # lower case, input data format
> Now you may check:
> gnuplot> show format
> gnuplot> show timefmt
> and, if satisfied, proceed with your "plot" command.
> I see a straight line, bingo!
Well, that's funny, I don't! The following snippet still gives me a
crooked line:
http://i.imgur.com/xaEOyPm.jpg
-------------------------
set xdata time
set format x "%M:%S"
set timefmt "%s"
show format
show timefmt
plot "-" using 1:2 with lp
1 0.5
2 1
3 1.5
4 2
5 2.5
6 3
EOT
---------------------------
Output of 'show format' and 'show timefmt'
tic format is:
x-axis: "%M:%S"
y-axis: "% g"
x2-axis: "% g"
y2-axis: "% g"
z-axis: "% g"
cb-axis: "% g"
r-axis: "% g"
read format for time on x axis is "%S"
read format for time on t axis is "%S"
read format for time on u axis is "%S"
--
:wq
^X^Cy^K^X^C^C^C^C
|