You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reasons is it seems it is assuming that number of contour levels and number of colors in color map are equal. which may not be the case.
Better solution will be to pick color by using following:
//col = cmap.getColorByIndex(cindex + 1);
if (zmin > zlevp1 || zmax < zlev) {
continue;
}
try {
col = attr_.getColorMap().getColor(clevels.getLevel(cindex + 1));
} catch (ContourLevelNotFoundException ex) {
col = cmap.getColorByIndex(cindex + 1);
}
Kindly correct me if I am incorrect. I have tested it never goes into catch. Just a fallback option.
I am attaching the current and proposed areafill snapshots by running JGridDemo.
The proposed matches closely to the raster in terms of color map.
The text was updated successfully, but these errors were encountered:
I feel the color picked in fillSquare method is not correct.
sgt/src/main/java/gov/noaa/pmel/sgt/GridCartesianRenderer.java
Line 422 in 6cfbb0b
The reasons is it seems it is assuming that number of contour levels and number of colors in color map are equal. which may not be the case.
Better solution will be to pick color by using following:
//col = cmap.getColorByIndex(cindex + 1);
if (zmin > zlevp1 || zmax < zlev) {
continue;
}
try {
col = attr_.getColorMap().getColor(clevels.getLevel(cindex + 1));
} catch (ContourLevelNotFoundException ex) {
col = cmap.getColorByIndex(cindex + 1);
}
Kindly correct me if I am incorrect. I have tested it never goes into catch. Just a fallback option.
I am attaching the current and proposed areafill snapshots by running JGridDemo.
The proposed matches closely to the raster in terms of color map.
The text was updated successfully, but these errors were encountered: