Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java Graph

Name: OP 2012-11-16 10:10

I'm trying to make a graph to put into a JPanel or JFrame, but my coordinates are huge. The range on my x-axis are 0 - 1024 and the y axis range is 0 - 300.
I plotted it using a polyline, but that was a fucking disaster. How do you graph coordinates and then modify the graph to keep the points relative (so I could have a graph that's 500px X 500px that has 1024 points)?

Name: Anonymous 2012-11-16 15:35

x = x / 1024.0 * 500.0
y = y / 300.00 * 500.0
path.add(x,y)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List