How do you plot this program(fortran) in vector form in gnuplot?? the command:
call execute_command_line("gnuplot plotvel.txt") does not seem to work. Nothing happens
And what does using 1:2:3:4 mean?? in " plot "file.dat" using 1:2:3:4 with vectors filled head lw 3 "
call execute_command_line("gnuplot plotvel.txt")
First of all, you are making a data file
plotdata.txt
at the beginning of the program, while trying to plotfile.dat
later, so that Gnuplot cannot find the latter. After fixing this, you can attach-persist
option to keep the graph on the screen asOtherwise the graph disappears instantly and you cannot see the picture. Also,
using 1:2:3:4
means that you plot the 1st, 2nd, 3rd, and 4th columns in your data file. Forvectors
, the first two represent the starting point of each vector and the last two the vector to be plotted. It is also OK to just omitusing 1:2:3:4
because it is the default forvectors
. (In the graph below, I removedxrange
andyrange
to plot all the vectors.)