Gnuplot coloring 3D-vectors

烈酒焚心 提交于 2020-02-03 02:02:39

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!