Graphing Temperatures Predictions

I have a project that I am having trouble on.

The initial display will show the predictions made 1 day in advance. The buttons allow you to change the graph to show predictions made 2, 3, 4, ... up to 9 days in advance. Use only 2 buttons, one to increase the number of days in advance, and one to decrease it. You should not be able to move out of the range from 1 to 9.

It will need a Key class and a Graph class. The constructor for the Graph class might look like this:
public Graph(int[] y, Color c);
where the array is an array of temperature values. The draw method of Graph takes 5 parameters, the Graphics, the height of the panel it is drawing in, the x and y scale (number of pixels per unit) and the x and y offsets of the origin. These are given relative to the bottom left corner of the panel. Remember that for drawing, y values are 0 at the top of the panel and increase as you go down.

Your Graph class should have method:
private void drawDot(Graphics g, int x, int y);
that draws a dot centered at (x,y). Implement this by drawing a small filled circle. Remember fillOval is given the position of the upper left corner of the bounding box, not the center of the oval. The drawDot method should take this into account.

Here is what the data will look like with lows first then high. The first day is the actual temperature while the rest are predictions from that day.

Sorry no errors, the problem is the graph points are all bunched on the bottom left. I haven't been able to put them to match up on the graph. So the xScale and yScale aren't doing what I need them to do. I don't know where to use the height in this part

From my experience, when graphing data, it's simplest to scale the data to the range 0-1 first, and then scale from there to the graph size. That way, it plots correctly regardless of the dimensions of the drawing region. It's also straightforward to crop and zoom when everything is normalized first.

For example, suppose your temperature data was stored in a List called 'temperature', and you wanted your y-scale to be 0 to 100, which are stored in "yMin" and "yMax" (same for x)