Gnuplot中的动态彩色条形图?
如果不显式地选择颜色,GNU plot有没有办法根据键选择一些不同的颜色(比如散列?)Gnuplot中的动态彩色条形图?,gnuplot,bar-chart,Gnuplot,Bar Chart,如果不显式地选择颜色,GNU plot有没有办法根据键选择一些不同的颜色(比如散列?) #git版本列表--计数主机 $commits在works中提供的解决方案也没有定义线型。Gnuplot将使用默认值 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
#git版本列表--计数主机
$commits在works中提供的解决方案也没有定义线型。Gnuplot将使用默认值
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 0:2:($0+1):xtic(1) with boxes lc variable
也可以使用其他预定义的颜色序列之一添加以下行:
set colors {default|classic|podo}
请参阅帮助格式说明符
。命令set ytics format“%.0s%c”
将生成100k 200k 300k标签。。。谢谢。所以看来lc变量
就是我想要的魔法。我还有一个问题,你能解释一下0:2:($0+1)
btw吗?使用说明符中的最后一列是“lc变量”所必需的,它标识了用于绘制每行的线型索引。每个线型都有自己的关联颜色$0是行号,此处用于指定索引。
set colors {default|classic|podo}