HistogramDataset dataset = new HistogramDataset(); dataset.addSeries("series label",arrayOfValues,noOfBins);
datasetList.add(new DefaultBoxAndWhiskerCategoryDataset()); datasetList.get(i).add( distributionLevelList.get(i), solverLabel,
HistogramDataset dataset = new HistogramDataset(); dataset.setType(HistogramType.RELATIVE_FREQUENCY); dataset.addSeries("H1", double[], 20); HistogramDataset dataset = new HistogramDataset(); double[] values = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; dataset.addSeries("H1", values, 10, 0.0, 10.0);
/** * Adds a list of values relating to one box-and-whisker entity to the * table. The various median values are calculated. * * @param list a collection of values from which the various medians will * be calculated. * @param rowKey the row key ({@code null} not permitted). * @param columnKey the column key ({@code null} not permitted). * * @see #add(BoxAndWhiskerItem, Comparable, Comparable) */ public void add(List list, Comparable rowKey, Comparable columnKey) { BoxAndWhiskerItem item = BoxAndWhiskerCalculator .calculateBoxAndWhiskerStatistics(list); add(item, rowKey, columnKey); }
/** * Adds an observation to the dataset (by incrementing the item count for * the appropriate bin). A runtime exception is thrown if the value does * not fit into any bin. * * @param value the value. */ public void addObservation(double value) { addObservation(value, true); }
/** * Returns the value for an item (for this dataset, the mean value is * returned). * * @param rowKey the row key. * @param columnKey the columnKey. * * @return The value (possibly <code>null</code>). */ public Number getValue(Comparable rowKey, Comparable columnKey) { return getMeanValue(rowKey, columnKey); }
/** * Returns the starting Y value for the specified series and item. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The value. */ @Override public Number getStartY(int series, int item) { return getY(series, item); }
/** * Returns the mean of an array of numbers. This is equivalent to calling * {@code calculateMean(values, true)}. * * @param values the values ({@code null} not permitted). * * @return The mean. */ public static double calculateMean(Number[] values) { return calculateMean(values, true); }
/** * Returns the end y-value (as a double primitive) for an item within a * series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The end y-value. */ public double getEndYValue(int series, int item) { return getYValue(series, item); }
/** * Gets the current name of the selected series. * * @param series series index. * * @return current name of the series. * */ public String getName (int series) { return (String)((DefaultBoxAndWhiskerCategoryDataset)seriesCollection).getColumnKey(series); }
/** * Adds an observation to the dataset (by incrementing the item count for * the appropriate bin). A runtime exception is thrown if the value does * not fit into any bin. * * @param value the value. */ public void addObservation(double value) { addObservation(value, true); }
/** * Returns the value for an item (for this dataset, the mean value is * returned). * * @param rowKey the row key. * @param columnKey the columnKey. * * @return The value (possibly {@code null}). */ @Override public Number getValue(Comparable rowKey, Comparable columnKey) { return getMeanValue(rowKey, columnKey); }
/** * Returns the ending Y value for the specified series and item. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The value. */ @Override public Number getEndY(int series, int item) { return getY(series, item); }
/** * Returns the mean of a collection of {@code Number} objects. * * @param values the values ({@code null} not permitted). * * @return The mean. */ public static double calculateMean(Collection values) { return calculateMean(values, true); }
/** * Returns the start y-value (as a double primitive) for an item within a * series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The start y-value. */ public double getStartYValue(int series, int item) { return getYValue(series, item); }
/** * Returns the starting Y value for the specified series and item. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The value. */ public Number getStartY(int series, int item) { return getY(series, item); }
/** * Returns the mean of an array of numbers. This is equivalent to calling * <code>calculateMean(values, true)</code>. * * @param values the values (<code>null</code> not permitted). * * @return The mean. */ public static double calculateMean(Number[] values) { return calculateMean(values, true); }
/** * Returns the end y-value (as a double primitive) for an item within a * series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The end y-value. */ @Override public double getEndYValue(int series, int item) { return getYValue(series, item); }
/** * Returns the ending Y value for the specified series and item. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The value. */ public Number getEndY(int series, int item) { return getY(series, item); }
/** * Returns the mean of a collection of <code>Number</code> objects. * * @param values the values (<code>null</code> not permitted). * * @return The mean. */ public static double calculateMean(Collection values) { return calculateMean(values, true); }