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 plot file.dat
later, so that Gnuplot cannot find the latter. After fixing this, you can attach -persist
option to keep the graph on the screen as
call execute_command_line("gnuplot -persist plotvel.txt")
Otherwise 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. For vectors
, 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 omit using 1:2:3:4
because it is the default for vectors
. (In the graph below, I removed xrange
and yrange
to plot all the vectors.)