public class HistogramChart extends XYChart
HistogramChart class is the simplest way to produce histograms.
Each HistogramChart object is linked with an
HistogramSeriesCollection dataset.| Constructor and Description |
|---|
HistogramChart()
Initializes a new HistogramChart instance with an empty data set.
|
HistogramChart(java.lang.String title,
java.lang.String XLabel,
java.lang.String YLabel,
CustomHistogramDataset data)
Initializes a new HistogramChart instance with data data.
|
HistogramChart(java.lang.String title,
java.lang.String XLabel,
java.lang.String YLabel,
double[]... data)
Initializes a new HistogramChart instance with input data.
|
HistogramChart(java.lang.String title,
java.lang.String XLabel,
java.lang.String YLabel,
double[] data,
int numPoints)
Initializes a new HistogramChart instance with input data.
|
HistogramChart(java.lang.String title,
java.lang.String XLabel,
java.lang.String YLabel,
DoubleArrayList... data)
Initializes a new HistogramChart instance with data data.
|
HistogramChart(java.lang.String title,
java.lang.String XLabel,
java.lang.String YLabel,
int[] count,
double[] bound)
Initializes a new HistogramChart instance with data count
and bound.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.lang.String |
toLatex(double width,
double height)
Exports the chart to a LATEX source code using PGF/TikZ.
|
javax.swing.JFrame |
view(int width,
int height)
Displays chart on the screen using Swing.
|
disableGrid, enableGrid, getChartMargin, getJFreeChart, getTitle, getXAxis, getYAxis, setAutoRange, setAutoRange00, setChartMargin, setLatexDocFlag, setManualRange, setManualRange, setManualRange00, setprobFlag, setTitle, toLatexFilepublic HistogramChart()
public HistogramChart(java.lang.String title,
java.lang.String XLabel,
java.lang.String YLabel,
double[]... data)
title - chart title.XLabel - Label on x-axis.YLabel - Label on y-axis.data - series of point sets.public HistogramChart(java.lang.String title,
java.lang.String XLabel,
java.lang.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(java.lang.String title,
java.lang.String XLabel,
java.lang.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(java.lang.String title,
java.lang.String XLabel,
java.lang.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(java.lang.String title,
java.lang.String XLabel,
java.lang.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 void setAutoRange(boolean right,
boolean top)
XYChartsetAutoRange in class XYChartright - 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 XYCharts - selects histogram used to define ticks.public javax.swing.JFrame view(int width,
int height)
public java.lang.String toLatex(double width,
double height)
XYChartTo submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.