New to gnuplot. Probably a simple question, but help appreciated.
I am plotting a stacked histogram with 5 sections in each category (from columns 3-7 of the file). Depending on a variable in the second column of data (0 or 1)¸the colours of the sections are either black, green, yellow, magenta, red, or respectively red, magenta, yellow, green, black. I have been trying to make variations of this work:
plot 'themesdat.txt' u 3 not lt rgb ($2?0xff5050:0x808080),\
'' u 4 not lt rgb ($2?0x966496:0x00ff66),\
'' u 5 not lt rgb 0xffff00,\
'' u 6 not lt rgb ($2?0x00ff66:0x966496"),\
'' u 7 :xticlabels(1) not lt rgb ($2?0x808080:0xff5050)
The conditional produces an undefined value error. As I say, probably v simple problem, but I'm stuck!
Edit: sample (top 6 lines) of data file:-
#title band1, band2, band3, band4, band5, labelx, label1, ... label5
#band colours: ff5050¸966496, ffff00, 00ff66, 808080 (reversed for 1,7,8,11,12,16,7,18,19)
Satisfaction 1 43 15 0 16 26 0 "severe problems" probs " " help? fine
Frustration 0 42 11 18 0 29 1 fine help problems "" "severe problems"
CopingAbility 1 47 13 7 11 22 2 "severe problems" probs " " help? fine
Category 1 0 0 0 0 0 3 "" "" "" "" ""
Further edit: I'm thinking this may be impossible - to use a column from the data file to vary colours. Even a simpler construction, rgb ($2), does not appear to work.
If anyone knows otherwise ... ?