Gnuplot着色3D向量 [英] Gnuplot coloring 3D-vectors

查看:40
本文介绍了Gnuplot着色3D向量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从两个不同的文件中绘制3d向量,以将第一个文件中的向量用黑色着色,而其他文件则用红色着色.有没有人知道如何实现这一目标?

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?

推荐答案

这很简单.

首先设置箭头样式:

set style arrow 1 linecolor rgb "red"
set style arrow 2 linecolor rgb "black"

现在进行绘制:

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
...

这篇关于Gnuplot着色3D向量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆