public class P2D extends Plottable implements Serializable
| Constructor and Description |
|---|
P2D()
Construct an empty container
|
P2D(String title)
Construct an empty container with a title
|
P2D(String title,
String sfile)
Construct a P2D from a file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(double x,
double y,
double z)
Adds values of a plot-point pair (X,Y,Z).
|
void |
clear()
Clear the container
|
P2D |
copy()
Get a copy of the current holder
|
P2D |
copy(String newtitle)
create an exact of the current holder
|
void |
doc()
Show online documentation.
|
void |
fill(double[] xa,
double[] ya,
double[] za)
Fill a P2D container from 3 arrays.
|
double[] |
getArrayX()
Get array representing X-values
|
double[] |
getArrayY()
Get array representing Y-values
|
double[] |
getArrayZ()
Get array representing Z-values
|
jplot.DataArray2D |
getDataArray()
Return a DataArray2D container.
|
double |
getMax(int axis)
Returns the maximum value in the range.
|
double |
getMin(int axis)
Returns the minimum value in the range.
|
Color |
getSymbolColor()
Get color attribute
|
int |
getSymbolSize()
Get size of the symbols
|
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 |
mean(int axis)
Returns the mean value for any axis
|
double |
meanX()
Returns the mean value in X.
|
double |
meanY()
Returns the mean value in Y.
|
double |
meanZ()
Returns the mean value in Z.
|
P2D |
merge(P2D a)
Merge two P2D containers
|
int |
read(BufferedReader br)
Read P2D from a file.
|
int |
read(File sfile)
Read P2D from a file.
|
int |
read(String sfile)
Read P2D from a file.
|
int |
read(URL url)
Read data from URL.
|
int |
readGZip(String sfile)
Read P2D from a GZiped file.
|
P2D |
readSerialized(String name)
Read a P2D object from a serialized file
|
int |
readZip(String sfile)
Read P1D from a Zipped file.
|
void |
set(int i,
double x,
double y,
double z)
Sets the values of (x,y,z).
|
void |
setDataArray(jplot.DataArray2D data)
Set data in a form of DataArray
|
void |
setDoubleArrayLists(cern.colt.list.DoubleArrayList dataX2,
cern.colt.list.DoubleArrayList dataY2,
cern.colt.list.DoubleArrayList dataZ2)
Set the array from DoubleArrayLists
|
void |
setSymbolColor(Color c)
Sets symbol color
|
void |
setSymbolSize(int s)
Sets the symbol size
|
int |
size()
Return the length of the data vector.
|
void |
toFile(String name)
Write a P2D to an external file.
|
String |
toString()
Convert to a string
|
void |
toTable()
Print the P2D container to a Table in a separate Frame.
|
int |
writeSerialized(String name)
Write a object to a serialized file
|
public P2D()
public P2D(String title)
title - New titlepublic Color getSymbolColor()
public void setSymbolColor(Color c)
c - Colorpublic int getSymbolSize()
public int read(BufferedReader br)
br - Input buffered readerpublic int read(File sfile)
sfile - input filepublic int read(URL url)
url - URL location of input filepublic int read(String sfile)
The old content will be lost. Use a space to separate values in columns and tab to put new row. Comment lines starting with "#" and "*" are ignored.
sfile - File name with inputpublic int readGZip(String sfile)
Use a space to separate values in columns and tab to put new row.
sfile - File name with input (extension .gz)public int readZip(String sfile)
sfile - File name with input (extension zip)public void setSymbolSize(int s)
s - symbol sizepublic void toFile(String name)
name - File name with outputpublic P2D merge(P2D a)
a - Container to be addedpublic void setDataArray(jplot.DataArray2D data)
data - input datapublic jplot.DataArray2D getDataArray()
public void add(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 fill(double[] xa,
double[] ya,
double[] za)
xa - array with X valuesya - array with Y valuesza - array with Z valuespublic void set(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 int size()
public P2D copy()
public String toString()
public P2D copy(String newtitle)
newtitle - new titlepublic void setDoubleArrayLists(cern.colt.list.DoubleArrayList dataX2,
cern.colt.list.DoubleArrayList dataY2,
cern.colt.list.DoubleArrayList dataZ2)
dataX2 - input XdataY2 - input YdataZ2 - input Zpublic double[] getArrayX()
public int writeSerialized(String name)
name - serialized file name for output.public P2D readSerialized(String name)
name - serialized file name for input.public double[] getArrayY()
public double[] getArrayZ()
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 getMax(int axis)
axis - defines to which axis this function applies. axis=0 - X,
axis=1 - Y, axis=2 - Z,public double getMin(int axis)
axis - defines to which axis this function applies.public double meanX()
public double meanY()
public double meanZ()
public double mean(int axis)
axis - axis (0,1,2)public void clear()
public void toTable()
public void doc()
DMelt 2.0 © DataMelt by jWork.ORG