skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: Fortran graphics routines for the Macintosh

Technical Report ·
OSTI ID:10153005

The Language Systems MPW Fortran is a popular Fortran compiler for the Macintosh. Unfortunately, it does not have any built-in calls to graphics routines (such as are available with Graflib on the NLTSS), so there is no simple way to make x-y plots from calls within Fortran. Instead, a file of data must be created and a commercial plotting routine (such as IGOR or KALEIDAGRAPH) or a spreadsheet with graphics (such as WINGZ) must be applied to post-process the data. The Macintosh does have available many built-in calls (to the Macintosh Toolbox) that allow drawing shapes and lines with quickdraw, but these are not designed for plotting functions and are difficult to learn to use. This work outlines some Fortran routines that can be called from LS Fortran to make the necessary calls to the Macintosh toolbox to create simple two-dimensional plots or contour plots. The source code DEMOGRAF.F shows how these routines may be used. DEMOGRAF.F simply demonstrates some Fortran subroutines that can be called with language systems MPW Fortran on the Macintosh to plot arrays of numbers. The subroutines essentially mimic the functionality that has been available at LTSS and NLTSS and UNICOS at LLNL. The graphics primitives are kept in four separate files, each containing several subroutines. The subroutines are compiled and stored in a library file, LIBgraf.o. Makefile is used to link this library to the source code. A discussion is included on requirements for interactive plotting of functions.

Research Organization:
Lawrence Livermore National Lab., CA (United States)
Sponsoring Organization:
USDOE, Washington, DC (United States)
DOE Contract Number:
W-7405-ENG-48
OSTI ID:
10153005
Report Number(s):
UCRL-MA-111145; ON: DE93013092; TRN: 93:001175
Resource Relation:
Other Information: PBD: Jun 1992
Country of Publication:
United States
Language:
English