Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gnuplot中的动态彩色条形图?_Gnuplot_Bar Chart - Fatal编程技术网

Gnuplot中的动态彩色条形图?

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

如果不显式地选择颜色,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 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}