繁体   English   中英

gnuplot-绘制内联数据和点标签

[英]gnuplot - splot inline data and point labels

嗨,我使用此数据来获得3d / 2d直方图。

我想在柱状图的顶部用'dx cx'标签标记每个直方图列。

在我的示例中,图形可以正确绘制,但是没有标签。 如果我只using 1:2:3:4 with labels offset 1using 1:2:3:4 with labels offset 1 ,则显示的标签没有行。 它只在空格字符上显示标签,我可以以某种方式逃脱空格吗?

有人可以帮忙吗?

reset
unset key
set xrange [0:262.5]
set yrange [0:350]
set zrange [0:5]
set xtics 50
set ytics 50 offset .6,-.3
set ztics 1,1
set grid x y z back
set xyplane 0
set terminal pdf
set output "test.pdf"
splot '-' using 1:2:3 with lines, '' using 1:2:3:4 with labels offset 1
27.8409 350 0   
27.8409 350 0.419595    d0 c3
31.8182 350 0.419595    
31.8182 350 0   
31.8182 350 0   
31.8182 350 0.61032 d0 c4
35.7955 350 0.61032 
35.7955 350 0   
35.7955 350 0   
35.7955 350 0.740013    d0 c5
39.7727 350 0.740013    
39.7727 350 0   
39.7727 350 0   
39.7727 350 0.747642    d0 c6
43.75   350 0.747642    
43.75   350 0   
43.75   350 0   
43.75   350 0.633207    d1 c1
47.7273 350 0.633207    
47.7273 350 0   
47.7273 350 0   
47.7273 350 0.442482    d1 c2
51.7045 350 0.442482    
51.7045 350 0   
e 

您的第二个情节永远不会完成。 内联数据在第一部分之后消失了。 您必须提供两次(在“ e”之后再次输入相同的数据集),或者在gp5中可以使用新形式的内联数据:

$data << EOD
1 2 3
2 3 4
3 4 5
EOD
splot $data, $data using 1:2:($2**2)

如果数据是通过stdin(“-”)输入的,则可以使用set table将其绘制到临时文件或内联数据集set table $dat; plot "-"; unset table set table $dat; plot "-"; unset table set table $dat; plot "-"; unset table

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM