Tools for plotting from Fortran

I added a plotting section, copied below, to my list of Fortran Tools. If you know of others please reply here or message me.

accis: plotting and graphics library by Ian Hutchinson. Related project: PLOTTRACES

CHART_COUPE: Fortran plotting package based on NCL libraries, tuned for geophysical numerical model output, from meom-group

DISLIN: high-level plotting library for displaying data as curves, polar plots, bar graphs, pie charts, 3D-color plots, surfaces, contours and maps, available for several C, C++, Fortran 77 and Fortran 90/95 compilers on the operating systems Unix, Linux, FreeBSD, Windows, Mac OSX and MS-DOS. The DISLIN distributions can be used freely without any restrictions. Access to the source code and a preferred support is available via a contract.

fplot: provides a convenient interface for plotting with Gnuplot, by jchristopherson

giza: 2D scientific plotting library built on cairo, by Daniel Price et al. Provides uniform output to pdf, ps, png and X-Windows. Written in C with no dependencies (other than cairo) as a direct replacement for PGPLOT.

gnufor2: Fortran 90 module by Alexey Kuznetsov with subroutines for plotting data, including 2D, 3D plots, surfaces, polar coordinates, and histograms. It is a modification of the GNUFOR interface written by John Burkardt.

gnuplotfortran: Fortran 95 Gnuplot interface for some Unix-like OS’es, by Madhusudan Singh. This provides some routines that enables direct access of a child gnuplot session from a Fortran 95 program. fortranposix must be installed.

graffer: interactive tool for generating plots of data and/or functions, by James Tappin. The original graffer was an IDL program. This version provides most of the same functionality in a Fortran program using gtk-fortran and plplot for the GUI and plotting respectively. To display functions gdl (gnudatalanguage) or IDL is required.

M_calcomp: old graphics library used in conjunction with M_draw for work with old codes, by urbanjost. The CALCOMP library is a simple set of FORTRAN callable graphic routines that allows users to quickly construct plots.

ogpf: Object-Based Interface to GnuPlot from Fortran, by kookma

PG2PLplot: facilitate the transition from Fortran code linked against PGPlot to linking it against PLplot, which is open source and maintained. Currently, many PGPlot routines are included, but the code is by no means exhaustive.

PGPLOT PGPLOT Graphics Subroutine Library is a Fortran- or C-callable, device-independent graphics package for making simple scientific graphs, by Tim Pearson. It is intended for making graphical images of publication quality with minimum effort on the part of the user. For most applications, the program can be device-independent, and the output can be directed to the appropriate device at run time.

plotterf90: graphics subroutine library producing Postscript, by Masao Kodama

PLplot: can be used to create standard x-y plots, semi-log plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar charts and pie charts. Multiple graphs (of the same or different sizes) may be placed on a single page, and multiple pages are allowed for those device formats that support them. C library with bindings to Fortran 2003 and many other languages.

PlPlotLib: wrapper for PlPlot inspired by the interface of matplotlib, by zoziha. It is intended to fill the need for rapid feedback while developing numerical simulations, and does not replace more sophisticated packages such as matplotlib or even direct use of PlPlot.

pltFor: Fortran-Python interface library by Damien Minenna to plot figures directly in Fortran, by calling Matplotlib

PyFerret: Ferret is an interactive computer visualization and analysis environment designed to meet the needs of oceanographers and meteorologists analyzing large and complex gridded data sets, from NOAA/PMEL. It runs on recent Unix and Mac systems, using X windows for display. PyFerret, introduced in 2012, is a Python module wrapping Ferret.

pyplot-fortran: generate plots from Fortran using Python’s matplotlib.pyplot, by Jacob Williams

5 Likes

These two tools have plotting subroutines:

Last version: Version 14.10 - 9th February 2021

http://gino.co.uk/

GINO is a high-end feature-rich API for creating complex 2D and 3D graphics and GUI applications. The products are in use in industries such as aerospace, defence, oil&gas, ocean/marine, chemical, forestry, optics and other leading engineering organizations. The GINO products are available for Fortran under Windows and Linux.

Last version: v9.5 Release Notes – Feb 1st 2022

1 Like

M_calcomp is (primarily) for a niche group of people that need to start off with very old code (CALCOMP interfaces were once ubiquitous) ; it is a long story but I would not list
it here for people looking for something to write new code with; as noted in the description. Some of us need to resurrect very old code as quickly as possible; others are shocked we can still find the code :slight_smile:

@Beliavsky Do you know where I can find the manual in pdf for DISLIN ? also do you know of any tutorials for it ?

Thanks

It seems the manual is only html - online or in tar.gz file. Probably full PDF manual would be a competition for the printed book which they sell for EUR 23.
As for tutorial - there is a bunch of examples on their page, with sources for many languages, including F90. Also, I have just found, on the Links tab, sort of tutorial entitled Using DISLIN to make a GUI for a Fortran Program

fplot looks great.

There is also EGGX/ProCALL, which is much better than its weird name. It is an old library, but still developed. It can create very nice graphics and simple GUIs.
Pros:
(1) No dependencies, other than X11,
(2) Very easy-to-use, I doubt you will find an easier way to create graphics from within a Fortran program.
(3) Lightweight - works well even on ancient computers.
Cons:
(1) Only for Unix-like systems with X11 (that’s not a problem for me but might be for others),
(2) Requires a special way to compile your program. You need to use their own “egg” command which will internally call the compiler of your choice. I only tested it with gfortran.
(3) Exports graphics only to ppm image files.

Edit: Compiling with their own “egg” command is no longer a requirement (I assumed it was because that was the case years ago). I just tested it with a normal Makefile and it works. All you need to do is to add -leggx in your LDLIBS flags.

1 Like

Thank you for creating this Fortran list of tools. There is information there I was not aware of.
You might want to add Fortran bindings for ncurses somewhere in the list. An older version of the bindings which I am using for years used to be here, but the links seem dead now.

MUESLI is a free numerical and graphical library, written mainly in Fortran 95 and developped by Édouard Canot.

SimplyFortran IDE is a commercial product, cross-platform with support of the GNU Fortran compiler. It provides the Aplot library, which is a simple, two-dimensional plotting system meant to provide quick visualization of data from Fortran programs.

1 Like