public class Contour extends Object
Modifier and Type | Field and Description |
---|---|
double |
dx
Size of step in X and Y, Z
|
double |
dy
Size of step in X and Y, Z
|
double |
dz
Size of step in X and Y, Z
|
boolean |
noContours
Boolean value if true Contours will not be calculated
|
Constructor and Description |
---|
Contour(boolean bar,
int nx,
int ny,
boolean gray,
int n_levels) |
Modifier and Type | Method and Description |
---|---|
void |
calculateColors()
Compute color levels
|
void |
createGrid(double xmi,
double xma,
double ymi,
double yma)
Create a grid from a H2D histogram
|
void |
createGrid(String f,
double xmin,
double xmax,
double ymin,
double ymax)
Create a grid from a function
|
void |
createGrid(Vector<PlotPoint> points,
double xmin,
double xmax,
double ymin,
double ymax)
Create a grid from a points
|
void |
drawColor(Graphics2D g2,
double xmin,
double xmax,
double ymin,
double ymax)
Draw contour
|
void |
drawColorBar(Graphics2D g2,
Font f,
int righmargin)
Draw the contour
|
Color |
findGrayColors(double zlevel)
Compute gray colors
|
Color |
findSpectrumColors(double zlevel)
Compute spectrum colors
|
int |
getBarWidth() |
int[] |
getDim()
return the dimensions of the grid
|
int |
getFullBarWidth()
Get full bar width including the space and the text width
|
double[] |
getGrid()
Return the grid
|
double[] |
getLevels()
Return the contour levels.
|
double[] |
getRange()
Return the range of the grid
|
void |
setBarWidth(int barWidth) |
void |
setContourColor(Color c)
Set the contour's color.
|
void |
setDataBackground(Color c)
Set the background color for the data window.
|
void |
setGraphBackground(Color c)
Set the background color for the entire canvas.
|
void |
setHistogram(H2D h)
Set histogram and find all attributes
|
void |
setLabelColor(Color c)
Set the Color to be used with all the labels.
|
void |
setLabelFont(Font f)
Set the font to be used with All the labels
|
void |
setLabelledContourColor(Color c)
Set the labelled contour's color.
|
void |
setLabelLevels(int i)
Set the contour levels that are to have labels.
|
void |
setLimitsToGrid(boolean b)
If true the limits of the plot will be the grid limits.
|
void |
setNLevels(int l)
Set the number of contour levels.
|
public boolean noContours
public double dx
public double dy
public double dz
public void setHistogram(H2D h)
h
- public Color findGrayColors(double zlevel)
zlevel
- zlevel (between 0 and 1)public int getBarWidth()
public void setBarWidth(int barWidth)
public int getFullBarWidth()
public Color findSpectrumColors(double zlevel)
zlevel
- zlevel (between 0 and 1)public void calculateColors()
public double[] getGrid()
public int[] getDim()
public void drawColorBar(Graphics2D g2, Font f, int righmargin)
g2
- public void drawColor(Graphics2D g2, double xmin, double xmax, double ymin, double ymax)
g2
- Graphicsxmin
- xmin in JAVA 2D coordinatesxmax
- ymin
- ymax
- public void createGrid(String f, double xmin, double xmax, double ymin, double ymax)
f
- function namexmin
- Min Xxmax
- Max Xymin
- Min Yymax
- Max Ynx
- No of points in Xny
- No of points in Ypublic void createGrid(Vector<PlotPoint> points, double xmin, double xmax, double ymin, double ymax)
point
- Vector with pointsxmin
- Min Xxmax
- Max Xymin
- Min Yymax
- Max Ynx
- No of points in Xny
- No of points in Ypublic void createGrid(double xmi, double xma, double ymi, double yma)
point
- Vector with pointsxmin
- Min Xxmax
- Max Xymin
- Min Yymax
- Max Ynx
- No of points in Xny
- No of points in Ypublic void setGraphBackground(Color c)
public void setDataBackground(Color c)
public void setNLevels(int l)
public void setLimitsToGrid(boolean b)
b
- booleanpublic void setLabelLevels(int i)
if 0 no labels are drawn if 1 every level gets a label If 2 every 2nd level gets a label etc.
public double[] getRange()
public void setLabelFont(Font f)
f
- Fontpublic void setLabelColor(Color c)
c
- Colorpublic void setContourColor(Color c)
c
- Colorpublic void setLabelledContourColor(Color c)
c
- Colorpublic double[] getLevels()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics