我有一个定义两条曲线的数据集,我想填充它们之间的区域。但是,与标准情况相反,横坐标是纵轴,纵坐标是纵坐标;横坐标表示深度,这是地球物理学中常见的绘图格式。换句话说,我想要类似的东西
plot 's.dat' u 1:2:3 w filledcurves
但是交换轴使得填充区域不是在顶部和底部,而是在曲线的左侧和右侧,如图所示
plot 's.dat' u 2:1,'s.dat' u 3:1
我的数据集是这样的:
0. -1.776 -0.880
160. -1.775 -0.882
160. -1.692 -0.799
320. -1.692 -0.800
320. -1.531 -0.634
480. -1.534 -0.637
480. -1.286 -0.394
这可能在Gnuplot吗?
托马斯
这是一个完全不同的解决方案,使用3D绘图风格“与zerror”。您将需要当前的gnuplot(版本5.2)。情节样式实际上并不是为此设计的,因此存在一些困难(例如,因为垂直于绘图平面绘制的x tic标记不可见,所有tic标签需要偏移以便于阅读)。
#
# [mis]use 3D plot style "with zerror" to create a plot of the xz
# plane with area fill between two sets of data points with
# equal coordinates on the vertical axis (x) but contrasting
# values on the horizontal axis (z).
#
set view 270, 0
set view azimuth -90
set xyplane at 0
unset ytics
set ztics offset 4, -2 out
set xtics offset 4
splot 's.dat' using 1:(0):(0.5*($2+$3)):2:3 with zerror notitle