无法使用gnuplot更改直方图中的线条颜色

时间:2013-02-28 08:59:22

标签: gnuplot graphing

我使用gnuplot生成直方图,效果很好,但我无法改变条形的颜色(不再)。他们只是忽略我设置的值并使用默认值。我正在使用这个gnuplot脚本:

set terminal png nocrop enhanced font arial 8 size 1024,768
set output '/tmp/output.png'
set border 3 front linetype -1 linewidth 1.000
set boxwidth 0.75 absolute
set style fill solid 1.00 border -1
set grid
set grid layerdefault   linetype 0 linewidth 1.500,  linetype 0 linewidth 1.500
set key outside right top vertical Left reverse enhanced autotitles columnhead nobox
set key invert samplen 4 spacing 1 width 0 height 0
set style histogram rowstacked title  offset character 0, 0, 0
set datafile missing '-'
set style data histograms
set xtics border in scale 1,0.5 nomirror rotate by -45  offset character 0, 0, 0
set xtics ("10" 0.00000,"20" 1.00000,"30" 2.00000,"40" 3.00000,"50" 4.00000,"60" 5.00000,"70" 6.00000,"80" 7.00000,"90" 8.00000,"100" 9.00000)
set title "Multi-Histogram"
set ylabel "Meine Y Achse"
set xlabel "X-Achse"
set yrange [ 0 : 100 ] noreverse nowriteback
set ytics(10,20,30,40,50,60,70,80,90,100)
i = 5

# SETTING COLOR OF BARS
set style line 1 lt 1 lc rgb "green"
set style line 2 lt 1 lc rgb "yellow"
set style line 3 lt 1 lc rgb "red

plot '/tmp/9619555_data.dat' using (100.*$2/$24):(0.5):($2>0?1:2):xtic(1) w boxes lc variable, for [i=2:4] '' using (100.*column(i)/column(5)) title column(i)

这是我的数据文件:

X       leicht  mittel  stark   total
1       20      60      20      100
2       10      30      60      100
3       30      35      35      100
4       20      60      20      100
5       90      5       5       100
6       25      25      50      100
7       33      33      34      100
8       10      10      80      100
9       40      20      40      100
10      70      5       25      100

酒吧颜色旁边的一切都适合我,...我的风格怎么样?

0 个答案:

没有答案