Drawing a graph by script

dunbarx dunbarx at aol.com
Sat Feb 28 15:15:12 CST 2009


Do you mean a line graph? I did this in HC years ago, to create an oscilloscope displaying a voltage waveform from an external source,

It's easy and fun, You need a delimited list of points "x,y" and draw a line from one to the other, daisy chain style. In HC you had to choose the line tool and drag from one point to the next, keeping track of the, er, track so you could erase it every time the graph updated. I suspect in Rev you can create a line graphic object with start and endpoints as desired, and just either reconfigure it or delete it as required.

 Hope this helps. If you are a beginner like me, write back and you will get much more detailed help from this list.

Craig Newman




On Feb 28, 2009, at 3:13:58 PM, "Mark Swindell" <mdswindell at cruzio.com> wrote:
What would be the best way to draw a simple graph by script?

All I need is a rectangle with horizontal lines drawn across it at the 
correct intervals (height/100) or whatever the number of lines is to 
be. I've been looking in the docs but still not sure how to implement 
this. I also played around with using a list field and setting the 
line height, but this isn't as accurate as I'd like.




More information about the use-livecode mailing list