Example usage for org.jfree.data.statistics SimpleHistogramBin getLowerBound

List of usage examples for org.jfree.data.statistics SimpleHistogramBin getLowerBound

Introduction

In this page you can find the example usage for org.jfree.data.statistics SimpleHistogramBin getLowerBound.

Prototype

public double getLowerBound() 

Source Link

Document

Returns the lower bound.

Usage

From source file:org.jfree.data.statistics.SimpleHistogramDataset.java

/**
 * Returns the start x-value (as a double primitive) for an item within a
 * series./*  w  w w.java  2  s.  c o m*/
 *
 * @param series  the series (zero-based index).
 * @param item  the item (zero-based index).
 *
 * @return The start x-value.
 */
@Override
public double getStartXValue(int series, int item) {
    SimpleHistogramBin bin = (SimpleHistogramBin) this.bins.get(item);
    return bin.getLowerBound();
}

From source file:org.jfree.data.statistics.SimpleHistogramDataset.java

/**
 * Returns the x-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 x-value.//from w ww.j a  v  a 2 s .c om
 */
@Override
public double getXValue(int series, int item) {
    SimpleHistogramBin bin = (SimpleHistogramBin) this.bins.get(item);
    return (bin.getLowerBound() + bin.getUpperBound()) / 2.0;
}

From source file:org.jfree.data.statistics.SimpleHistogramDataset.java

/**
 * Returns the 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 y-value.//from w w w .j  a va2 s .  c o m
 *
 * @see #getAdjustForBinSize()
 */
@Override
public double getYValue(int series, int item) {
    SimpleHistogramBin bin = (SimpleHistogramBin) this.bins.get(item);
    if (this.adjustForBinSize) {
        return bin.getItemCount() / (bin.getUpperBound() - bin.getLowerBound());
    } else {
        return bin.getItemCount();
    }
}