Second Try at Graphs

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Second Try at Graphs

Post by bjb007 » Sat Oct 04, 2008 11:17 am

This morning I though I had cracked it - drew
a nice curved graph and even figured out how to
delete all those graphic objects!

This afternoon a different story. After trying to
figure out why one of the buttons on my current
project didn't do what it was supposed to do after
half an hour I finally found the answer - the
"on mouseUp" line had disappeared from the
handler. Disappearing buttons, groups that
aren't groups, an editor that has it's own ideas
on how to code...really is too much.

Anyway, back to the graphs.

At the end of a day I have points in
an array such as

[1]5.2
[2]10,4
[3]10,4
[4]15,6

which I put in a loop in pairs to
get the points... 5,2 return 10,4
10,4 return 15,6
and so on which should give me a
decent graph.

This morning they gave a nice curve.
This afternoon all I get is a series of
lines 128 wide and 32 high all in the
same position. Same code,
same everything.

Anyone know what gives?
Life is just a bowl of cherries.

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Second Try at Graphs

Post by bjb007 » Sat Oct 11, 2008 1:52 pm

My attempts to create graphs didn't get
me anywhere until I got hold of the
plotter_test1.rev from Klaus.

So thanks Klaus and here's a pic of what
I was able to achieve using your stack as
a model.

The values are prog-generate and put into an
array. The required values are then put into
point lists and then plotted. A plot like this one
takes around 5 second (which includes the
processing)..must time the plotting part
separately.

The values are all whole numbers and increment/
decrement by one so no need for a smooth curve.

The only thing that tripped me was the "delete line -1..."
which of course I didn't need as I wasn't using a list.

Thought I could insert an image but have to upload
it. Pity. I'll put it in a stack and into Rev Online -
user name bjb007.
Life is just a bowl of cherries.

kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Post by kotikoti » Wed Jul 15, 2009 10:17 am

Hi bjb007
How did you get on with the graph.
On the learning as well and wondered if you can share how to achieve this. Where is the file from Klaus, Pl;otter_test1.rev?
Regards,
kotikoti
Build 160
Version 2.9.0
Platform: Windows

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Wed Jul 15, 2009 10:23 am

Hi kotikoti,

check my site:
http://www.major-k.de/xtalke.html

Most of the stuff there is quite old from the PRE array days of Rev :-)

Feel free to drop a line in case of questions!


Best

Klaus

kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Post by kotikoti » Wed Jul 15, 2009 10:31 am

Thanks Klaus, will take a look.

A request by a physics teacher to draw a sine curve/graph in on my plate at the moment. The student fills in the degree values in a table, and the app should calculate and draw this curve/wave in a grid...

Thanks Again...
Build 160
Version 2.9.0
Platform: Windows

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Wed Jul 15, 2009 2:50 pm

Hi kotikoti,

shameless plug here. You might want to take a look at chartsEngine. The line type should be perfect for that purpose. :)

All the best,

Malte

http://www.runrev.com/products/related- ... rtsengine/

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Wed Jul 15, 2009 3:16 pm

Oh Malte, sooooo shameless :D :D :D

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Wed Jul 15, 2009 4:22 pm

OK, unsolicited plug here: I heartily recommend you try out chartsEngine. You'll find it fantastic. While you're at it, also get animationEngine. And anything else that Malte ever produces. Always superbly amazing quality and great support.

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Wed Jul 15, 2009 6:09 pm

*blushes*

:-)

kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Post by kotikoti » Fri Jul 17, 2009 5:09 pm

Malte
Will have a look, pointers like this are a blessing and the effort you have already worked on need rewarding... so will evaluate for my spec needs and hopefully my school will authorise... better still I will authorise...
Build 160
Version 2.9.0
Platform: Windows

Post Reply