2016-11-13 101 views
1

我在x軸上有大文件(〜5 Gbs)的白色不變增量,假設每個dtgnuplot中的行增量

我想知道是否可以設置Gnuplot的every命令爲對數增量不是線性的。

plot "fileA.txt" u 1:2 every dt #linear increment of dt

這是因爲,如果x軸是對數標度,那麼我想爲x的低值的更多個(10^-4,10^-2),而且不(10^4,10^2)範圍內的過採樣。以某種方式不同的增量。

我需要使用外部程序sed來重寫我的文件嗎?

包含測試圖以及數據。 Plot用藍色表示全部數據,用紅色表示every命令。正如你可以看到一個鬆散的短x的信息也過量抽樣的大x的情節。 the data file

非常感謝。

回答

3

你可以積平滑後的數據有兩點:

set key left 
set logscale x 
set yrange [3.9:4.8] 

set samples 30 

set terminal png 
set output "log.png" 
plot "fort.11" title "raw" with points lc 3 pointtype 5 pointsize 2,\ 
    "" title "smooth" smooth csplines with points lc 1 pointtype 5 pointsize 1 
  • set samples 30告訴GNUPLOT使用30點等距在X
  • smooth csplines插值數據點與點而不是線,
  • with points地塊,其將是默認的

請注意,這並不繪製原始數據,如果原始數據點距離太遠,smooth csplines會引入新的點。這可能或可能不是你想要的。

compare original and smoothed data