Java Graphics2D coordinate problem
Posted on 2003-03-21
I am using Graphics2D to draw graphics for my data for my clustering algorithm result on a JPanel. I understand that Graphics2D start with (0,0) at the top left hand corner to do the painting. However, some of my data on the y axisis -ve value
e.g. (222, -0.002334)
so as it start from (0,0) positve value, it can never paint my data with negative y value.
I try the translate and scale method in grpahics2D, and both can only move the whole thing to other position but actually cannot solve the problem of displaying the negative value.
So my results cant be fully output to the screen.
Is there anyway I can move the (0,0) to the centre and with the ability to output the -ve value?
Does anyone have any ideas on this?