I have a Fortran program which it executes correctly without any error in Microsoft developer studio but I do not obtain a graph. Does it require any other software or something so that it directly make a plot as the program executes?
if you are a Fortran programmer then you know that no standard graphical output is available directly from Fortran programs. Instead, the Fortran programs may prepare data files to be visualized by other tools, like gnuplot. I like this package since it is easy to learn and to use, and able to produce many kinds of graphs, including 2D and 3D plots, polar coordinates, linear/logarithmic scales, and so on. Supported are very different graphical output formats as well. To see the plot of f(x) prepare the data to be plotted in the form:
x1 f(x1)
x2 f(x2)
...
Such data should be prepared by your Fortran program and located in some disk file, say in "data_file".
Lines starting with "#" will be quietly ignored, empty lines are useful for separation of data groups. It is enough to issue a command:
gnuplot> plot "data_file"
to see the newly created graph. Of course, many modifications of this command are possible, resulting in various shapes/sizes of points used, colors/width of lines, "x" and "y" ranges to be used, and so on. Windows version of gnuplot is freely available, see Louis' Goffin message.
Great thanks to Roberto Bellasio and to Louis Goffin for pointing us all to DISLIN package. According to its documentation it may be used for making GUI for Fortran programs (it's primary usage is to produce plots during execution of a Fortran program (other languages are supported as well!), but in my opinion it is best to leave this task to other software, like gnuplot or Excell.
I support Demetris, FORTRAN can not itself generate plot (as far I know). you need to use other ploting programme. you can prepare the data sheet and plot using gnuplot/grace/qtiplot/R/MATLAB of you can call these programme form your FORTRAN script to plot you data.
In FORTRAN 95 you have to write your function for the plot of graphs. My suggestion is copy your x and y vectors / save in EXCEL or MATLAB where simply you can have best plot options.
Matlab and Excel are probably the most used solutions. As suggested, there is also DISLIN. Similarly, you can use gnuplot (http://www.gnuplot.info/). Other possibilities are listed in this pdf (http://www.fortranplus.co.uk/resources/fortran_resources.pdf) at page 49.
As I understand, the FORTRAN program is running (maybe hours) and thus incrementally producing the file with data to be plotted. To see those results "live" one may use gnuplot plotting machine (my favorite) running in other other window. The good idea is to execute FLUSH command after each new data record is written. Not doing so will delay the availability of concurrent data visualization until the next full disk block is written (possibly with the incomplete last data record in it - thus displayed incorrectly).
Thanks Marek. Can you give a simple example how to use gnu? mean which software will be required for windows 8 and also how instruction will be put in fortran program to see results on gnu.
if you are a Fortran programmer then you know that no standard graphical output is available directly from Fortran programs. Instead, the Fortran programs may prepare data files to be visualized by other tools, like gnuplot. I like this package since it is easy to learn and to use, and able to produce many kinds of graphs, including 2D and 3D plots, polar coordinates, linear/logarithmic scales, and so on. Supported are very different graphical output formats as well. To see the plot of f(x) prepare the data to be plotted in the form:
x1 f(x1)
x2 f(x2)
...
Such data should be prepared by your Fortran program and located in some disk file, say in "data_file".
Lines starting with "#" will be quietly ignored, empty lines are useful for separation of data groups. It is enough to issue a command:
gnuplot> plot "data_file"
to see the newly created graph. Of course, many modifications of this command are possible, resulting in various shapes/sizes of points used, colors/width of lines, "x" and "y" ranges to be used, and so on. Windows version of gnuplot is freely available, see Louis' Goffin message.
Great thanks to Roberto Bellasio and to Louis Goffin for pointing us all to DISLIN package. According to its documentation it may be used for making GUI for Fortran programs (it's primary usage is to produce plots during execution of a Fortran program (other languages are supported as well!), but in my opinion it is best to leave this task to other software, like gnuplot or Excell.