This content has been marked as final.
Show 4 replies

1. Re: Multiple Line Graph
arunbe Jan 2, 2007 10:41 AM (in response to mrgbement)Hi , this code may help you. 
2. Re: Multiple Line Graph
mrgbement Jan 2, 2007 10:52 AM (in response to mrgbement)That certainly did help some. I'll try and combine the snippet you gave me with the one I found from kglad and if i figure it all out i'll have axis and graphs and it'll be pretty awesome. I'll post back with my progress and my code snippets if I get anywhere farther. Thanks a lot Arun! 
3. Re: Multiple Line Graph
arunbe Jan 2, 2007 10:58 AM (in response to mrgbement)you are welcome... :) 
4. Re: Multiple Line Graph
mrgbement Jan 2, 2007 7:05 PM (in response to arunbe)Hi Arun, thanks again for the help but upon closer inspection (along with only a basic knowledge of java and actionscript), I think your script would need editing to work for me (editing i'm unsure of how to do). What I'm looking for is a graph that will create a line based on a function. Much like y=(a*b*c)/x or y=(a*b*c)/(x^1.66) The a*b*c would be complicated also, but here's what i've thought up on paper that I have to move to script, I hope this is useful:
Step 1: Calculate the a*b*c
The original function is PV=nRT , nRT being the a*b*c , however the Thot and Tcold terms are input boxes that the user types in before hitting the "go" button.
So I have to do this much:
tcold = Number(tcold_num.text);
thot = Number(thot_num.text);
var n:Number = 1;
var R:Number = 0.0825;
var a:Number;
var b:Number;
var c:Number;
var d:Number;
a = n*R*thot // Step 1 constant
b = // Step 2 constant (formula to be finished :/) Looks to be a formula using ((b) / (Math.pow(x, 1.666)))
c = n*R*tcold // Step 3 constant
d = // Step 4 constant (formula to be finished :/)
Then I need to find a way to initialize axis to line the graph, I can label the P and V axis using static text boxes later I suppose.
The problem I have with yours that I don't understand is that I could add the function into the y part of the addLine() function, however it's noted as inity= y1 (requires a number), and the function definition has y1:Number.
Now the issue i'm tackling below is just a newbie's lack of understanding (i hope), but the script kglad wrote (snipped below) will graph one line, and i can't figure out for the life of me how to write this up to graph more than one instance without overwritting the previous line. Again, Thanks for the help so far, it has helped me find the points where I lacked direction and solid ideas before.