Package uk.ac.starlink.ttools.plot
Class SubsetSelectionPlotData
- java.lang.Object
-
- uk.ac.starlink.ttools.plot.WrapperPlotData
-
- uk.ac.starlink.ttools.plot.SubsetSelectionPlotData
-
- All Implemented Interfaces:
PlotData
public class SubsetSelectionPlotData extends WrapperPlotData
PlotData wrapper implementation which rearranges subset indexes.- Since:
- 9 Apr 2008
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description SubsetSelectionPlotData(PlotData base, int[] isets)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointSequence
getPointSequence()
Returns an iterator over the data points in this object.int
getSetCount()
Returns the number of subsets in this object.java.lang.String
getSetName(int iset)
Returns the name for a given subset.Style
getSetStyle(int iset)
Returns the plotting style for a given subset.-
Methods inherited from class uk.ac.starlink.ttools.plot.WrapperPlotData
getNdim, getNerror, hasLabels
-
-
-
-
Constructor Detail
-
SubsetSelectionPlotData
public SubsetSelectionPlotData(PlotData base, int[] isets)
Constructor. Thei
th subset in this object will be the same as theisets[i]
th one frombase
.- Parameters:
base
- plot data on which this is basedisets
- list of the indices of subsets frombase
which are to appear in this object
-
-
Method Detail
-
getSetCount
public int getSetCount()
Description copied from interface:PlotData
Returns the number of subsets in this object.- Specified by:
getSetCount
in interfacePlotData
- Overrides:
getSetCount
in classWrapperPlotData
- Returns:
- subset count
-
getSetName
public java.lang.String getSetName(int iset)
Description copied from interface:PlotData
Returns the name for a given subset.- Specified by:
getSetName
in interfacePlotData
- Overrides:
getSetName
in classWrapperPlotData
- Parameters:
iset
- subset index- Returns:
- subset name
-
getSetStyle
public Style getSetStyle(int iset)
Description copied from interface:PlotData
Returns the plotting style for a given subset.- Specified by:
getSetStyle
in interfacePlotData
- Overrides:
getSetStyle
in classWrapperPlotData
- Parameters:
iset
- subset index- Returns:
- subset style
-
getPointSequence
public PointSequence getPointSequence()
Description copied from interface:PlotData
Returns an iterator over the data points in this object.- Specified by:
getPointSequence
in interfacePlotData
- Overrides:
getPointSequence
in classWrapperPlotData
- Returns:
- new point iterator
-
-