【发布时间】:2020-07-09 02:02:18
【问题描述】:
如果不像Different coloured bars in gnuplot bar chart? 那样明确选择颜色,GNU plot 是否可以根据键选择一些可区分的颜色(如哈希?)?
# git rev-list --count master
$commits << EOD
gecko 716280
webkit 226748
blink 906439
EOD
set terminal png
set yrange [0:*] # start at zero, find max from the data
set boxwidth 0.5 # use a fixed width for boxes
unset key # turn off all titles
set style fill solid # solid color boxes
set title 'commits'
plot '$commits' using 2:xtic(1) with boxes
奖励:不是 1x10^6(我觉得很奇怪),而是简单地说 716k、227k、906k。 IE。 Y 轴的刻度为 1000 秒。
【问题讨论】:
-
见
help format specifier。命令set ytics format "%.0s%c"将生成标签 100k 200k 300k ... 1M。