Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


plot with fortran

plot with fortran

plot with fortran

Hallo every body,

there is any way to make a plot or a graph with fortran?


RE: plot with fortran

Here is one approach.  I wrote a program to do this for myself.  I share it freely with others but it is limited in capability and there is no support.  You can download a freeware plotting program called ES-Plot from:
You have your program write a data file containing the data to be plotted and use a system call to bring up the ES-plot program.  Here is a simple example program that creates a data file of trig. functions:

   integer i
   real x
   do i=1,20
      x = i/20.*2.*3.14159
      write(10,*) x, cos(x), sin(x), sin(x)*cos(x)
   call system('"c:\program files\esplot10\esplot.exe" test.dat')

RE: plot with fortran

If you're using the salford compiler, it has some built in plotting functions.  If you're sticking to gnu there is something called gnuplot.  As IRStuff says, it depends on your compiler.  What compiler/OS are you using?

RE: plot with fortran

Hi there:

I do know that this is a Fortran Forum and that the desire is to do the plotting by using Fortan.

My suggestion is as follws: take the data to MS Office Suite and do quick plotting in either MS Excel and/or MS PowerPoint.

In no time you can get the plots. There is no programming involved and changes are quick.  One can try out so many different built in options -- even custom made options are available.

In MS PowerPoint, one can create either GIF and/or JPG files from the polts and get them ready for presentations and web use.

Long time ago, when Fortran plotting was the only known option for me, I did lots of plotting by using Fortran.  It does take some time to get it lined up.

Since MS Office Suite and other GUI plotting packages are available today, why not try to consider them as an option.

Here a few examples of MS Office Suite plots:


Gordan Feric, PE
Engineering Software

RE: plot with fortran

Hallo everybody and thanks for the answers.

I just check now this forum.

I will try the differents options that you propose me but at the moment I was trying to use gnuplot. My OS is windows and I am trying to launch it from fortran like this:

h=system('D:\gpt35win\gnuplot> load"surface"')

where surface is the script where all the settings are. But it seems tht it doesn't work.

Thanks again,

RE: plot with fortran

Yes IRstuff,

load is a command of windows gnuplot. Do you know which command can be used to launch the gnuplot script from windows?


RE: plot with fortran

To All:

My assumption is that you already have a data set that needs to be plotted.

Therefore,  my suggestion is to move the data set to a Windows based application such as MS Office Suite and get it done in no time.

If you try to get it done through Fortan and its libraries, it will take some time and effort just to find out how it is done and then it vwill take some additional time to get it plotting correctly.

If I am not mistaken, the output Fortan files cannot be shared smoothly with other users ...


Gordan Feric, PE
Engineering Software

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


eBook - Manufacturing the Cars of Tomorrow
In this ebook, we'll explore how additive manufacturing is going to transform the way cars are made. This includes commentary from thought leaders such as Ford's CTO, Ken Washington, Customer case studies of ways 3D printing is being used today, and a variety of part examples where 3D printing is already impacting how automobiles are made. Download Now
White Paper - Smart Manufacturing for Semiconductor
New technologies and approaches present great opportunities for semiconductor manufacturers to achieve high levels of innovation, yield and improvement. This white paper explores some of these cutting-edge technologies and how they can be applied effectively in the semiconductor industry. Read about how Smart Manufacturing is transforming the semiconductor industry. Download Now
White Paper - Analysis and Simulation in Aircraft Structure Certification
Organizations using simulation and analysis tools effectively see the benefits in their ability to achieve certification faster and with drastically less total cost than those who do not maximize these tools. Read this White Paper to learn about how digital tools such as analysis and simulation help in aircraft structure certification. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close