Re: Plotting in a MetaCard window ? Has anyone done it ?

Boyd Sweeney (starnet!apple!puzzler.nichols.com!sweeneyb)
Mon, 14 Mar 1994 12:43:51 -0500

>I am making good progress with my MC application front end, but now
>I need to plot some data. So far, I have been calling other motif plotting
>routines such as 'xmgr', 'gnuplot', and tektronix plot10 routines with
>shell().
>
I've also been using gnuplot for my plotting needs. I've even added
the capability for the user to set fonts, labels and ranges. I open
gnuplot as a process instead of using shell() though. This method
avoids the creation of any temporary files, since I read the postscript
output directly from the process. Are you creating temporary files when
using shell()?
I've downloaded xmgr, but haven't looked at its 'batch' capabilities.
How does it compare to gnuplot?

>Has anyone tried constructing a plotting window with MC ? Even a
>simple x-y line plot would be interesting, but I would also like to do a
>2D plot where intensity was represented by color (blue=0, red=max).
>I would have an x-y matrix of intensity values, which I would need
>to interpolate to obtain the intensity=color of each pixel.
>
I attempted to create a few simple plots with the MetaCard graphics,
but decided that it would be too complicated to construct what I needed.
As I recall, without a licensed home stack, your users would not be able
to create new graphics objects on the fly. There was no capability for
vertical text. Labeling tic marks would be a pain without the ability to
create new text fields on demand. It seems that there were several other
problems that I encountered as well.

>It looks possible in principle, but has anyone tried either the simple
>x-y line plot or the 2D intensity plot ? Would MC be fast enough to do
>this, or would I need to write an external procedure ?
>
I believe that someone has developed a library from an older version
of gnuplot. An enterprising person with lots of time on his hands might
use this library to create a set of MetaCard externals. I'd sure be
interested in helping test the results it they did. Hint, hint... :^)

***************************************************************
* Boyd Sweeney Scientist, Nichols Research Corporation *
* sweeneyb@puzzler.nichols.com (205) 883-1170x1775 *
***************************************************************