Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!utnut!cs.utexas.edu!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!zeus.usq.edu.au!helios!devoil
From: devoil@helios.usq.EDU.AU (peter devoil)
Subject: Graphics and J
Message-ID: <devoil.734676154@helios>
Keywords: Graphics, J
Sender: news@zeus.usq.edu.au (News Administrator)
Organization: University of Southern Queensland
Date: Tue, 13 Apr 1993 04:42:34 GMT
Lines: 24


Continuing the thread of graphics and J, I often get the sensation of 
reinventing the wheel in this game. I have recently acquired Iversons 
'Programming in J' which has been and will be quite useful. It contains 
a short example on host facilities:

NB. from page 22 'programming in J' ISI

NB.   fourier =. ' ' : '+/x.*"0 1 (1 o. y.*/~i.#x.)'
NB.   data =. harmonics =. 1 2 3 4 fourier 0.1*i. 45
 
   data =. x=. |: x ,:(3 o. 1 o. x) - 1 o. 3 o. x=. o. _0.5 + (i. 500)%500
   cs =. convertsign =. {&('-',a.)&(('_',a.)&i.)
   lf =. linefeed =. 10{a.
   write =.1!:2
   host =. 0!:0

   (cs,(": ,. data),"1 lf) write <'plotdata'
   ('plot ''plotdata'' with lines',lf, 'pause -1',lf) write <'plot.plt'
   host 'gnuplot plot.plt'
 
..Which is the answer to all my questions. 
Yours,
Peter deVoil
