[Solved] Gnuplot vector fortran


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.) enter image description here

0

solved Gnuplot vector fortran