Re: Displaying a data number on the graph - (reposting)
- From: Mike Evans <mikee@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 28 Nov 2009 13:10:19 +0000
MamboKnave wrote:
Ok, I am re-posting as it seems I was not clear.I was looking for a similar solution for displaying the last temperature
I'm successfully plotting column 14 of a 15 columns data file made of
one single block. Here is the command line:
plot "TS-plus.csv" using 1:14:xticlabel(2) title "VARIANCE" with lines
linecolor rgb "blue"
Now I need ALSO to display on the same graph the last number of col
14, i.e. the number on top of column 14 of the data file, which is
0.5667. I need displaying only that and no other numbers.
I can display all the numbers in col 14 using this command line:
plot "TS-plus.csv" using 1:14:xticlabel(2) title "VARIANCE" with lines
linecolor rgb "blue", \
"" using 0:14:14 with labels center offset 0,1 notitle
but that's not good as I need to display the last data only.
I also played unsuccessfully with “every” (grazie iltommi!) but I
cannot keep the graph AND add just that number to it.
Hope someone can help... Thanks!
value logged into a file looking like:
2009-11-28 12:00:01 7.3
2009-11-28 12:05:02 7.2
2009-11-28 12:10:03 7.1
2009-11-28 12:15:03 7.1
2009-11-28 12:20:04 7.0
2009-11-28 12:25:05 7.0
2009-11-28 12:30:06 6.8
2009-11-28 12:35:06 6.7
2009-11-28 12:38:41 6.7
2009-11-28 12:43:42 6.7
Although a bit late I suspect, my solution.
ct = `tail -n1 tlog.csv | awk '{print $3}'`
set label "Current temperature=%2.1s^oC",ct at screen 0.05,0.02
plot...
Note: Those are backticks surrounding the shell command in the first line.
For the first line of your data file use `head -n1` $3 is for the column
number. No use for Windows users I suspect as this was on a Linux system.
.
- Prev by Date: Long text strings
- Next by Date: Re: gnuplot's tiny problems
- Previous by thread: Long text strings
- Next by thread: Plotting XY-data over time
- Index(es):
Relevant Pages
|