Is there any way to have variable arrowheads AND variable colors?
I know that I can define different arrowstyle with different heads. However, if I am using variable arrowstyle I cannot set a variable color. I will get an error:
duplicated or contradicting arguments in plot options
Apparently, e.g. an additional lc rgb 0x123456 can't overwrite the selected arrowstyle properties? Too bad.
So, would this mean I have to define arrowstyles for all combinations of possible arrowheads and all possible colors in advance?
Alternatively, if I use only 4 different arrowheads, I could split the arrowheads into 4 separate plot elements (with many different colors).
Are there better solutions which I don't see? I tried with gnuplot 5.5.
Script:
### how to plot variable arrowheads AND variable colors?
reset session
$Data <<EOD
1 -1 0x000000
2 0 0xff0000
3 1 0x00ff00
4 2 0x0000ff
5 1 0xff00ff
6 2 0xffff00
6 2 0x00ffff
EOD
set style arrow 1 backhead lw 3 # -1
set style arrow 2 nohead lw 3 # 0
set style arrow 3 head lw 3 # 1
set style arrow 4 heads lw 3 # 2
set key noautotitle
set offset 0.5,0.5,0.5,0.5
set multiplot layout 1,3
set title "variable arrowstyle"
plot $Data u (0):1:(2):(0):($2+2) w vectors as var
set title "variable color"
plot $Data u (0):1:(2):(0):3 w vectors lc rgb var lw 3
set title "variable arrowhead and color???"
plot $Data u (0):1:(2):(0):3 w vectors nohead lc "black" lw 1 dt 3
unset multiplot
### end of script
Result:

