-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_commands.txt
32 lines (24 loc) · 974 Bytes
/
plot_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
set xrange [50:100]
stats '20230108005845.csv' u 3:4 nooutput
min_spo2 = STATS_min_x
max_spo2 = STATS_max_x
mean_spo2 = STATS_mean_x
min_bpm = STATS_min_y
max_bpm = STATS_max_y
mean_bpm = STATS_mean_y
episodes_below_90 = 1
set xdata time
set timefmt "%Y-%m-%d, %H:%M:%S"
set xrange ["2023-01-08, 00:58:45":"2023-01-08, 07:46:33"]
set yrange [40:100]
set key autotitle columnhead
set key bottom
set terminal pdf size 29.7cm,21cm font "Menlo"
set output 'out.pdf'
set grid ytics
set title '8. Januar 2023'
set label sprintf(" min SpO2 = %d\n max SpO2 = %d\nmean SpO2 = %d", min_spo2, max_spo2, mean_spo2) at character 10,5
set label sprintf(" min BPM = %d\n max BPM = %d\nmean BPM = %d", min_bpm, max_bpm, mean_bpm) at character 30,5
set label sprintf("Episodes <90 = %d", episodes_below_90) at character 50,5 offset 0,-2
plot '20230108005845.csv' u 1:($3 == 0 ? NaN : $3) w l t 'SpO2' lt rgb "blue" lw 0, \
'' u 1:($4 == 0 ? NaN : $4) w l t 'BPM' lt rgb "red" lw 0