I am trying to create a stacked histogram with the following data:
8.01 1 5 1
8.02 3 5 1
8.03 4 4 1
8.04 3 4 1
8.05 1 2 1
I have tried to adapt the script from the 4th example and at the moment I'm using this:
set title "Test"
set key invert reverse Left outside
set key autotitle columnheader
set style data histogram
set style histogram rowstacked
set style fill solid border -1
set boxwidth 0.75
plot 'test.dat' using 2:xtic(1), '' using 2 title 'Col1', '' using 3 title 'Col2', '' using 4 title 'Col3'
The part I copied which I'm not sure about is using 2:xtic(1)
. I know this makes it use the xtic
values as the first column, which is what I want. But I don't know what the using 2
part represents. This is a screenshot of what the script produces:
Everything is fine on the image except the red bar which should not be there. Could someone explain to me why it is appearing and how to get rid of it?