Lateral force field in the first quadrant of a rectangular cross-sectional channel.
Data file: needs 5 columns: x, y, dx, dy, mag
x, y: coordinate of the root of the vector
dx, dy: length of the x component and y component of the vector
mag: magnitude of the vector, used to determine the color gradient
Download datafile
Expand to see source code
#!/bin/bash
set terminal wxt size 845,700
set xlabel "z/(D/2)" font "Times New Roman, 26" offset 0,-1,0
set ylabel "y/(D/2)" font "Times New Roman, 26" offset -4,0,0
set lmargin 15
set bmargin 5
set xr [-0.1:1]
set yr [-0.1:1]
set xtics font "Arial, 18"
set ytics font "Arial, 18"
set datafile separator ","
set palette defined ( 0 'blue', \
1 'green', \
2 'yellow', \
3 'red' )
set cbrange [0:0.0003]
set cbtics 0,0.0001,0.0003
set format cb "%1.0t{/Symbol \264}10^{%L}"
plot "forceField-re144.csv" using \
($2/0.003-1):($1/0.003-1):($4/sqrt($4*$4+$3*$3)*0.05):($3/sqrt($4*$4+$3*$3)*0.05):5 w vectors head size 0.5,0.7 filled lw 1.5 lc palette title ''
pause -1