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

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



I should first introduce myself. I'm a sophomore physics major and computer
science minor at Gustavus Adolphus College in St. Peter, Minnesota, USA. My
first exposure to perl was hacking toegther a cgi script for my high
school's web site with perl4. It wasn't pretty, but it did the job. I've
started to play with perl again lately and have really enjoyed it. Thanks
Matthias for this great program!

Now, my problem, or rather my request for suggestions. In my physics labs,
we take data and attempt to "fit" it with a certain model that explains the
behavior seen. For instance, voltage and current in a simple circuit, when
plotted, fit a linear model, with the slope of the line being the
resistance of the circuit. The method for fitting the data is simple and we
do have software for DOS and Win31 to do it. This is more of a test and
learning experience for me.

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?

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.



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