It's not a secret anymore!
The moose likes Beginning Java and the fly likes Graphing program question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Graphing program question" Watch "Graphing program question" New topic

Graphing program question

Adam Wilkins

Joined: Oct 19, 2005
Posts: 24
Can anyone suggest a good method of graphing data that will fall outside the range of the X and Y resolution of my window?

Let's say I had a parabola with x and y values over 2000. How could I put that in an X/Y coordinate system in a window that is only 300x300 using the drawLine() for each point? I have tried some division to scale it down, but I don't quite get the results I want.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
Well, what results do you get? Scaling down by a factor would be the approach to take. Maybe you can post a snippet of code that shows what you're doing, and describe for us what you were expecting, and what you are actually observing.
I agree. Here's the link:
subject: Graphing program question
It's not a secret anymore!