Gnuplot vector fortran

二次信任 提交于 2019-12-08 15:38:22

问题


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")

回答1:


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.)



来源:https://stackoverflow.com/questions/35807448/gnuplot-vector-fortran

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!