gpt4 book ai didi

plot - 在 gnuplot smooth 中包含数据点

转载 作者:行者123 更新时间:2023-12-02 11:58:52 24 4
gpt4 key购买 nike

数据为:

38 52.26
41 46.34
42 49.49

使用平滑线条;我可以将点包含在图表线上而不需要绘制两次吗?

现在我使用:

plot "foo.dat" using ($0):2 smooth csplines title "foo", \
'' using ($0):2 with points title ""

Sample graph

扩展简化数据集:

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

最佳答案

这是我的方法:

...
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
...

enter image description here

第一个条目绘制图表上的点,没有图例。第二个条目在图表上绘制平滑线,同样没有图例。第三个条目仅用于图例,使用组合的线点。

如果您在平滑线上使用线点,它将显示使其平滑的所有点,而不仅仅是数据点。

'linestyle' 告诉 gnuplot 使用相同的样式绘制所有数据,基本上将线和点合成为线点。第三行“linespoints”仅用于图例,不会在绘图上放置任何数据。

关于plot - 在 gnuplot smooth 中包含数据点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13916678/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com