Results 1 to 2 of 2
Thread: Help with graph code example
 07292007, 12:45 AM #1Member
 Join Date
 Jul 2007
 Posts
 35
 Rep Power
 0
Help with graph code example
Hi, I've been trying so long and i could not solve any of the problems (below) that I've been having for some time. If any of you could help out with any of the problems, that's be absolutely amazing.
 Graph Class Library
that's the website from which i got my plotting codes/classes for a plot that supposedly takes a set of data from a different calculating program (example 3 code is the one where you can load data). I'm looking at the graph code example3 and it's not obvious to me how to call up the data for the graph. is it where it says "DATA"? if the data file is called output.txt would i just substitute "output.txt" for "DATA"?  How would i make it so that my outout.txt file from a calculating program is composed of two columns (so basically a set of data, x coordinates and y coordinates)?
 In the following equation, i want P to be varying b/t two given constants Pmax and Pmin. how would i do that?
public double I0(double Vb, double P, double Pbath) {
return ((PbathP)/Vb);
}
Thanks
 07292007, 10:16 PM #2
I'm looking at the graph code example3 and it's not obvious to me how to call up the data for the graph. is it where it says "DATA"?
This line in the applet
Java Code:String data = getParameter("DATA");
Java Code:<param name=data value="elliptical.data">
if the data file is called output.txt would i just substitute "output.txt" for "DATA"?
If you want to use the applet tag and its param tag you would substitute "output.txt" for the value of "elliptical.data". If you want to put it directly into the applet you could write
Java Code:String data = "output.txt";
Make up a BufferedWriter to write the data out to the "output.txt" file. For each x, y value skip a space in between and after the pair write a newline with myWriter.newLine().
In the following equation, i want P to be varying b/t two given constants Pmax and Pmin. how would i do that?
Let's say you have data 250 <= x <= 1000 and want to scale it into 50 <= y <= 100.
To scale the units
Java Code:100  50 scale =  1000  250 Scale the x interval and add the minimum y value. 50(x  250) y =  + 50 750
Similar Threads

Java chart & graph lib
By saturdaybugs in forum Java 2DReplies: 1Last Post: 04242008, 01:59 PM 
Need Help for Dot Plot Graph
By BHCluster in forum Java 2DReplies: 5Last Post: 04152008, 02:54 PM 
Graph program code,hardnut
By Javashak in forum Advanced JavaReplies: 0Last Post: 03242008, 03:25 PM 
Graph DPS and BFS implementation
By hey in forum New To JavaReplies: 1Last Post: 01092008, 09:19 PM 
Problems getting Graph to show
By rhivka in forum New To JavaReplies: 6Last Post: 07312007, 05:21 AM
Bookmarks