File: example-spectrum.gp

package info (click to toggle)
audiowmark 0.6.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,168 kB
  • sloc: cpp: 10,571; sh: 1,867; makefile: 107; python: 34
file content (29 lines) | stat: -rw-r--r-- 813 bytes parent folder | download
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
set terminal pngcairo size 800,450
set output 'example-spectrum.png'

# Set bar width
set boxwidth 0.5
set style fill solid border -1
set linetype 1 lc rgb "#990000" lw 1
set linetype 2 lc rgb "#009900" lw 1
set linetype 3 lc rgb "#666666" lw 1

set arrow from graph 0,1 to graph 0,1.1 filled
set arrow from graph 1,0 to graph 1.1,0 filled
set tmargin 5
set rmargin 10
set border 3
set tics nomirror
set noxtics
set noytics
set grid
set ylabel "Magnitude"
set xlabel "Frequency"

# Set the range for y-axis
set yrange [0:*]

# Plot the data with different colors
plot "example-spectrum.dat" using 1:2:3 with boxes lc variable notitle, \
     "<grep '1$' example-spectrum.dat" u 1:2:(0):(1500) with vectors lc 1 notitle, \
     "<grep '2$' example-spectrum.dat" u 1:($2+1500):(0):(-1500) with vectors lc 2 notitle