|
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.ScatterChart
public class ScatterChart
This class provides tools to create and manage scatter plots. Using the
ScatterChart
class is the simplest way to produce scatter plots only.
Each ScatterChart
object is linked with a
XYListSeriesCollection
data set.
Constructor Summary | |
---|---|
ScatterChart()
Initializes a new ScatterChart instance with an empty data set. |
|
ScatterChart(String title,
String XLabel,
String YLabel,
double[][]... data)
Initializes a new ScatterChart instance with data data. |
|
ScatterChart(String title,
String XLabel,
String YLabel,
double[][] data,
int numPoints)
Initializes a new ScatterChart instance with sets of points data. |
|
ScatterChart(String title,
String XLabel,
String YLabel,
double[][] data,
int x,
int y)
Initializes a new ScatterChart instance using subsets of data. |
|
ScatterChart(String title,
String XLabel,
String YLabel,
DoubleArrayList... data)
Initializes a new ScatterChart instance with data data. |
|
ScatterChart(String title,
String XLabel,
String YLabel,
XYSeriesCollection data)
Initializes a new ScatterChart instance with data data. |
Method Summary | |
---|---|
int |
add(double[] x,
double[] y)
Adds a data series into the series collection. |
int |
add(double[] x,
double[] y,
int numPoints)
Adds a data series into the series collection. |
int |
add(double[] x,
double[] y,
String name,
String plotStyle)
Adds a data series into the series collection. |
XYListSeriesCollection |
getSeriesCollection()
Returns the chart's dataset. |
void |
setSeriesCollection(XYListSeriesCollection dataset)
Links a new dataset to the current chart. |
void |
setTicksSynchro(int s)
Synchronizes X-axis ticks to the s-th series x-values. |
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, 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 ScatterChart()
public ScatterChart(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 ScatterChart(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 ScatterChart(String title, String XLabel, String YLabel, double[][] data, int x, int y)
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.data
- series of point sets.x
- Index of data forming the x-coordinatesy
- Index of data forming the y-coordinatespublic ScatterChart(String title, String XLabel, String YLabel, DoubleArrayList... data)
DoubleArrayList
from the Colt library is
used to store the data. The description is similar to the above
constructor with double[]... data.
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.data
- series of point sets.public ScatterChart(String title, String XLabel, String YLabel, XYSeriesCollection data)
XYSeriesCollection
is a
JFreeChart container class to store XY plots.
title
- chart title.XLabel
- Label on x-axis.YLabel
- Label on y-axis.data
- series collection.Method Detail |
---|
public int add(double[] x, double[] y, String name, String plotStyle)
x
- xi coordinates.y
- yi coordinates.name
- Name of the series.plotStyle
- Plot style of the series.
public int add(double[] x, double[] y)
x
- xi coordinates.y
- yi coordinates.
public int add(double[] x, double[] y, int numPoints)
x
- xi coordinates.y
- yi coordinates.numPoints
- Number of points to add.
public XYListSeriesCollection getSeriesCollection()
public void setSeriesCollection(XYListSeriesCollection dataset)
dataset
- new dataset.public void setTicksSynchro(int s)
setTicksSynchro
in class XYChart
s
- series 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 |