-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathiris_scatterplot_matrix.gnuplot
More file actions
72 lines (64 loc) · 1.61 KB
/
iris_scatterplot_matrix.gnuplot
File metadata and controls
72 lines (64 loc) · 1.61 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
67
68
69
70
71
72
set size square
unset key
unset xtics
unset ytics
binwidth=0.1
bin(x,width)=width*floor(x/width) + binwidth/2.0
set boxwidth 0.9*binwidth
set terminal pdfcairo enhanced font "League Spartan,8" size 10cm,10cm;
set output "Iris_scatterplot_matrix.pdf";
set multiplot layout 4,4\
margins 0.05,0.95,0.05,0.95\
spacing screen 0.0
set offsets 0.25,0.25,0.25,0.25
set pointsize 0.5
do for [i=1:4] {
do for [j=1:4] {
if (i == 1) {
if (j == 1) {
set x2label "Sepal length";
set ylabel "Sepal length";
}
if (j == 2) {
set x2label "Sepal width";
set ylabel "";
}
if (j == 3) {
set x2label "Petal length";
set ylabel "";
}
if (j == 4) {
set x2label "Petal width";
set ylabel "";
}
}
else {
if (j == 1) {
if (i == 2) {
set x2label "";
set ylabel "Sepal width";
}
if (i == 3) {
set x2label "";
set ylabel "Petal length";
}
if (i == 4) {
set x2label "";
set ylabel "Petal width";
}
}
else {
set x2label "";
set ylabel "";
}
}
if (i != j) {
plot "iris.txt" index 0 using i:j with points pt 7 lc rgb '#C41E3A',\
"" index 1 using i:j with points pt 7 lc rgb '#4682B4',\
"" index 2 using i:j with points pt 7 lc rgb '#FFBF00';
}
else {
plot "iris.txt" using (bin(column(i),binwidth)):(1.0) smooth freq with boxes fs solid 0.5 lc '#999999';
}
}
}