|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.P2D
public class P2D
A container to hold data points in X,Y,Z.
Constructor Summary | |
---|---|
P2D()
Construct an empty container with a title |
|
P2D(String title)
Construct an empty container with a title |
|
P2D(String title,
String sfile)
Construct a P2D from a file. |
Method Summary | |
---|---|
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 |
String |
getTitle()
Get a new title |
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 |
void |
print()
Print a P2D container on the screen |
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 |
setSymbolColor(Color c)
Sets symbol color |
void |
setSymbolSize(int s)
Sets the symbol size |
void |
setTitle(String title)
Set a new title |
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. |
void |
toTable(boolean format)
Print the P2D container to a Table in a separate Frame. |
int |
writeSerialized(String name)
Write a P0D object to a serialized file |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public P2D(String title)
title
- New titlepublic P2D()
public P2D(String title, String sfile)
title
- Title of the containersfile
- File name with input. It can be either a file on a file system or URL location (must start from http or ftp)Method Detail |
---|
public void setTitle(String title)
title
- New Titlepublic String getTitle()
public Color getSymbolColor()
public void setSymbolColor(Color c)
c
- Colorpublic int getSymbolSize()
public int read(BufferedReader br)
br
- Input buffered reader
public int read(File sfile)
sfile
- input file
public 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 input
public 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 void print()
public P2D merge(P2D a)
a
- Container to be added
public 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()
toString
in class Object
public P2D copy(String newtitle)
newtitle
- new titlepublic 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 array
public double getY(int i)
i
- index of the array
public double getZ(int i)
i
- index of the array
public 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 toTable(boolean format)
format
- if false, numbers will not be formatted to scientific format
##.#####E00public void doc()
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |