# set terminal canvas solid butt size 600,400 fsize 10 lw 1 fontscale 1 name "varcolor_6" jsdir "." # set output 'varcolor.6.js' set boxwidth 0.2 absolute unset key set style data lines set title "variable color using 'lc rgb variable'" set xrange [ 0.00000 : 11.0000 ] noreverse nowriteback set yrange [ -4.00000 : 10.0000 ] noreverse nowriteback by3(x) = (((int(x)%3)+1)/6.) by4(x) = (((int(x)%4)+1)/7.) rgbfudge(x) = x*51*32768 + (11-x)*51*128 + int(abs(5.5-x)*510/9.) GPFUN_by3 = "by3(x) = (((int(x)%3)+1)/6.)" GPFUN_by4 = "by4(x) = (((int(x)%4)+1)/7.)" GPFUN_rgbfudge = "rgbfudge(x) = x*51*32768 + (11-x)*51*128 + int(abs(5.5-x)*510/9.)" plot 'candlesticks.dat' using 1:5:2:6:(.2):(rgbfudge($1)) with boxerror lc rgb var fs solid 0.5 noborder, '' using 1:(1):(rgbfudge($1)) with points pt 11 lc rgb var, '' using 1:(8):(by3($0)):(by4($0)):(rgbfudge($1)) with xyerrorbars lc rgb var, '' using ($1+.5):($2/2):(rgbfudge($1)) with impulses lc rgb var lw 3, '' using 1:(-3):(0.5):(1):(rgbfudge($1)) with vectors lc rgb var, '' using 1:(-1):1:(rgbfudge($1)) with labels tc rgb var point