2015-01-07 40 views
1

我在Gnuplot填充曲線顯示間隙時遇到問題。我使用Fedora提供的版本4.6 patchlevel 5。值大於yrange的填充曲線中的Gnuplot間隙

下面是我在做什麼:

    - 生成平滑值的表像這樣:
set table 'smoothedhdata' 
plot 'data_file' using 1:2 smooth cspline 
unset table 
    - 取消設置表中,設置輸出的multiplot設置,設置yrange
    - 劇情:
plot 'smootheddata' using 1:2 with filledcurves x1 lc rgb "forest-green" title "Some Title"; 

出現的問題是,數據中有一些值,這是由yrange限制的區域之上。對於這些值,使用pngcairo的輸出和使用svg的輸出存在差距。也許這對於更熟悉gnuplot的人來說是微不足道的,但是我至今沒有找到解決方案。有沒有人看到這種行爲,並知道一種解決方法,或者這可能是一個在Gnuplot某處的錯誤?

    - 這裏是顯示在圖中綠色的幾個這些差距的一個情節:

Here's a plot showing a few of those gaps in the green graph

回答

1

gnuplot的4.6版本有一些問題與填充區域進行適當剪裁。可能這是造成問題的原因。版本5.0重新修剪,所以可能是新版本工作正常(無法測試它,因爲我沒有測試數據)。

或者,您可以嘗試手動剪輯using語句中的值。因爲你這應該展現您的數據無論如何兩次,你必須預先計算yrange限制(或使用您的自定義yrange值yminymax):

set table 'smoothedhdata' 
plot 'data_file' using 1:2 smooth cspline 
unset table 

ymax = GPVAL_Y_MAX 
ymin = GPVAL_Y_MIN 
clip(y) = (y < ymin ? ymin : (y > ymax ? ymax : y)) 

plot 'smootheddata' using 1:(clip($2)) with filledcurves x1 lc rgb "forest-green" title "Some Title" 
+0

您先生,救了我的天!手動裁剪數據可解決問題。我期待着希望在Gnuplot 5中看到這一點。 – juwi