Package uk.ac.starlink.ttools.plot
Class ArrayPlotData
- java.lang.Object
-
- uk.ac.starlink.ttools.plot.ArrayPlotData
-
-
Constructor Summary
Constructors Constructor Description ArrayPlotData(int nset, java.lang.String[] setNames, Style[] setStyles, int ndim, int nerror, boolean hasLabels, PointData[] points)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ArrayPlotDatacopyPlotData(PlotData data)Factory method which constructs a new ArrayPlotData object with data which is a copy of that taken from a suppliedPlotDataobject.intgetNdim()Returns the dimensionality of data points in this object.intgetNerror()Returns the number of error points per data point in this object.PointData[]getPoints()Returns the point array supplying the data for this object.PointSequencegetPointSequence()Returns an iterator over the data points in this object.intgetSetCount()Returns the number of subsets in this object.java.lang.StringgetSetName(int iset)Returns the name for a given subset.StylegetSetStyle(int iset)Returns the plotting style for a given subset.booleanhasLabels()Indicates whether there are or may be text labels associated with the data points in this object.voidsetPoints(PointData[] points)Sets the point array supplying the data for this object.
-
-
-
Constructor Detail
-
ArrayPlotData
public ArrayPlotData(int nset, java.lang.String[] setNames, Style[] setStyles, int ndim, int nerror, boolean hasLabels, PointData[] points)Constructor.- Parameters:
nset- number of subsetssetNames-nset-element array of subset namessetStyles-nset-element array of subset stylesndim- data point dimensionalitynerror- number of error values for each pointhasLabels- whether there are per-point text labelspoints- point data array
-
-
Method Detail
-
getSetCount
public int getSetCount()
Description copied from interface:PlotDataReturns the number of subsets in this object.- Specified by:
getSetCountin interfacePlotData- Returns:
- subset count
-
getSetName
public java.lang.String getSetName(int iset)
Description copied from interface:PlotDataReturns the name for a given subset.- Specified by:
getSetNamein interfacePlotData- Parameters:
iset- subset index- Returns:
- subset name
-
getSetStyle
public Style getSetStyle(int iset)
Description copied from interface:PlotDataReturns the plotting style for a given subset.- Specified by:
getSetStylein interfacePlotData- Parameters:
iset- subset index- Returns:
- subset style
-
getNdim
public int getNdim()
Description copied from interface:PlotDataReturns the dimensionality of data points in this object.- Specified by:
getNdimin interfacePlotData- Returns:
- length of
PointSequence.getPoint()return values
-
getNerror
public int getNerror()
Description copied from interface:PlotDataReturns the number of error points per data point in this object.- Specified by:
getNerrorin interfacePlotData- Returns:
- length of
PointSequence.getErrors()return values
-
hasLabels
public boolean hasLabels()
Description copied from interface:PlotDataIndicates whether there are or may be text labels associated with the data points in this object.- Specified by:
hasLabelsin interfacePlotData- Returns:
- true if
PointSequence.getLabel()may have non-null returns
-
getPointSequence
public PointSequence getPointSequence()
Description copied from interface:PlotDataReturns an iterator over the data points in this object.- Specified by:
getPointSequencein interfacePlotData- Returns:
- new point iterator
-
setPoints
public void setPoints(PointData[] points)
Sets the point array supplying the data for this object.- Parameters:
points- point array
-
getPoints
public PointData[] getPoints()
Returns the point array supplying the data for this object.- Returns:
- point array
-
copyPlotData
public static ArrayPlotData copyPlotData(PlotData data)
Factory method which constructs a new ArrayPlotData object with data which is a copy of that taken from a suppliedPlotDataobject.- Parameters:
data- data object to copy- Returns:
- new ArrayPlotData object
-
-