×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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

(OP)
Hallo every body,

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

thanks,
Albert

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:
http://www.engineering.usu.edu/mae/faculty/stevef/prg/ESPlot/index.html
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
   open(10,file='test.dat',status='unknown')
   do i=1,20
      x = i/20.*2.*3.14159
      write(10,*) x, cos(x), sin(x), sin(x)*cos(x)
   enddo
   close(10)
   call system('"c:\program files\esplot10\esplot.exe" test.dat')
   end

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:











Thanks,

Gordan Feric, PE
Engineering Software
http://members.aol.com/engware

RE: plot with fortran

(OP)
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,
Albert

RE: plot with fortran

(OP)
Yes IRstuff,

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

thanks,
Albert

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 ...

Thanks,

Gordan Feric, PE
Engineering Software
http://members.aol.com/engware

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


Resources

eBook - Integrating the Engineering Ecosystem
Aras Innovator provides multiple options for integrating data between systems, depending on the scenario. Utilizing the right approach to meet specific business requirements is vital. These needs range from authoring tools, federating data from various and dissimilar databases, and triggering processes and workflows. Download Now
Research Report - Simulation-Driven Design for SOLIDWORKS Users
In this engineering.com research report, we discuss the rising role of simulation and the paradigm shift commonly called the democratization of simulation. In particular, we focus on how SOLIDWORKS users can take advantage of simulation-driven design through two analysis tools: SOLIDWORKS Simulation and 3DEXPERIENCE WORKS. Download Now
White Paper - Industry 4.0 and the Future of Engineering Education
With industries becoming more automated, more tech-driven and more complex, engineers need to keep their skills and knowledge up to date in order to stay on top of this wave—and to be prepared for the Industry 4.0 future. The University of Cincinnati offers two online Master of Engineering degree programs designed specifically for practicing engineers. 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