I have a simple gnuplot script to plot a histogram with differently colored bars, with each color representing a group.
How can I show 3 different keys (1 red, 1 green and 1 blue)?
This is my script:
unset title
set key left
set yrange [0:10]
set ylabel 'Score'
set xtics rotate out
set style histogram gap 1
set style data histogram
set style fill solid 1.00 border 0
set linetype 1 lc rgb 'red'
set linetype 2 lc rgb 'red'
set linetype 3 lc rgb 'red'
set linetype 4 lc rgb 'green'
set linetype 5 lc rgb 'green'
set linetype 6 lc rgb 'green'
set linetype 7 lc rgb 'blue'
set linetype 8 lc rgb 'blue'
set linetype 9 lc rgb 'blue'
set xtics nomirror
set ytics nomirror
plot 'example.dat' using ($0):2:($0+1):xtic(1) with boxes linecolor variable notitle
and here my example.dat file:
A 1
B 2
C 3
D 4
E 5
F 6
G 7
H 8
I 9
I have not 10 rep points to post imgs, so these are imgur links to: what I get and what I want
Thanks in advance

