gnuplot filledcurves

完整的作图过程,数据,最后结果如下所示,其中数据只列出了一部分:

set term pdf
set output "f11_cpu.pdf"
set grid
set title "CPU Total for Insert MongoDB"
set xlabel "Time (second)"
set ylabel "CPU%"

set xrange [0:300]
set yrange [0:100]
set key horizontal

set style data filledcurves
set style fill transparent pattern 1
plot "f11_cpu.txt" using 1:2 with filledcurves xy=0,0 lw 1 title "User%", '' using 1:2: 3 with filledcurves xy=0,0 lw 1 title "Sys%", '' using 1:3:4 with filledcurves lw 1 title "Wait%"

quit

 

1 22.4 29.2 29.3
2 50 66.6 66.7
3 52.6 70.7 70.8
4 55.6 75.2 75.3
5 50 76.7 77.1
6 51.5 74.9 75.0
7 50.1 77.1 77.3
8 53.4 79.2 79.3
9 53.6 75.7 75.8
10 55.1 74.6 74.7
11 57.1 76.8 76.9
12 50 72.9 73.0
13 54.1 73.5 73.8
14 53.8 71.5 71.6
15 51.9 69.5 69.6
16 53.7 73.8 73.9
17 54.3 77.1 77.3
18 57.7 77.3 77.4
19 58.9 77.4 77.5
20 54.5 73.1 73.2
21 53.8 71.6 71.9
22 51.3 68.0 68.2
23 27.3 39.2 39.4
24 23.5 31.8 31.9
25 17.5 22.7 22.7
26 32.9 43.6 44.0
27 54.6 73.9 74.0
28 58.4 77.8 77.9
29 57.4 78.4 78.5
30 57.1 78.1 78.8
31 58.4 77.9 78.0
32 57.5 76.9 77.0
33 56.8 77.7 77.9
34 60.1 80.2 80.3
35 58.5 76.8 76.9
36 57.7 76.1 76.2
37 55.9 73.8 73.9
38 56.2 76.1 76.2
39 57.6 77.9 78.0
40 58.6 81.2 81.4
41 56.3 80.6 80.7
42 55.8 80.2 80.4
43 60.8 82.7 82.8
44 57.6 80.4 80.5
45 56.1 78.8 79.0
46 57.3 78.4 78.5
47 55 75.5 75.7

用gnuplot画filledcurves图一直不显示边线,大家可以帮忙看下吗。我的画图命令和数据如下:

set term pdf

set output "test.pdf"

set xlabel "Time (second)"

set ylabel "CPU%"



set xrange [0:300]

set yrange [0:100]



set style data filledcurves

set style fill transparent pattern 1

plot "test.txt" using 1:2 with filledcurves xy=0,0 lw 1 title "User%", "" using 1:2:3 with filledcurves lw 1 title "Sys%"

exit

我的数据格式如下:

1  30  70

2  20  80

3  50  50

...

原文地址:https://www.cnblogs.com/i4oolish/p/6278454.html