감동, 마음이 움직이는 것
[gnuplot] vector field그리기 본문
Tips (Utility, Computer Language, and etc.)
[gnuplot] vector field그리기
Struggler J. 2017. 1. 27. 22:57http://www.gnuplotting.org/vector-field-from-data-file/
http://www.gnuplotting.org/vector-field-from-function/
I tried to draw vector field from the functions.
Below is my gnuplot script and result.
#vector: direction and norm
fx(x, y) = x*(1.-x-y)
fy(x, y) = y*(1.-x-y)
vnorm(x, y)=sqrt(fx(x,y)**2 + fy(x,y)**2)
#vector functions
dx(x,y) = scaling*fx(x,y)/vnorm(x,y)
dy(x,y) = scaling*fy(x,y)/vnorm(x,y)
#source papameters
scaling = 10
set xr[0:100]
set yr[0:100]
set palette defined (3 '#fff4c2', 6 '#f0a848', 9 '#784860')
set samples 10
set isosamples 10
plot '++' u ($1-dx($1,$2)/2.0):($2-dy($1,$2)/2.0):(dx($1,$2)):(dy($1,$2)):(vnorm($1,$2)) with vectors head size 0.08,20,60 filled lc palette lw 7 t ''
'Tips (Utility, Computer Language, and etc.)' 카테고리의 다른 글
[kotex] latex에서 한글 사용하기 (in Mac) (0) | 2017.01.29 |
---|---|
[git] using stach (0) | 2017.01.27 |
[gnuplot] palette negative ( color bar를 reverse방향으로 사용하고 싶을 때) (0) | 2017.01.27 |
[gnuplot] label에 색입히기 (0) | 2017.01.27 |
[How to use git] (0) | 2017.01.25 |