Luc*_*ein 4 plot smooth gnuplot
数据如下:
38 52.26
41 46.34
42 49.49
Run Code Online (Sandbox Code Playgroud)
使用smooth线条; 我可以在图表行中包含这些点而无需绘制两次吗?
现在我使用:
plot "foo.dat" using ($0):2 smooth csplines title "foo", \
'' using ($0):2 with points title ""
Run Code Online (Sandbox Code Playgroud)

扩展的简化数据集:
38 52.26
39 46.34
42 57.29
43 60.41
44 53.57
45 51.49
46 48.24
49 58.50
50 56.85
51 55.56
52 62.81
54 51.76
55 46.94
56 46.35
57 52.76
59 49.49
62 51.78
63 48.24
65 54.46
66 50.00
Run Code Online (Sandbox Code Playgroud)
这是我的方法:
...
plot "file" using 1:3 notitle with points linestyle 1, \
"" using 1:3 notitle smooth csplines with lines linestyle 1, \
1 / 0 title "title" with linespoints linestyle 1
...
Run Code Online (Sandbox Code Playgroud)

第一个条目绘制图表上的点,没有图例.第二个条目绘制图表上的平滑线,同样没有图例.第三个条目仅用于图例,使用组合的线点.
如果在平滑线上使用线点,它将显示使其平滑的所有点,而不仅仅是数据点.
'linestyle'告诉gnuplot使用相同的样式绘制所有数据,基本上合成线和点来制作线点.第三行,'linespoints',仅适用于图例,并且不会在图上放置任何数据.