-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.sh
More file actions
executable file
·66 lines (47 loc) · 1.42 KB
/
plot.sh
File metadata and controls
executable file
·66 lines (47 loc) · 1.42 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
FILE=./dict.dat
cd data
if [ -f $FILE ]; then
gnuplot -persist <<-EOFMarker
set size 1,1
set origin 0,0
set multiplot
set grid
set xtics 0.2
set ytics 0.1
# First graph
set size 0.5,0.72
set origin 0,0.28
set xlabel "[u1]"
set ylabel "[u2]"
set key out vert bot center
plot 'dict.dat' index 0 using 1:2 with points pt 6 ps 2 lc rgb 'red' title "Carcinoid",\
'dict.dat' index 1 using 1:2 with points pt 4 ps 2 lc rgb 'green' title "Colon",\
'dict.dat' index 2 using 1:2 with points pt 2 ps 2 lc rgb 'blue' title "Normal",\
'dict.dat' index 3 using 1:2 with points pt 8 ps 2 lc rgb 'black' title "SmallCell"
# Second graph
set size 0.5,0.5
set origin 0.5,0.5
set xlabel "[u1]"
set ylabel "[u3]"
set nokey
plot "dict.dat" index 0 using 1:3 with points pt 6 ps 2 lc rgb "red",\
"dict.dat" index 1 using 1:3 with points pt 4 ps 2 lc rgb "green",\
"dict.dat" index 2 using 1:3 with points pt 2 ps 2 lc rgb "blue",\
"dict.dat" index 3 using 1:3 with points pt 8 ps 2 lc rgb "black"
# Third graph
set size 0.5,0.5
set origin 0.5,0
set xlabel "[u2]"
set ylabel "[u3]"
set nokey
plot "dict.dat" index 0 using 2:3 with points pt 6 ps 2 lc rgb "red",\
"dict.dat" index 1 using 2:3 with points pt 4 ps 2 lc rgb "green",\
"dict.dat" index 2 using 2:3 with points pt 2 ps 2 lc rgb "blue",\
"dict.dat" index 3 using 2:3 with points pt 8 ps 2 lc rgb "black"
unset multiplot
reset
EOFMarker
else
echo "Error: Data file does not exist."
fi