|
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.XYChart umontreal.iro.lecuyer.charts.HistogramChart
public class HistogramChart
This class provides tools to create and manage histograms.
The HistogramChart
class is the simplest way to produce histograms.
Each HistogramChart
object is linked with an
HistogramSeriesCollection
dataset.
Constructor Summary | |
---|---|
HistogramChart()
Initializes a new HistogramChart instance with an empty data set. |
|
HistogramChart(String title,
String XLabel,
String YLabel,
CustomHistogramDataset data)
Initializes a new HistogramChart instance with data data. |
|
HistogramChart(String title,
String XLabel,
String YLabel,
double[]... data)
Initializes a new HistogramChart instance with input data. |
|
HistogramChart(String title,
String XLabel,
String YLabel,
double[] data,
int numPoints)
Initializes a new HistogramChart instance with input data. |
|
HistogramChart(String title,
String XLabel,
String YLabel,
DoubleArrayList... data)
Initializes a new HistogramChart instance with data data. |
|
HistogramChart(String title,
String XLabel,
String YLabel,
int[] count,
double[] bound)
Initializes a new HistogramChart instance with data count and bound. |
|
HistogramChart(String title,
String XLabel,
String YLabel,
TallyHistogram... tallies)
Initializes a new HistogramChart instance with data arrays contained in each TallyHistogram object. |
|
HistogramChart(String title,
String XLabel,
String YLabel,
TallyStore... tallies)
Initializes a new HistogramChart instance with data arrays contained in each TallyStore object. |
Method Summary | |
---|---|
HistogramSeriesCollection |
getSeriesCollection()
Returns the chart's dataset. |
void |
setAutoRange(boolean right,
boolean top)
The x and the y ranges of the chart are set automatically. |
void |
setManuelRange(double[] range,
boolean right,
boolean top)
|
void |
setSeriesCollection(HistogramSeriesCollection dataset)
Links a new dataset to the current chart. |
void |
setTicksSynchro(int s)
Synchronizes x-axis ticks to the s-th histogram bins if the number of bins is not larger than 10; otherwise, choose approximately 10 ticks. |
String |
toLatex(double width,
double height)
Exports the chart to a LATEX source code using PGF/TikZ. |
JFrame |
view(int width,
int height)
Displays chart on the screen using Swing. |
Methods inherited from class umontreal.iro.lecuyer.charts.XYChart |
---|
disableGrid, drawVerticalLine, enableGrid, getChartMargin, getJFreeChart, getTitle, getXAxis, getYAxis, setAutoRange, setAutoRange00, setChartMargin, setLatexDocFlag, setManualRange, setManualRange, setManualRange00, setprobFlag, setTitle, toLatexFile |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HistogramChart()
public HistogramChart(String title, String XLabel, String YLabel, double[]... data)
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.data
- series of point sets.public HistogramChart(String title, String XLabel, String YLabel, double[] data, int numPoints)
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.data
- series of point sets.numPoints
- Number of points to plotpublic HistogramChart(String title, String XLabel, String YLabel, DoubleArrayList... data)
DoubleArrayList
is from the Colt library
and is used to store data.
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.data
- series of observation sets.public HistogramChart(String title, String XLabel, String YLabel, TallyStore... tallies)
TallyStore
object.
The input parameter tallies represents a collection of observation sets.
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.tallies
- series of observation sets.public HistogramChart(String title, String XLabel, String YLabel, CustomHistogramDataset data)
CustomHistogramDataset
is a
JFreeChart-like container class that stores and manages
observation sets.
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.data
- series collection.public HistogramChart(String title, String XLabel, String YLabel, int[] count, double[] bound)
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.count
- the number of observation between each bound.bound
- the bounds of the observationspublic HistogramChart(String title, String XLabel, String YLabel, TallyHistogram... tallies)
TallyHistogram
object.
The input parameter tallies represents a collection
of observation sets. The 2 extra bins at the beginning and at the end of the
tallies are not counted nor represented in the chart.
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.tallies
- series of observation sets.Method Detail |
---|
public void setAutoRange(boolean right, boolean top)
XYChart
setAutoRange
in class XYChart
right
- true if the x-values on the right of axis.top
- true if the y-values on the top of axis.public void setManuelRange(double[] range, boolean right, boolean top)
public HistogramSeriesCollection getSeriesCollection()
public void setSeriesCollection(HistogramSeriesCollection dataset)
dataset
- new dataset.public void setTicksSynchro(int s)
setTicksSynchro
in class XYChart
s
- selects histogram used to define ticks.public JFrame view(int width, int height)
view
in class XYChart
width
- frame width in pixels.height
- frame height in pixels.
public String toLatex(double width, double height)
XYChart
toLatex
in class XYChart
width
- Chart's width in centimeters.height
- Chart's height in centimeters.
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |