0

我有三个文件,其中每个文件都是 2D 的,带有 x 轴和 y 轴。我在 Gnuplot 将这些文件绘制为栅栏图。

使用此代码

  reset
  set term postscript eps color enhanced font "Times,15"
  set view 54,111
  unset xrange
  set xtics +.2
  set ytics +.5
  set yrange [0:5]
  set ticslevel 0
  set xlabel "Lc/Lx"
  set xlabel  font "" textcolor lt -.85 rotate parallel
  set ylabel "R"
  set ylabel  font "" textcolor lt -.85 rotate parallel
  set zlabel "{/Symbol D} P / P_{NS}"
  set xlabel  font "" textcolor lt -.85 rotate parallel
  set style fill transparent solid 0.25
  set pm3d depthorder
  y(x) = sin(x)
  set ytics ("0.40" 0, "0.45" 1, "0.50" 2)
  splot "PressureDesv.dat0" u 1:(0):2 t "R=0.40", "PressureDesv.dat    1" u 1:(1):2 t "R=0.45", "PressureDesv.dat2" u 1:(2):2 t "r=0.50"
  set output "maxwell_speed_distribution.eps"
  replot
  set output
  set term x11

我得到了这个图,但我不能用透明的背景填充这条曲线。

在此处输入图像描述

如何用背景透明度填充这些曲线?

4

2 回答 2

0

假设我正确理解了您的问题,请检查help zerrorfillhelp colorspec以下示例:

代码:

### transparent zerrorfill
reset session

### create some test data
set table $Data
    set xrange[0:1]
    f(x,a) = a*sin(pi*x)
    plot '+' u  1:(f(x,2.0)):(f(x,1.7)):(f(x,1.5)) w table
unset table

set view 55,134
set yrange[0.36:0.54]
set ytics 0.05 offset -1,0
set ztics 0.5
set xyplane relative 0

splot $Data u 1:(0.40):2:(0):2 w zerror fc rgb 0xccff0000 lc "red"   ti "R=0.40", \
      ''    u 1:(0.45):3:(0):3 w zerror fc rgb 0xcc00ff00 lc "green" ti "R=0.45", \
      ''    u 1:(0.50):4:(0):4 w zerror fc rgb 0xcc0000ff lc "blue"  ti "R=0.50"
### end of code

结果:

在此处输入图像描述

于 2021-03-26T15:10:46.607 回答
0
set style data zerrorfill
set style fill transparent solid 0.5 border
set xyplane at 0

set xrange [0.3 : 0.6]
set xtics (0.40, 0.45, 0.50)

splot FILE1 using (0.40):1:2:(0):2 title "File 1",\
      FILE2 using (0.45):1:2:(0):2 title "File 2",\
      FILE3 using (0.50):1:2:(0):2 title "File 3"

在此处输入图像描述

zerrorfill 的列分配是 x:y:z:zlow:zhigh

于 2021-03-26T20:23:52.713 回答