On matrix plots the coordinates must be rounded from calculated values, and not casted
This commit is contained in:
@@ -52,8 +52,9 @@ abstract public class MatrixPlotBase extends PlotBase<MatrixPlotSeries> implemen
|
||||
if ((series == null) || (getNumberOfSeries() == 0)) {
|
||||
return;
|
||||
}
|
||||
final int indexX = ((int) ((x - series.getMinX()) / series.getBinWidthX()));
|
||||
final int indexY = ((int) ((y - series.getMinY()) / series.getBinWidthY()));
|
||||
final int indexX = (int)Math.round((x - series.getMinX()) / series.getBinWidthX());
|
||||
final int indexY = (int)Math.round((y - series.getMinY()) / series.getBinWidthY());
|
||||
|
||||
if (!series.contains(indexX, indexY)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user