public class DataArray2D extends LinePars
A data array has plotting attributes, e.g. saying whether we should plot symbols, draw lines or fill areas. All the plotting attributes are defined in the base-class LinePars, here we set the actual data array, i.e. a vector of points (PlotPoints) defining X,Y.
LinePars
,
Serialized FormConstructor and Description |
---|
DataArray2D()
Default constructor, initializes the class with nothing.
|
DataArray2D(int size)
Default constructor, initializes the class with nothing.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double x,
double y,
double z)
Adds the values of a plot-point pair (x,y,z).
|
void |
clear()
Clears the current array.
|
ArrayList |
getData()
Return the data vector
|
double |
getLowestNonZeroValue(int axis)
Returns the lowest, but non-zero value in the range.
|
double |
getMaxValue(int axis)
Returns the maximum value in the range.
|
double |
getMinValue(int axis)
Returns the minimum value in the range.
|
PlotPoint2D |
getPoint(int i)
Returns the plot-point of the specified index.
|
String |
getTitle()
Get the title if any
|
double |
getX(int i)
Return a specific X-value.
|
double |
getY(int i)
Return a specific Y-value.
|
double |
getZ(int i)
Return a specific Z-value.
|
double |
meanX() |
double |
meanY() |
double |
meanZ() |
boolean |
parse(BufferedReader in)
Read DataArray from BufferedReader
|
boolean |
parse(File file)
Get data from a file
|
void |
print()
Print a data container on the screen
|
void |
setPoint(int i,
double x,
double y,
double z)
Sets the values of a plot-point pair (x,y).
|
int |
size()
Return the length of the data vector.
|
void |
toFile(String name,
String title)
Write a DataArray to an external file.
|
void |
updateMean(double x,
double y,
double z)
Updates Mean values.
|
void |
updateMinMax(double x,
double y,
double z)
Updates maximum and minimum values.
|
copy, dataChanged, drawLegend, drawLine, drawSymbol, errorsFill, errorsFillSys, errorsSysX, errorsSysY, errorsX, errorsY, fill, fill, getAdditioner, getAttributes, getColor, getColorErrorsFill, getColorErrorsFillSys, getColorErrorsSysX, getColorErrorsSysY, getColorErrorsX, getColorErrorsY, getColorIndex, getDashIndex, getDashLength, getEndColor, getErrorFillColorTransp, getErrorFillColorTranspSys, getErrorsFill, getErrorsFillSys, getErrorsSysX, getErrorsSysY, getErrorsX, getErrorsY, getErrTicSize, getFillColor, getFillColorTransparency, getGraphStyle, getMultiplier, getName, getNameX, getNameY, getNameZ, getPenWidth, getPenWidthErr, getPenWidthErrSys, getPointFrequency, getSettings, getStartColor, getSymbol, getSymbolSize, getType, getWidthBin, isBarShown, isDrawLine, isDrawSymbol, nextColor, print, setAdditioner, setColor, setColor, setColorErrorsFill, setColorErrorsFillSys, setColorErrorsSysX, setColorErrorsSysY, setColorErrorsX, setColorErrorsY, setDashLength, setDashLength, setDataChanged, setDrawLegend, setDrawLine, setDrawSymbol, setErrorFillColorTransp, setErrorFillColorTranspSys, setErrTicSize, setFillColor, setFillColorTransparency, setGraphStyle, setMultiplier, setName, setNameX, setNameY, setNameZ, setPenWidth, setPenWidthErr, setPenWidthErrSys, setPointFrequency, setShowBars, setSlideColor, setSlideColor, setSymbol, setSymbolSize, setType, setWidthBin, slideColor, updateSettings
public DataArray2D()
public DataArray2D(int size)
public void updateMinMax(double x, double y, double z)
x
- just entered x-value of the pointy
- just entered y-value of the pointz
- just entered z-value of the pointpublic void updateMean(double x, double y, double z)
x
- just entered x-value of the pointy
- just entered y-value of the pointz
- just entered y-value of the pointpublic double meanX()
public double meanY()
public double meanZ()
public void addPoint(double x, double y, double z)
x
- x-value of the plot-pointy
- y-value of the plot-pointz
- z-value of the plot-pointpublic void setPoint(int i, double x, double y, double z)
i
- index of the plot-pointx
- x-value of the plot-pointy
- y-value of the plot-pointz
- z-value of the plot-pointpublic PlotPoint2D getPoint(int i)
i
- index of the plot-pointpublic int size()
public ArrayList getData()
public double getX(int i)
i
- index of the arraypublic double getY(int i)
i
- index of the arraypublic double getZ(int i)
i
- index of the arraypublic double getMaxValue(int axis)
axis
- defines to which axis this function applies. 0-x, 1-y, 2-zpublic double getMinValue(int axis)
axis
- defines to which axis this function applies.public double getLowestNonZeroValue(int axis)
axis
- defines to which axis this function applies.public void clear()
public void toFile(String name, String title)
name
- File name with outputtitle
- Titlepublic String getTitle()
public boolean parse(File file)
file
- public boolean parse(BufferedReader in)
in
- BufferedReaderJas4pp 1.5 © Java Analysis Studio for Particle Physics