ChartDirector 7.1 (C++ Edition)

ContourLayer.setZBounds


Usage

void setZBounds(double minZ = DataBound, double maxZ = DataBound);

Description

Clips the z values to the given bounds.

In spline surface interpolation (see ContourLayer.setSmoothInterpolation), it is possible that the interpolated surface contains regions that are higher than the highest data point, or lower than the lowest data point.

As an example, consider a linear sequence of points with z values [10, 20, 30, 40, 40, 30, 20, 10]. The first 4 points represent an upward slope, while the last 4 points represent a download slope. If these points are to be joined with a smooth spline, the peak will naturally fall somewhere between the middle two points and exceed 40. So there will be a region in the spline higher than the highest data point.

In some applications, it may be desirable to limit the z values to certain bounds. For example, if the data are about rainfall, it is not desirable if the interpolated surface falls below 0, as there cannot be negative rainfall. The setZBounds method can be used to clip the interpolated surface to the desired bounds.

Arguments

ArgumentDefaultDescription
minZDataBoundThe minimum z value to clip to. Use NoValue if there is no minimum z bound. The special constant DataBound means that the minimum z value is the minimum data value.
maxZDataBoundThe maximum z value to clip to. Use NoValue if there is no maximum z bound. The special constant DataBound means that the maximum z value is the maximum data value.

Return Value

None