Gnuplot z轴在splot中断裂

Gnuplot z轴在splot中断裂,gnuplot,Gnuplot,网上有很多资源可以教你如何绘制轴断裂的二维绘图,例如。基本上使用的策略是使用多点模式绘制两个图,并将它们组合在一起 然而,我希望做的是打破z轴,考虑这两个表面: 由于两个表面之间存在较大的能隙,因此在该图中,地面能量表面几乎是“平坦的”,但如果我们单独绘制地面能量表面,我们可以看到它根本不是“平坦的”: 有没有办法打破Z轴,让Gnuplot显示曲面的更多细节?multiplot在这里不起作用,因为它是一个3d绘图。您可以向下移动上表面并手动重新标记z轨迹。以这个数字为例: 让我们想出一些g

网上有很多资源可以教你如何绘制轴断裂的二维绘图,例如。基本上使用的策略是使用多点模式绘制两个图,并将它们组合在一起

然而,我希望做的是打破z轴,考虑这两个表面:

由于两个表面之间存在较大的能隙,因此在该图中,地面能量表面几乎是“平坦的”,但如果我们单独绘制地面能量表面,我们可以看到它根本不是“平坦的”:


有没有办法打破Z轴,让Gnuplot显示曲面的更多细节?multiplot在这里不起作用,因为它是一个3d绘图。

您可以向下移动上表面并手动重新标记z轨迹。以这个数字为例:

让我们想出一些gnuplot魔术:

# Make sure that there are no data points exactly at the corners
# of the xy plane (it affects the vertical borders)
set xrange [-1.001:1.001]
set yrange [-1.001:1.001]

zmin = -2
zmax = 5
dz = zmax - zmin
set zrange [zmin:zmax]

# Remove vertical borders
set border 15

# Some functions to plot
f(x,y)=x**2+y**2+10.
g(x,y)=-x**2-y**2

# Draw vertical borders by hand leaving empty space where the
# axis is broken. I have used variables zmin etc. for transparency
set for [i=-1:1:2] for [j=-1:1:2] arrow \
    from i,j,zmin-dz*0.5 to i,j,1 lw 1 nohead
set for [i=-1:1:2] for [j=-1:1:2] arrow \
    from i,j,2 to i,j,zmax lw 1 nohead

# Draw zig-zag line to denote broken axis
set for [i=-1:1:2] for [j=-1:1:2] arrow \
    from i,j,1 to i-0.05,j,1+0.25 lw 1 nohead
set for [i=-1:1:2] for [j=-1:1:2] arrow \
    from i-0.05,j,1+0.25 to i+0.05,j,1+0.75 lw 1 nohead
set for [i=-1:1:2] for [j=-1:1:2] arrow \
    from i+0.05,j,1+0.75 to i,j,2 lw 1 nohead

# Add ztics by hand. Use "for" if you have many tics
set ztics (-2, 0)
# We print the z value - 7, which is the amount we are shifting the
# upper surface
set ztics add ("10" 3, "12" 5)

# Plot shifting the surface
splot f(x,y)-7, g(x,y)


请注意,使用
设置箭头定义的新边框将在曲面后面绘制。如果你想让一个特定的一个在前面,那么把它从
设置的
循环中拿出来,添加
front
关键字。

你为什么不想并排打印呢?即使你成功地打破了z轴,这两个将重叠,这将是很难注意到的差异,一旦他们混合使用之字形线的方法。