ogpf v 0.16

ogpf is an object based module developed in Fortran 2003 / 2008 with object-oriented concept. It implements an interface to 2D/3D plotting in gnuplot.
The syntax ensembles the plot and surf commands in Matlab and Octave. There are some helper functions like linspace, and meshgrid to facilitate the plotting procedure.

There are these main procedures in ogpf
  1. plot
    1. plot a single vector v
    2. plot a vector y against vector x
    3. plot up to four pairs of x-y set at the same time
    4. plot a matrix Y versus a vector x
  2. semilogx
  3. semilogy
  4. loglog
  5. surf
    1. surface plot
    2. mesh plot
    3. contour plot
  6. script
  7. meshgrid
  8. linspace

ogpf implements the interface through an object called gpf. It contains many methods and properties for making publication quality plots using gnuplot.

script method
The script method is a powerful procedure accepts almost any gnuplot valid command and create a script file to be executed by gnuplot.

interactive mode
It is possible to run the gnuplot interactively from fortran.

Save to file
There is an option, to save the ogpf output into a file which can be invoked later from gnuplot.

How to use

- A fortran compiler supports Fortran 2003, like gfortran 4.7 (http://gcc.gnu.org/GFortran), other Fortran compilers also can be used.
- gnuplot 4.5 and later (http://gnuplot.info)
Make sure gnuplot is in your path. (Open a command window and type gnuplot to see if it is in your path)
  1. Download the source code and demo file from download area
  2. Create a fortran project contains the ogpf.f90 and demo.f90, compile, and build it
  3. Run the executable (output of step 2) and select the example you like to run

Last edited Feb 15, 2016 at 4:02 PM by atronoush, version 6


No comments yet.