Gnuplot 堆叠 2D 和 3D 绘图

问题描述 投票:0回答:1

我想在 gnuplot 中创建一个 2x3 多重图,其中顶行由 2D 矢量场组成,底行由 3D 气泡图(指定点处的圆圈,其中圆圈直径和颜色从文件中读取)组成。我试过了

set multiplot layout 2,3 spacing 0,0

scale = 500

plot 'cfg0_10_0.5.arrow' u 1:2:(scale*$4):(scale*$5):7 w vectors head filled lw 2 lc rgb var notitle
plot 'cfg0_5073_0.5.arrow' u 1:2:(scale*$4):(scale*$5):7 w vectors head filled lw 2 lc rgb var notitle
plot 'cfg0_12287_0.5.arrow' u 1:2:(scale*$4):(scale*$5):7 w vectors head filled lw 2 lc rgb var notitle

unset title
set view 60,45,1.3
set style fill solid 0.5
splot "cfg0_10.bub"   u 1:2:3:(0.5*sqrt($4**2+$5**2+$6**2)):7 w circles lc rgb var notitle
splot "cfg0_5073.bub"  u 1:2:3:(0.5*sqrt($4**2+$5**2+$6**2)):7 w circles lc rgb var notitle
splot "cfg0_12287.bub" u 1:2:3:(0.5*sqrt($4**2+$5**2+$6**2)):7 w circles lc rgb var notitle

这几乎可行,但它收集了原点处 2D 向量的所有尾部。请参阅下面的第一张图片。作为独立命令(即未合并到多图中),矢量场

plot
命令按预期工作。请参阅第二张图片。有谁知道如何创建顶行包含与第二张图像类似的矢量场的多重图?

编辑:矢量场位于 7 列数据文件中,其中包含尾部的 x、y、z 坐标、矢量在 x、y、z 方向上的延伸以及线条颜色;即。

0.8125 0.0625 0.75 0.015867 -0.009139 -0.000410 0x000000

是其中一个数据文件的第一个条目。向量的 z 坐标全部相同。我希望二维图的向量尾部位于第 1 列和第 2 列的位置 (x,y),并沿 x 轴和 y 轴与从第 4 列和第 5 列读取的值成比例地延伸.

谢谢您的帮助!

gnuplot
1个回答
0
投票

没关系,我的代码按预期工作。乘法因子

scale
设置得太高,使矢量场看起来像 3D。

© www.soinside.com 2019 - 2024. All rights reserved.