gpt4 book ai didi

gnuplot - 在 GNUPLOT 中为不同类别绘制具有指定模式的直方图

转载 作者:行者123 更新时间:2023-12-01 23:08:42 24 4
gpt4 key购买 nike

我现在要用 GNUPLOT 绘制一个 10 类别的直方图。由于类别的数量相对较大,我想自己为不同类别指定模式,而不是应用默认模式设置使不同类别易于区分,例如用虚线填充第一个类别,而第二个阴影等。

plot 命令中是否可以使用任何参数来指定模式?任何提示/建议将不胜感激。提前致谢。

最好的问候!

最佳答案

您可以使用 with boxes fs [pattern|solid] <style-id> .

0      0.0      0.0
1 0.3 0.6
2 1.6 1.6
3 0.3 1.5
4 0.6 3.6
5 0.3 4.3
6 0.3 0.7
7 5.5 5.5
8 6.6 6.6
9 5.2 5.2
10 8.3 8.3
11 2.7 5.0
12 2.8 8.3
13 3.3 2.8
14 7.9 3.9
15 9.9 7.9
16 15.3 15.3
17 14.7 14.7
18 3.8 18.1
19 18.1 12.1

Gnuplot 脚本:

set style data hist
set style histogram rowstacked
plot 'test.dat' us 2:xtic(1) fs solid 1 ls 3, '' us 3 fs pattern 1

enter image description here

查看此链接了解更多详情:

关于gnuplot - 在 GNUPLOT 中为不同类别绘制具有指定模式的直方图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7239801/

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