本文整理汇总了Java中org.jfree.data.xy.XYZDataset.getZValue方法的典型用法代码示例。如果您正苦于以下问题:Java XYZDataset.getZValue方法的具体用法?Java XYZDataset.getZValue怎么用?Java XYZDataset.getZValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.xy.XYZDataset
的用法示例。
在下文中一共展示了XYZDataset.getZValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: iterateZBounds
import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
* Iterates over the data items of the xyz dataset to find
* the z-dimension bounds.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param includeInterval include the z-interval (if the dataset has a
* z-interval.
*
* @return The range (possibly <code>null</code>).
*/
public static Range iterateZBounds(XYZDataset dataset,
boolean includeInterval) {
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value = dataset.getZValue(series, item);
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
maximum = Math.max(maximum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Range(minimum, maximum);
}
}
示例2: iterateZBounds
import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
* Iterates over the data items of the xyz dataset to find
* the z-dimension bounds.
*
* @param dataset the dataset ({@code null} not permitted).
* @param includeInterval include the z-interval (if the dataset has a
* z-interval.
*
* @return The range (possibly {@code null}).
*/
public static Range iterateZBounds(XYZDataset dataset,
boolean includeInterval) {
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
for (int series = 0; series < seriesCount; series++) {
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double value = dataset.getZValue(series, item);
if (!Double.isNaN(value)) {
minimum = Math.min(minimum, value);
maximum = Math.max(maximum, value);
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Range(minimum, maximum);
}
}
示例3: iterateToFindZBounds
import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
* Returns the range of z-values in the specified dataset for the
* data items belonging to the visible series and with x-values in the
* given range.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param visibleSeriesKeys the visible series keys (<code>null</code> not
* permitted).
* @param xRange the x-range (<code>null</code> not permitted).
* @param includeInterval a flag that determines whether or not the
* z-interval for the dataset is included (this only applies if the
* dataset has an interval, which is currently not supported).
*
* @return The y-range (possibly <code>null</code>).
*/
public static Range iterateToFindZBounds(XYZDataset dataset,
List visibleSeriesKeys, Range xRange, boolean includeInterval) {
ParamChecks.nullNotPermitted(dataset, "dataset");
ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys");
ParamChecks.nullNotPermitted(xRange, "xRange");
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
Iterator iterator = visibleSeriesKeys.iterator();
while (iterator.hasNext()) {
Comparable seriesKey = (Comparable) iterator.next();
int series = dataset.indexOf(seriesKey);
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double x = dataset.getXValue(series, item);
double z = dataset.getZValue(series, item);
if (xRange.contains(x)) {
if (!Double.isNaN(z)) {
minimum = Math.min(minimum, z);
maximum = Math.max(maximum, z);
}
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
}
else {
return new Range(minimum, maximum);
}
}
示例4: iterateToFindZBounds
import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
* Returns the range of z-values in the specified dataset for the
* data items belonging to the visible series and with x-values in the
* given range.
*
* @param dataset the dataset ({@code null} not permitted).
* @param visibleSeriesKeys the visible series keys ({@code null} not
* permitted).
* @param xRange the x-range ({@code null} not permitted).
* @param includeInterval a flag that determines whether or not the
* z-interval for the dataset is included (this only applies if the
* dataset has an interval, which is currently not supported).
*
* @return The y-range (possibly {@code null}).
*/
public static Range iterateToFindZBounds(XYZDataset dataset,
List visibleSeriesKeys, Range xRange, boolean includeInterval) {
Args.nullNotPermitted(dataset, "dataset");
Args.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys");
Args.nullNotPermitted(xRange, "xRange");
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
Iterator iterator = visibleSeriesKeys.iterator();
while (iterator.hasNext()) {
Comparable seriesKey = (Comparable) iterator.next();
int series = dataset.indexOf(seriesKey);
int itemCount = dataset.getItemCount(series);
for (int item = 0; item < itemCount; item++) {
double x = dataset.getXValue(series, item);
double z = dataset.getZValue(series, item);
if (xRange.contains(x)) {
if (!Double.isNaN(z)) {
minimum = Math.min(minimum, z);
maximum = Math.max(maximum, z);
}
}
}
}
if (minimum == Double.POSITIVE_INFINITY) {
return null;
} else {
return new Range(minimum, maximum);
}
}