/** * Return the axis values for the given pixel location on this graph. * * @param x The x pixel location on the graph. * @param y The y pixel location on the graph. * @return the x and y values for the given pixel location. */ public double[] getValueAt(int x, int y) { Insets insets = getInsets(); double v[] = new double[2]; v[0] = xAxis != null ? xAxis.getValue(x - insets.left) : 0.; v[1] = yAxis != null ? yAxis.getValue(getHeight() - y - insets.bottom) : 0.; return v; }