File: gm2gpl-plot_1_test.scr

package info (click to toggle)
gnumed-server 22.19-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,148 kB
  • sloc: sql: 1,217,279; python: 15,659; sh: 1,582; makefile: 20
file content (42 lines) | stat: -rw-r--r-- 1,087 bytes parent folder | download | duplicates (7)
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
32
33
34
35
36
37
38
39
40
41
42
#----------------------------------------------------
# GNUmed gnuplot graphing script example:
#
# plot one test result type
#----------------------------------------------------

# general
#set title "GNUmed test results"			# enable this if you want a title
set grid xtics ytics
set autoscale
set datafile missing '<?>'
set key autotitle columnheader
set bmargin 5


# x axis
set xtics rotate by 360-45
set xdata time
set timefmt "%Y-%m-%d_%H:%M"


# plot
plot gm2gpl_datafile using 1:2:(valid(4) ? column(4) : $2):(valid(5) ? column(5) : $2):xticlabels(10) index 0 with yerrorbars, \
     gm2gpl_datafile using 1:2:3 index 0 notitle with labels offset 0, 1


# detect and adjust x range by 2 hours
set xrange [(GPVAL_X_MIN - 7200):(GPVAL_X_MAX + 7200)]

# detect and adjust y range by 5%
five_percent = abs(GPVAL_Y_MIN * 5 / 100)
loffset = (GPVAL_Y_MIN == 0) ? 1 : five_percent
hoffset = (GPVAL_Y_MAX == 0) ? 1 : five_percent
set yrange [(GPVAL_Y_MIN - loffset):(GPVAL_Y_MAX + hoffset)]


# enable this if you want .png output:
#set terminal png
#set output "gnumed-lab.png"


replot