public class ComplexGridPlot extends MeasuredImage implements Plot2D
image, visible, xmax, xmin, ymax, ymin
CONTOUR_PLOT, GRID_PLOT, INTERPOLATED_PLOT, SURFACE_PLOT
Constructor and Description |
---|
ComplexGridPlot()
Constructs the ComplexGridPlot without data.
|
ComplexGridPlot(GridData _griddata)
Constructs the ComplexGridPlot using the given 2d datset.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the image and the grid.
|
double |
getCeiling()
Gets the ceiling for scaling the z data.
|
double |
getFloor()
Gets the floor for scaling the z data.
|
GridData |
getGridData()
Gets the GridData object.
|
static XML.ObjectLoader |
getLoader()
Gets an XML.ObjectLoader to save and load data for this program.
|
double |
indexToX(int i)
Gets the x coordinate for the given index.
|
double |
indexToY(int i)
Gets the y coordinate for the given index.
|
boolean |
isAutoscaleZ()
Gets the autoscale flag for z.
|
protected void |
recolorImage()
Recolors the image pixels using the data array.
|
void |
setAll(java.lang.Object obj)
Sets the data to new values.
|
void |
setAll(java.lang.Object obj,
double xmin,
double xmax,
double ymin,
double ymax)
Sets the values and the scale.
|
void |
setAutoscaleZ(boolean isAutoscale,
double floor,
double ceil)
Sets the autoscale flag and the floor and ceiling values for the colors.
|
void |
setColorPalette(java.awt.Color[] colors)
Setting the color palette is not supported.
|
void |
setExpandedZ(boolean expanded,
double expansionFactor)
Expands the magnitude scale so as to enhance values close to zero.
|
void |
setFloorCeilColor(java.awt.Color floorColor,
java.awt.Color ceilColor)
Sets the floor and ceiling colors.
|
void |
setGridData(GridData _griddata)
Sets the data storage to the given value.
|
void |
setGridLineColor(java.awt.Color c)
Sets the color for grid line boundaries
|
void |
setIndexes(int[] indexes)
Sets the indexes for the data components that will be plotted.
|
void |
setPaletteType(int type)
Setting the palette is not supported.
|
void |
setShowGridLines(boolean showGrid)
Shows the grid lines if set to true.
|
javax.swing.JFrame |
showLegend()
Shows a legend of phase angle and color.
|
void |
update()
Updates in response to changes in the data.
|
int |
xToIndex(double x)
Gets closest index from the given x world coordinate.
|
int |
yToIndex(double y)
Gets closest index from the given y world coordinate.
|
getXMax, getXMin, getYMax, getYMin, isMeasured, setImage, setMinMax, setVisible, setXMax, setXMin, setYMax, setYMin
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setVisible
getXMax, getXMin, getYMax, getYMin, isMeasured
public ComplexGridPlot()
public ComplexGridPlot(GridData _griddata)
public GridData getGridData()
getGridData
in interface Plot2D
public int xToIndex(double x)
public int yToIndex(double y)
public double indexToX(int i)
public double indexToY(int i)
public void setAll(java.lang.Object obj)
public void setAll(java.lang.Object obj, double xmin, double xmax, double ymin, double ymax)
public void setGridData(GridData _griddata)
Plot2D
setGridData
in interface Plot2D
public javax.swing.JFrame showLegend()
showLegend
in interface Plot2D
public void setAutoscaleZ(boolean isAutoscale, double floor, double ceil)
setAutoscaleZ
in interface Plot2D
isAutoscale
- floor
- not supportedceil
- ceiling valuepublic boolean isAutoscaleZ()
isAutoscaleZ
in interface Plot2D
public double getFloor()
public double getCeiling()
getCeiling
in interface Plot2D
public void setFloorCeilColor(java.awt.Color floorColor, java.awt.Color ceilColor)
setFloorCeilColor
in interface Plot2D
floorColor
- not supportedceilColor
- ceiling colorpublic void setShowGridLines(boolean showGrid)
setShowGridLines
in interface Plot2D
showGrid
- public void update()
public void setExpandedZ(boolean expanded, double expansionFactor)
setExpandedZ
in interface Plot2D
expanded
- booleanexpansionFactor
- doubleprotected void recolorImage()
public void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
draw
in class MeasuredImage
panel
- g
- public void setColorPalette(java.awt.Color[] colors)
setColorPalette
in interface Plot2D
colors
- public void setPaletteType(int type)
setPaletteType
in interface Plot2D
type
- public void setGridLineColor(java.awt.Color c)
Plot2D
setGridLineColor
in interface Plot2D
public void setIndexes(int[] indexes)
Plot2D
setIndexes
in interface Plot2D
indexes
- the sample-component indexespublic static XML.ObjectLoader getLoader()