If you can write a command that can calculate the function you need, then you're done:
gnuplot> f(x) = real(system(sprintf("echo %f", x))) gnuplot> plot f(x)
(see help system
)
So you can use e.g. octave to calculate your value. E.g., if your system is linux, you can have directly:
gnuplot> bJ(a,x) = real(system(sprintf("echo 'besselj(%f,%f)' | octave | grep ^ans | cut -f 2 -d =", a,x))) gnuplot> plot [0:20] bJ(1,x)
It will take some time to run, though! Set the sample
value to something low until you've set every detail of your plot. If you need to replot many times, you can also tabulate your function first using set term table
and then plot the tabulated values.