Question

How to coordinates of boundary points, which are selected with red arrows?

For example, the lower left boundary point has coordinates (-0.10, 0.00) and the upper right boundary point has coordinates (1.10, 1.15), but how to get it with any functions?

This string below get Window coordinates of this points, but I need their chart coordinates:

Rectangle2D plotArea = chartPanel.getScreenDataArea();

enter image description here

Was it helpful?

Solution

This will give you the ranges you are looking for:

    XYPlot plot = (XYPlot) chart.getPlot();
    Range xRange = plot.getDomainAxis().getRange();
    Range yRange = plot.getRangeAxis().getRange();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top