如何在gnuplot中在x方向生成填充区域?

如何在gnuplot中在x方向生成填充区域?,gnuplot,Gnuplot,我知道gnuplot有一种很棒的绘图类型,即filledcurve,你可以在两条曲线之间创建一个填充区域,以1:2:3的形式显示,它将在列$2和$3之间创建一条曲线,x值为$1。但是我如何在gnuplot的下图中填充这个区域呢?该范围在x方向上,类似于x1:x2:y,y值相同 我的数据格式如下: # rho1 rho2 C 0.8022651311239721 0.8299444680667378 0.00005011872336272725 0.8022624676512962 0.82994

我知道gnuplot有一种很棒的绘图类型,即filledcurve,你可以在两条曲线之间创建一个填充区域,以1:2:3的形式显示,它将在列$2和$3之间创建一条曲线,x值为$1。但是我如何在gnuplot的下图中填充这个区域呢?该范围在x方向上,类似于x1:x2:y,y值相同

我的数据格式如下:

# rho1 rho2 C
0.8022651311239721 0.8299444680667378 0.00005011872336272725
0.8022624676512962 0.8299464715046031 0.00004466835921509635
0.8022618998639025 0.8299490455369624 0.000039810717055349695
0.8022533810411624 0.8299390462160209 0.000035481338923357534
...

但我也可以在两个归档中分离出来。

这里有一个有用的技巧,它使用zerror的3D打印样式,然后设置视图角度,使其看起来像2D x/y打印。我没有足够的数据来复制您显示的绘图,因此我使用垃圾数据文件只是为了显示绘图的工作方式:

# 3D plot style "with zerror" takes 5 columns of input
#    x y z zlow zhigh
# We will choose a view angle such that "z/zlow/zhigh" is the horizontal axis
# "x" is the vertical axis
# "y" is unused because it is along the line of sight
# For your data as described
rho1 = 1   # column 1
rho2 = 2   # column 2
c = 3      # nominal y value, we use it for X
junk = 0   # unused constant coordinate
rhomean(c) = (column(rho1) + column(rho2)) / 2.

set view 270, 0 
set view azimuth -90
unset ytics
set zlabel "ρ"    # horizontal axis in this projection
set xlabel "C"    # vertical axis in this projection

set zrange [0:50] # Note how this affects the horizontal axis!

splot "data" using c:(junk):(rhomean(c)):rho1:rho2 with zerror lt black fc "gold"

with zerror plot style和set view ARTIONS命令都需要合理的当前版本的gnuplot。

数据是如何组织的?你能把原始数据显示为文本吗?除了@Ethan有趣的3D解决方案,你还可以检查这个或这个。它是二维的,但是带有拆分分支的数据可能会使事情变得更复杂。