

Pause=5.0, persist='no': means that Gnuplot will wait for 5 seconds while you are exploring the figure, then the window will be closed and the controll passed to Fortran program This parameter is usually used together with pause parameter. This can be easily changed, if you set persist='no' in the parameter list.
#GNUPLOT POINT TYPES WINDOWS#
However, this can become a problem if you are creating many graphs in a loop, since you will end up with dozens (maybe hundreds) of Gnuplot windows on your Desktop. The default is persist='yes', which means that the window with the graph will NOT be closed after the Fortran program has finished executing. Note that this option only has effect when the terminal is set to 'ps', 'jpeg','png' or something similar - it is useless if the figure is not being saved into a file.Ĭharacter(len=*) :: persist - this is an important parameter.

Setting filename='my_file' will always save the figure into the same file. The downside of this default setting is that the filename changes every time you run a program, and soon your folder will be littered with lots of files.

This format is useful in the situation when you are creating many pictures in a loop, and you want to save all of them (of course with different filenames so that they do not overwrite each other). The default filename has the format 'date-hours-minutes-seconds-milliseconds'. Some possibilities areĬharacter(len=*) :: filename- the output is saved to a file with this name. The 'terminal' parameter is most useful if you want to save the picture as a file. The default terminal is 'wxt' - the interactive window created by the wxWidgets library. If you set pause equal to ANY NEGATIVE NUMBER ( pause=-1.0 or pause=-3.0), Gnuplot will wait untill you click Enter, and only then pass the control back to Fortran program.Ĭharacter(len=*) :: terminal - this parameter is responsible for the output format. If you set pause=5.3, Gnuplot will finish drawing the graph, wait for 5.3 seconds and then return control back to the original Fortran program. The default behavior (if you do not specify this parameter) is pause=0. Real(kind=4) :: pause - this parameter is responsible for the delay between the moment the graph is drawn and the moment the control is returned to the program. $which gfortran (or $which ifort for Intel Fortran compiler) The list of common optional parametersįirst of all, all the subroutines presented below have the following OPTIONAL parameters: pause, terminal, filename, persist, input. Note: you must have GNUPLOT and Fortran90 compiler installed and in your path. Next, open your favourite shell terminal, navigate to the above mentioned folder, and type: Note that the Makefile is written for GNU Fortran, so you have to change the first line in the Makefile if you are using a different Fortran90 compiler. To run the test program, first copy all of the above files into the same folder. This module was tested under Ubuntu distribution of GNU/Linux, both with GNU Fortran and Intel Fortran compilers. Test.f90 - a simple program with many examples
#GNUPLOT POINT TYPES PDF#
I would also recommend an excellent program Inkscape for editing pdf (and other vector graphics) files. For example, if I want to produce publication quality figures, I would call one of these subroutines from my Fortran program, but then I would edit by hand command_file.txt to obtain the desired results. Gnuplot has much more functionality which allows to fine tune almost every detail of the figure. Please note that while this program might be useful for visualising certain data produced by your Fortran program, it can not completely replace Gnuplot. After this part is finished, the control is returned to the original Fortran program which called subroutine plot(x,y) (either immediately or after some specified interval of time). After that GNUPLOT is started automatically via a system command, and it uses commands from the first file and the data from the second to create the plot. Here is the main idea of how it works: a Fortran program calls a subroutine (for example call plot(x,y) ) which then creates two files named command_file.txt and data_file.txt. It is based on the GNUFOR interface, written by John Burkardt. GNUFOR2 is a module written in Fortran90, which helps to plot graphs/surfaces/histograms/images in Fortran90.
