Skip to content

Commit c4d7659

Browse files
committed
improved spiderweb
1 parent 66e6dc7 commit c4d7659

File tree

2 files changed

+13
-51
lines changed

2 files changed

+13
-51
lines changed
Lines changed: 13 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
set terminal pdfcairo enhanced dashed size 8, 4;
1+
set terminal pdfcairo enhanced size 8in, 4in
22
set output "spiderweb.pdf"
33

44
# General Settings
55

6-
set title "Title"
6+
#set title "Title"
77
set datafile separator " "
8-
set grid
98
unset border
109

1110
# Margins
@@ -19,33 +18,7 @@ set bmargin 0;
1918

2019
set key top left
2120

22-
# Chart Type
23-
24-
set spiderplot
25-
set style spiderplot linewidth 2 dashtype solid pointtype 1 pointsize default
26-
set style spiderplot fillstyle transparent solid 0.5
27-
set size ratio 1 1,1
28-
set style data spiderplot
29-
30-
unset xtics
31-
unset ytics
32-
unset ztics
33-
unset cbtics
34-
unset rtics
35-
36-
unset paxis 1 tics
37-
unset paxis 2 tics
38-
unset paxis 3 tics
39-
unset paxis 4 tics
40-
unset paxis 5 tics
41-
42-
set xrange [ * : * ] noreverse writeback
43-
set x2range [ * : * ] noreverse writeback
44-
set yrange [ * : * ] noreverse writeback
45-
set y2range [ * : * ] noreverse writeback
46-
set zrange [ * : * ] noreverse writeback
47-
set cbrange [ * : * ] noreverse writeback
48-
set rrange [ * : * ] noreverse writeback
21+
# Default Colors
4922

5023
COLOR_1="#9E77A1"
5124
COLOR_2="#9A8FBB"
@@ -55,42 +28,31 @@ COLOR_5="#7ED9B1"
5528
COLOR_6="#B2ED90"
5629
COLOR_7="#FDF57A"
5730

31+
# Chart Type
32+
33+
set spiderplot
34+
set style spiderplot fillstyle transparent solid 0.3 border linewidth 1 pointtype 6 pointsize 1.2
35+
set grid spider linetype -1 linecolor "grey" lw 1
36+
5837
set paxis 1 range [ 0 : 10 ] noextend
5938
set paxis 1 label "metric1"
60-
set paxis 1 label textcolor lt -1 norotate
61-
set paxis 1 label linecolor rgb COLOR_1
6239

6340
set paxis 2 range [ 0 : 10 ] noextend
6441
set paxis 2 label "metric2"
65-
set paxis 2 label textcolor lt -1 norotate
66-
set paxis 1 label linecolor rgb COLOR_2
6742

6843
set paxis 3 range [ -1 : 1 ] noextend
6944
set paxis 3 label "metric3"
70-
set paxis 3 label textcolor lt -1 norotate
7145

7246
set paxis 4 range [ 0 : 10 ] noextend
7347
set paxis 4 label "metric4"
74-
set paxis 4 label textcolor lt -1 norotate
7548

7649
set paxis 5 range [ 0 : 20 ] noextend
7750
set paxis 5 label "metric5"
78-
set paxis 5 label textcolor lt -1 norotate
7951

8052
set for [i=1:5] paxis i tics
8153

82-
set grid spider linetype black linecolor "grey" linewidth 0.5 back
83-
8454
plot for [i=1:5] "data.txt" using i title columnhead, \
85-
keyentry with spiderplot linecolor rgb COLOR_1 linewidth 1 title "Alg1", \
86-
keyentry with spiderplot linecolor rgb COLOR_2 linewidth 1 title "Alg2", \
87-
keyentry with spiderplot linecolor rgb COLOR_3 linewidth 1 title "Alg3", \
88-
keyentry with spiderplot linecolor rgb COLOR_4 linewidth 1 title "Alg4", \
89-
90-
# Generate automatically the same figure in .png format
91-
# 8in == 768px and 4in == 384px
92-
93-
set terminal pngcairo notransparent enhanced font "arial,10" size 768, 384
94-
set output "spiderweb.png"
95-
96-
replot
55+
keyentry with spiderplot linestyle 1 title "Alg1", \
56+
keyentry with spiderplot linestyle 2 title "Alg2", \
57+
keyentry with spiderplot linestyle 3 title "Alg3", \
58+
keyentry with spiderplot linestyle 4 title "Alg4", \
2.21 KB
Binary file not shown.

0 commit comments

Comments
 (0)