A fortran api to GNUPLOT
Note
GNUFOR makes it possible, while running a FORTRAN90 program on a UNIX system, to generate some data and request an immediate plot. This is done by issuing a SYSTEM command that starts up GNUPLOT, and feeding it the appropriate commands and data. The FORTRAN90 program pauses while the graph is displayed in an X window, and the user can admire the plots for a while, before hitting return and giving control back to the FORTRAN90 program.
Warning
To use this program, the command “gnuplot” must be in your path.
PI returns the value of pi.
GET_UNIT returns a free FORTRAN unit number.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | iunit |
RUN_GNUPLOT runs GNUPLOT with a given command file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name |
TEST01 demonstrates the plotting of Y(X) data.
TEST02 demonstrates the plotting of a table of data.
TEST03 plots parameter (X,Y,Z) data.
TEST04 plots vector data.
TEST05 plots Z(X,Y) grid data as a surface.
TEST06 plots Z(X,Y) grid data as contours.
TIMESTAMP prints the current YMDHMS date as a time stamp.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | data_file_name | ||||
integer | :: | n | ||||
real | :: | x(n) | ||||
real | :: | y(n) | ||||
integer | :: | ierror |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name | ||||
character(len=*) | :: | data_file_name | ||||
integer | :: | ierror |
WRITE_VECTOR_DATA writes vector data to a file, for plotting by GNUPLOT.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | data_file_name | ||||
integer | :: | n | ||||
real | :: | x(n) | ||||
real | :: | y(n) | ||||
real | :: | dx(n) | ||||
real | :: | dy(n) | ||||
integer | :: | ierror |
WRITE_VECTOR_PLOT writes GNUPLOT commands to plot vectors.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name | ||||
character(len=*) | :: | data_file_name | ||||
integer | :: | ierror |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | data_file_name | ||||
integer | :: | n | ||||
real | :: | x(n) | ||||
real | :: | y(n) | ||||
real | :: | y2(n) | ||||
integer | :: | ierror |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name | ||||
character(len=*) | :: | data_file_name | ||||
logical | :: | logscale | ||||
integer | :: | ierror | ||||
character(len=*) | :: | nom |
WRITE_XY_DATA writes X(1:N), Y(1:N) data to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | data_file_name | ||||
integer | :: | n | ||||
real | :: | x(n) | ||||
real | :: | y(n) | ||||
integer | :: | ierror |
WRITE_XY_PLOT writes GNUPLOT commands to plot X(1:N), Y(1:N) data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name | ||||
character(len=*) | :: | data_file_name | ||||
logical | :: | logscale | ||||
integer | :: | ierror | ||||
character(len=*) | :: | nom |
WRITE_XYY_DATA writes a table of data to a file, for plotting by GNUPLOT.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | data_file_name | ||||
integer | :: | lda | ||||
integer | :: | nrow | ||||
integer | :: | ncol | ||||
real | :: | x(lda,ncol) | ||||
integer | :: | ierror |
WRITE_XYY_PLOTS writes GNUPLOT commands to make multiple (X,Y) plots.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name | ||||
character(len=*) | :: | data_file_name | ||||
character(len=*), | optional | :: | add_lines | |||
character(len=*), | dimension(1:ncol) | :: | title | |||
integer | :: | ncol | ||||
integer | :: | ierror |
WRITE_XYZ_DATA writes X(1:N), Y(1:N), Z(1:N) data to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | data_file_name | ||||
integer | :: | n | ||||
real | :: | x(n) | ||||
real | :: | y(n) | ||||
real | :: | z(n) | ||||
integer | :: | ierror |
WRITE_XYZ_PLOT writes commands to plot parametric (X,Y,Z) data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name | ||||
character(len=*) | :: | data_file_name | ||||
integer | :: | ierror |
WRITE_XYZGRID_CONTOUR writes commands to plot contours of Z(X,Y).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name | ||||
character(len=*) | :: | data_file_name | ||||
integer | :: | ierror |
WRITE_XYZGRID_DATA writes a file of XYZ grid data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | data_file_name | ||||
integer | :: | nx | ||||
integer | :: | ny | ||||
real | :: | xyz(3,nx,ny) | ||||
integer | :: | ierror |
WRITE_XYZGRID_SURFACE writes a file of GNUPLOT commands to plot a 3D surface.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name | ||||
character(len=*) | :: | data_file_name | ||||
integer | :: | ierror |
WRITE_Y_PLOT writes GNUPLOT commands to plot Y(1:N) data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | command_file_name | ||||
character(len=*) | :: | data_file_name | ||||
integer | :: | ierror |