Contact US

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!

*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


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. 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