2017-10-05 59 views
2

我想绘制一系列点,一个平面和与该平面的交点,使用gnuplot。为了做到这一点,我创建了以下gnuplot的脚本:gnuplot中参数化平面的大小

set title 'Homogeneous field with plane intersection' 
set xlabel 'x' 
set ylabel 'y' 
set zlabel 'z' 
set parametric 
splot 'points.txt' with linespoints, 'intersectionPoints.txt' with points 
pointtype 7 lc rgb 'red', 
60 + 0 * u, u, v 

脚本生成以下图形: enter image description here

一切工作正常,但参数平面的大小来说太小了。我怎样才能让gnuplot自动调整飞机的大小以便与其余剧情的尺寸大致相匹配?

回答

2

必须设置两个参数uv范围,例如

set urange [-50:250] 
set vrange [-20:20] 

help parametric:“目前这些参数变量的默认范围是[-5:5]。设置范围更期待更有意义的东西。“

+1

好的,非常感谢。对于读这个的每个人,我设法找到一种方法让gnuplot“排序”根据尺寸调整范围。在你的'splot'语句后面加上 'set vrange [GPVAL_Z_MIN:GPVAL_Z_MAX] set urange [GPVAL_Y_MIN:GPVAL_Y_MAX]',然后加上'replot'。这将为您调整范围。 –