[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Suggestions for drawing graphs with Mac toolboxes??



Peter Scherbring <pscherbr@gac.edu> writes:
[snip]
}
}I have gotten my program to read in a file with the data, compute the
}least-squares fit, and return the slope and intercept of the best fit line.
}Now I would like to display a plot of the data points and the best fit
}line, maybe even have an option to save a PICT or JPEG version of the graph
}to print or include in a report. My question is what is the best way to
}achieve this? I have scanned through the pods for the QuickDraw toolboxes
}in MacPerl, and it does seem possible. Should I just crack open my
}electronic copies of Inside Macintosh and start reading? Are there any good
}examples of something similar that I could look at to figure out where to
}start? Any suggestions on just where to begin?

One place you can look is to start up Shuck and point it at GD.pod, which
is in your MacPerl lib folder.  GD is a gif drawing module, and it can be
used to do simple plots.  If it's capable enough for your needs, that would
be the easiest thing to do.

The high power solution available on Unix, PGPLOT/PGPERL (the one I use all
the time), isn't available under MacPerl.  But a long time ago, when I had
Microsoft Fortran and ETHZ Modula 2, a Mac Plus, and a need to make some
plots, I wrote a simple graphics package using Toolbox calls.  So it can be
done, and yes, it will be necessary to delve into Inside Macintosh.  But as
I recall, it's not all that hard.

}
}Thanks for all your help.
}Peter Scherbring
}
}////////////////////////////////////////////////////////
}Peter Scherbring
}Gustavus Adolphus College
}St. Peter, Minnesota
}
}pscherbr@gac.edu
}http://www.gac.edu/~pscherbr/
}////////////////////////////////////////////////////////
}  Everyone should believe in something;
}  I believe I'll have another Mountain Dew.
}
}  The best thing to do when the odds are against you
}  is just ignore them.


--------
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693
Greenbelt, MD 20770
schinder@pjstoaster.pg.md.us


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch