问题
I am trying to draw 3d vectors from two different files to color the vectors in the first file with black and the others with red. Does anyone have an idea about how to achieve that?
回答1:
This is a pretty easy one.
First set up your arrow styles:
set style arrow 1 linecolor rgb "red"
set style arrow 2 linecolor rgb "black"
Now make your plots:
splot 'datafile1' u 1:2:3:4:5:6 with vectors arrowstyle 1, \
'datafile2' u 1:2:3:4:5:6 with vectors arrowstyle 2
Of course, this assumes your datafiles are set up as:
x1 y1 z1 dx1 dy1 dz1
x2 y2 z2 dx2 dy2 dz2
...
来源:https://stackoverflow.com/questions/12503786/gnuplot-coloring-3d-vectors