【发布时间】:2016-08-29 17:17:17
【问题描述】:
我正在尝试使用 GNUplot 制作条形图,每个条形图都有不同的颜色。我在手册中发现可以使用 lc rgbcolor 变量来完成。
我的数据文件夹是这样的,
ACB 0.106372
ASW 0.10909
BEB 0.110973
CDX 0.106577
CEU 0.102091
CHB 0.108829
CHS 0.110807
CLM 0.108803
我的剧情脚本如下,
set style histogram gap 2
set autoscale y
set style fill solid
set xtics rotate by 90 offset 0,-1.2
rgb(r,g,b) = 65536 * int(r*10) + 256 * int(g*10) + int(b*10)
set boxwidth .5
set output "Plot.eps"
plot "plot.tsv" using 2:xticlabels(1):(rgb($2,$2,$2)) with boxes lc rgb variable
我使用了 GNUplot 手册中显示的 rgb 函数。但它显示以下错误。
plot "plot.tsv" using 2:xticlabels(1):(rgb($2,$2,$2)) with boxes lc rgb variable
^
"#Plot.plt", line 18: x range is invalid
我无法弄清楚错误的含义。
请帮忙。
提前致谢。
【问题讨论】: