这次来画前 3 阶的第一类贝塞尔函数 Jn(x)。在 gnuplot 里,0 阶和 1 阶贝塞尔函数已经定义了,分别为 besj0(x) 和besj1(x),而 2 阶贝塞尔函数可以通过递推关系构造出来。下面是例子: gnuplot> set term wxt enhanced gnuplot> besj2(x) = besj1(x)*2/x - besj0(x) gnuplot> set xrange [0:20] gnuplot> set xtics 2 gnuplot> set xlabel "X" gnuplot> set ylabel "Y" gnuplot> set title "Bessel Functions of the First Kind" gnuplot> set grid gnuplot> set style line 1 lw 2 lc rgb "#F62217" gnuplot> set style line 2 lw 2 lc rgb "#D4A017" gnuplot> set style line 3 lw 2 lc rgb "#2B60DE" gnuplot> plot besj0(x) ls 1 t "J_0(x)", besj1(x) ls 2 t "J_1(x)", besj2(x) ls 3 t "J_2(x)"