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
String data = getParameter("DATA");
reads the data file name from the applet tag. To find it you look at the source (View menu/Page -> "view source") and find that the applet is in the middle row of a frameset. Copy the url ("example3_app.html") for this frame and load it into the address bar. The applet tag has the param tag
<param name=data
value="elliptical.data">
which shows the data file name for the applet.
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
String data = "output.txt";
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)?
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
100 - 50
scale = ----------
1000 - 250
Scale the x interval and add the minimum y value.
50(x - 250)
y = ----------- + 50
750