Hi Tom,
The easy method is to modify your data. For example, you may subtract all the data values (except 0) with 0.001. In this way, the chart will be exactly the same, except that the surface at exactly z = 2.0 will become z = 1.999 and will therefore use the color for 1.5 to 2.0 (instead of 2.0 to 2.5).
In Java, it is like:
//Automatically determine a suitable adjustment to be 1/10000 of the z-axis range
//The error will be 1/10000 of the screen dimension, which is not noticible.
ArrayMath m = new ArrayMath(dataZ);
double adjustment = (m.max() - m.min()) * 0.00001;
for (int i = 0; i < dataZ.length; ++i) {
if (Math.abs(dataZ[i]) > adjustment)
dataZ[i] -= adjustment;
}
Hope this can help.
Regards
Peter Kwan |