acespear77
acespear77

Reputation: 21

Fortran plotting without Gnuplot

I am new to Fortran and am trying to learn how to do simple plots. I already have a program that creates a file of the values that I'm looking to test out in a simple plotting exercise, but every example I've seen so far uses gnuplot. As the computer I'm using is not a personal computer, installing or downloading gnuplot is not really the easiest option at first glance.

Would it be correct to assume that without gnuplot, plotting using Fortran 90 is very difficult?

Upvotes: 0

Views: 1823

Answers (2)

vmagnin
vmagnin

Reputation: 175

You can use gtk-fortran. It is a GTK / Fortran binding and it offers also an interface to PLplot: https://github.com/vmagnin/gtk-fortran/wiki

But you need a Fortran 2003 compliant compiler (it is the case of all recent compilers).

Plotting with Fortran is generally not easy because you need to install such libraries and need to learn their functioning.

Upvotes: 0

Fortran is a general purpose programming language. It is designed to work on any type of computer, even those without any screen or operating system (with some new possibilities to ineract with an OS if it is present).

All such languages, like Fortran, C or C++ cannot directly do any graphical output or plotting. They require external libraries which are written in a system-specific way to interact with the graphical interface. There are such libraries available for Fortran, but using them is not trivial. It is much (MUCH!) harder than installing gnuplot, if you already know how to use gnuplot.

I will not recommend any such libraries as it is off-topic here.

Upvotes: 2

Related Questions