Package xal.extension.widgets.plot
Class BlackAndWhite3D
java.lang.Object
xal.extension.widgets.plot.ColorSurfaceData
xal.extension.widgets.plot.BlackAndWhite3D
This class is a data class for data used in the FunctionGraphsJPanel class.
This class contains 2D grid with values at the grid points. These values will
be presented as colored rectangles in the plot. It does not use interpolation
to calculate z-value between grid points. Z-value can be 0 or non zero only.
- Version:
- 1.0
- Author:
- A. Shishlo
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBlackAndWhite3D
(int nX, int nY) The data set constructor with size of the grid. -
Method Summary
Methods inherited from class xal.extension.widgets.plot.ColorSurfaceData
addValue, calcMaxMinZ, getColor, getColorGenerator, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getScreenSizeX, getScreenSizeY, getSizeX, getSizeY, getValue, getX, getY, multiplyBy, setColorGenerator, setMinMaxX, setMinMaxY, setScreenResolution, setSize, setValue, setZero
-
Constructor Details
-
BlackAndWhite3D
public BlackAndWhite3D(int nX, int nY) The data set constructor with size of the grid.
-
-
Method Details
-
getValue
public double getValue(double x, double y) Returns the value of the 2D array for x and y.- Specified by:
getValue
in classColorSurfaceData
-
addValue
public void addValue(double x, double y, double value) Bins value into the 2D array for x and y with weight = value. Here the value does not matter. The value on the grid will be 1.- Specified by:
addValue
in classColorSurfaceData
-