2016-09-15 67 views
0

我有兩條曲線相交在一個點上,我使用的filledcurves樣式使用填充這兩個曲線之間的區域中的以下內容:Filledcurves風格---的Gnuplot

plot "test_data31.txt" using 1:2:3 with filledcurves lc 5 notitle,\ 
    '' u 1:2 with lines lc -1 notitle,\ 
    '' u 1:3 with lines lc 3 notitle 

這產生以下附圖: the two curves are in blue and black lines and the filled area in cyan

我的問題是:我需要改變上面的代碼也有交點(小白區)下面的區域填充?

+0

wolfram-mathematica標記與此有什麼關係? –

回答

0

如果你知道你的陰謀這兩個「尖」的位置(假設它們位於x_0x_1x_1 > x_0),你也許可以使用:

plot "test_data31.txt" using 1:(($1<x0||$1>x1)?min($2,$3):1E-4):(max($2, $3)) with filledcurves 

在這裏,「不變」 1E-4被選擇得足夠小,因此它在圖的y-範圍之外。有效地,filledcurves被施加到兩條曲線:

  1. max($2,$3) - 最大的兩個數據列
  2. (($1<x0||$1>x1)?min($2,$3):1E-4):(max($2, $3)) - 的「中間區域」以外感興趣的兩個數據列[x_0,x_1]的最小值,的1E-4內的恆定值[x_0,x_1]
+0

它的工作表示感謝 –