本文整理汇总了Java中org.jfree.data.xy.XYZDataset.getSeriesCount方法的典型用法代码示例。如果您正苦于以下问题:Java XYZDataset.getSeriesCount方法的具体用法?Java XYZDataset.getSeriesCount怎么用?Java XYZDataset.getSeriesCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.xy.XYZDataset
的用法示例。
在下文中一共展示了XYZDataset.getSeriesCount方法的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: Summary
import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
* calculate the statistical summary for the given dataset
* @param dataset
*/
public Summary(XYZDataset dataset){
seriesCount = dataset.getSeriesCount();
sampleSize = new int[seriesCount];
mean = new double[seriesCount];
median = new double[seriesCount];
stdDev = new double[seriesCount];
skew = new double[seriesCount];
kurt = new double[seriesCount];
seriesName = new String[seriesCount];
int count = 0;
for (int i=0; i<seriesCount; i++){
int rowCount = dataset.getItemCount(i);
seriesName[i] = dataset.getSeriesKey(i).toString();
Double[] values = new Double[rowCount];
List<Double> valueList = new java.util.ArrayList<Double>();
for (int j=0; j<rowCount; j++){
double v = dataset.getXValue(i,j);
if (!Double.isNaN(v)){
values[count]=new Double(v);
valueList.add(new Double(v));
count++;
}
}
sampleSize[i]= valueList.size();
mean[i] = Statistics.calculateMean(values, false);
median[i] = Statistics.calculateMedian(valueList);
stdDev[i] = Statistics.getStdDev(values);
skew[i] = Statistics.calculateSkewness(values);
kurt[i] = Statistics.calculateKurtosis(values);
}
return;
}
示例4: resetExample
import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
* reset dataTable to default (demo data), and refesh chart
*/
public void resetExample() {
reset_Slider();
XYZDataset dataset= createDataset(true);
JFreeChart chart = createChart(dataset);
chartPanel = new ChartPanel(chart, false);
setChart();
hasExample = true;
convertor.dataset2Table(dataset);
JTable tempDataTable = convertor.getTable();
// resetTable();
resetTableRows(tempDataTable.getRowCount()+1);
resetTableColumns(tempDataTable.getColumnCount());
for(int i=0;i<tempDataTable.getColumnCount();i++) {
columnModel.getColumn(i).setHeaderValue(tempDataTable.getColumnName(i));
// System.out.println("updateExample tempDataTable["+i+"] = " +tempDataTable.getColumnName(i));
}
columnModel = dataTable.getColumnModel();
dataTable.setTableHeader(new EditableHeader(columnModel));
for(int i=0;i<tempDataTable.getRowCount();i++)
for(int j=0;j<tempDataTable.getColumnCount();j++) {
dataTable.setValueAt(tempDataTable.getValueAt(i,j),i,j);
}
dataPanel.removeAll();
dataPanel.add(new JScrollPane(dataTable));
dataTable.setGridColor(Color.gray);
dataTable.setShowGrid(true);
dataTable.doLayout();
// this is a fix for the BAD SGI Java VM - not up to date as of dec. 22, 2003
try {
dataTable.setDragEnabled(true);
} catch (Exception e) {
}
dataPanel.validate();
// do the mapping
int seriesCount = dataset.getSeriesCount();
for(int i=0; i<seriesCount; i++){
addButtonIndependent();
addButtonDependent();
addButtonDependent();
}
//updateStatus(url);
}