2017-08-08 17 views
0

有沒有辦法避免在函數1/(2-x)中繪製近漸近線,例如,沒有使用條件繪圖?這個想法是繪製基於這個函數的迭代函數,並且,由於漸近線的變化,使用條件繪圖不是一個好的解決方案。Gnuplot's Graphic Jump

enter image description here

回答

2
  1. 可以以非常高的採樣率繪製with points

    set yrange [-10:10] 
    set samples 100000 
    plot 1/(2-x) with points 
    

enter image description here

  • 如果奇點發生在不同的值的x你可以y使用條件繪圖:

    f(x)=1/(2-x) 
    set samples 1000 
    plot (abs(f(x)) < 10 ? f(x) : 1/0) with lines 
    
  • enter image description here