|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.charts.SSJXYSeriesCollection umontreal.iro.lecuyer.charts.HistogramSeriesCollection
public class HistogramSeriesCollection
Stores data used in a HistogramChart. HistogramSeriesCollection provides complementary tools to draw histograms. One may add observation sets, define histogram bins, set plot color and plot style, enable/disable filled shapes, and set margin between shapes for each series. This class is linked with class CustomHistogramDataset to store data plots, and linked with JFreeChart XYBarRenderer to render the plot. CustomHistogramDataset has been developed at the Université de Montréal to extend the JFreeChart API, and is used to manage histogram datasets in a JFreeChart chart.
Constructor Summary | |
---|---|
HistogramSeriesCollection()
Creates a new HistogramSeriesCollection instance with empty dataset. |
|
HistogramSeriesCollection(CustomHistogramDataset data)
Creates a new HistogramSeriesCollection instance. |
|
HistogramSeriesCollection(double[]... data)
Creates a new HistogramSeriesCollection instance with given data series. |
|
HistogramSeriesCollection(double[] data,
int numPoints)
Creates a new HistogramSeriesCollection instance with the given data series data. |
|
HistogramSeriesCollection(DoubleArrayList... data)
Creates a new HistogramSeriesCollection. |
|
HistogramSeriesCollection(TallyHistogram... tallies)
Creates a new HistogramSeriesCollection instance with default parameters and given data. |
|
HistogramSeriesCollection(TallyStore... tallies)
Creates a new HistogramSeriesCollection instance with default parameters and given data. |
Method Summary | |
---|---|
int |
add(double[] data)
Adds a data series into the series collection. |
int |
add(double[] data,
int numPoints)
Adds a data series into the series collection. |
int |
add(DoubleArrayList observationSet)
Adds a data series into the series collection. |
int |
add(TallyStore tally)
Adds a data series into the series collection. |
List |
getBins(int series)
Returns the bins for a series. |
boolean |
getFilled(int series)
Returns the filled flag associated with the series-th data series. |
double |
getMargin()
Returns the margin which is a percentage amount by which the bars are trimmed. |
double |
getOutlineWidth(int series)
Returns the outline width in pt. |
CustomHistogramDataset |
getSeriesCollection()
Returns the CustomHistogramDataset object associated with the current variable. |
double[] |
getValues(int series)
Returns the values for a series. |
List |
getValuesList(int series)
Returns the values for a series. |
void |
setBins(int series,
HistogramBin[] binsTable)
Links bins given by table binsTable to a series. |
void |
setBins(int series,
int bins)
Sets bins periodic bins from the observation minimum values to the observation maximum value for a series. |
void |
setBins(int series,
int bins,
double minimum,
double maximum)
Sets bins periodic bins from minimum to maximum for a series. |
void |
setFilled(int series,
boolean filled)
Sets the filled flag. |
void |
setMargin(double margin)
Sets the margin which is a percentage amount by which the bars are trimmed for all series. |
void |
setOutlineWidth(int series,
double outline)
Sets the outline width in pt. |
void |
setValues(int series,
double[] values)
Sets a new values set to a series from a table. |
void |
setValues(int series,
List valuesList)
Sets a new values set to a series from a List variable. |
String |
toLatex(double XScale,
double YScale,
double XShift,
double YShift,
double xmin,
double xmax,
double ymin,
double ymax)
Formats and returns a string containing a LATEX-compatible source code which represents this data series collection. |
Methods inherited from class umontreal.iro.lecuyer.charts.SSJXYSeriesCollection |
---|
getColor, getDomainBounds, getRangeBounds, getRenderer, getX, getY, setColor, setRenderer, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HistogramSeriesCollection()
public HistogramSeriesCollection(double[]... data)
setBins
).
Each input parameter represents a data series.
data
- series of point sets.public HistogramSeriesCollection(double[] data, int numPoints)
setBins
).
Only the first numPoints of data will be taken into account.
data
- Point setnumPoints
- Number of points to plotpublic HistogramSeriesCollection(DoubleArrayList... data)
setBins
).
The input parameter represents a set of data plots. Each
DoubleArrayList
variable corresponds
to a histogram on the chart.
data
- series of observation sets.public HistogramSeriesCollection(TallyStore... tallies)
tallies
- series of point sets.public HistogramSeriesCollection(TallyHistogram... tallies)
tallies
- series of point sets.public HistogramSeriesCollection(CustomHistogramDataset data)
data
- series of point sets.Method Detail |
---|
public int add(double[] data)
data
- new series.
public int add(double[] data, int numPoints)
data
- new series.numPoints
- Number of points to add
public int add(DoubleArrayList observationSet)
observationSet
- new series values.
public int add(TallyStore tally)
tally
- TallyStore
to add values.
public CustomHistogramDataset getSeriesCollection()
getSeriesCollection
in class SSJXYSeriesCollection
public List getBins(int series)
series
- the series index (in the range 0 to getSeriesCount() - 1).
public void setBins(int series, int bins)
series
- the series index (in the range 0 to getSeriesCount() - 1).bins
- the number of periodic bins.
IndexOutOfBoundsExceptionif series is outside the specified range.public void setBins(int series, int bins, double minimum, double maximum)
series
- the series index (in the range 0 to getSeriesCount() - 1).bins
- the number of periodic bins.minimum
- minimum value.maximum
- maximum value.
IndexOutOfBoundsExceptionif series is outside the specified range.public void setBins(int series, HistogramBin[] binsTable)
series
- the series index (in the range 0 to getSeriesCount() - 1).binsTable
- new bins table.
IndexOutOfBoundsExceptionif series is outside the specified range.public List getValuesList(int series)
series
- the series index (in the range 0 to getSeriesCount() - 1).
public double[] getValues(int series)
series
- the series index (in the range 0 to getSeriesCount() - 1).
public void setValues(int series, List valuesList)
series
- the series index (in the range 0 to getSeriesCount() - 1).valuesList
- new values list.public void setValues(int series, double[] values)
series
- the series index (in the range 0 to getSeriesCount() - 1).values
- new values table.public boolean getFilled(int series)
series
- series index.
public void setFilled(int series, boolean filled)
series
- series index.filled
- fill flag.public double getMargin()
public void setMargin(double margin)
margin
- margin percentage amount.public double getOutlineWidth(int series)
series
- series index.public void setOutlineWidth(int series, double outline)
series
- series index.outline
- outline width.public String toLatex(double XScale, double YScale, double XShift, double YShift, double xmin, double xmax, double ymin, double ymax)
SSJXYSeriesCollection
toLatex
in class SSJXYSeriesCollection
XScale
- Domain original data scale.YScale
- Range original data scale.XShift
- Domain original data shift value.YShift
- Range original data shift value.xmin
- Domain min bound.xmax
- Domain nax bound.ymin
- Range min bound.ymax
- Range nax bound.
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |