×
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 command in Fortran

Plot command in Fortran

Plot command in Fortran

(OP)
Hello everybody;
Is there a plot command in fortran? I need to plot graphs directly from output files.

RE: Plot command in Fortran

(OP)
Thanks IRstuff. really sometimes I need to plot results in order to show the shape of the graph and evaluate outputs. It is more practical than export results to an other grapher. I think it is possible with matlab.

RE: Plot command in Fortran

Depends which vendor's Fortran you are using. Some, like IVF and Silverfrost have built in Windows graphical routines if you work in a windows environment.

RE: Plot command in Fortran

Way back in the days of green and white stripped tractor feed printers, I wrote a plot routine with the help of an old Fortran book that used an asterisk character to make the plot. The idea was to make a 2 dimensional array of single digit characters. I used blanks, asterisks, and numbers to make the axis, then you print the array.

_____________________________________
I have been called "A storehouse of worthless information" many times.

RE: Plot command in Fortran

Pretty much what IRstuff said is the best I think. Or... rather, just have your fortran code print the data to a simple ascii text output file in a clean format ( ie. spaces between the numeric entries on each line of data ).

You can then very, very easily copy/paste that data into Excel, split the data into individual cells and graph it. I do this type of thing a LOT! In general, to write code in fortran to do the graphics automatically takes a lot of time and effort. This effort is worth it for something you plan on using over and over again or that you wish to sell. But for one-off work, it usually represents a lot of time that you won't ever get back.

I think that most commercial fortran compilers come with additional abilities to do some graphics and such (these abilities are not part of the language standard though). You can also buy packages that work with your fortran to make graphics and such a lot easier. However, any way you slice it... even with nice graphics packages, writing the code to do the graphics neatly and correctly is often just as hard or harder than the code that did your engineering calculations for you and is thus... not worth the effort.

Dan smile

RE: Plot command in Fortran

Plotting in FORTRAN (and other common programming languages) can easily be done using for e.g. DISLIN a "A Data Plotting Library" (http://www.dislin.de/) (Max Planck Institute for Solar System Research)
"...DISLIN is a high-level and easy to use plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours, and maps. The library contains about 500 plotting and parameter setting routines. The approach used is to have only a few graphics routines with short parameter lists. A large variety of parameter setting routines can then be used to create customized graphics. Several output formats are supported such as X11, VGA, PostScript, PDF, SVG, CGM, HPGL, TIFF, GIF, PNG and BMP. DISLIN is available for the programming languages C, Fortran 77, Fortran 90, Perl, Python and Java..."

You don't need a DISLIN license for a non-commercial use of DISLIN, otherwise a licence is available for low price.

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

White Paper - How ESI is Helping Move New Medical Device Product to Market Quicker & More Cost Effic
Early Supplier Involvement has long been a strategy employed by manufacturers to produce innovative products. Now, it almost seems like a necessity. Because decisions made in the design phase can positively affect product quality and costs, this can help add value to OEM bottom lines. This white paper will discuss many facets of ESI, including why it’s so valuable today, what challenges limit the benefits of ESI, how cost is impacted, 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