org.opensourcephysics.display2d
Class ComplexContourPlot

java.lang.Object
  extended by org.opensourcephysics.display.MeasuredImage
      extended by org.opensourcephysics.display2d.ComplexInterpolatedPlot
          extended by org.opensourcephysics.display2d.ComplexContourPlot
All Implemented Interfaces:
Drawable, Measurable, Plot2D

public class ComplexContourPlot
extends ComplexInterpolatedPlot

ComplexInterpolatedPlot creates an image of a scalar field by inerpolating every image pixel to an untabulated point (x,y) in the 2d data. This interpolation smooths the resulting image.

Version:
1.0
Author:
Wolfgang Christian

Field Summary
 
Fields inherited from class org.opensourcephysics.display.MeasuredImage
image, visible, xmax, xmin, ymax, ymin
 
Fields inherited from interface org.opensourcephysics.display2d.Plot2D
CONTOUR_PLOT, GRID_PLOT, INTERPOLATED_PLOT, SURFACE_PLOT
 
Constructor Summary
ComplexContourPlot()
          Constructs the ComplexContourPlot using the given 2d datset.
ComplexContourPlot(GridData griddata)
          Constructs the ComplexContourPlot using the given 2d datset.
 
Method Summary
 void draw(DrawingPanel panel, java.awt.Graphics g)
          Draws the image and the grid.
 ContourPlot getContour()
           
 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 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 color)
          Sets the contour line color.
 void setIndexes(int[] indexes)
          Sets the indexes for the data component that will be plotted.
 void setPaletteType(int type)
          Setting the palette is not supported.
 void setShowGridLines(boolean show)
          Shows the contour lines.
 void setVisible(boolean isVisible)
          Sets the visibility of the contour plot.
 javax.swing.JFrame showLegend()
          Shows how values map to colors.
 void update()
          Updates the buffered image using the data array.
 
Methods inherited from class org.opensourcephysics.display2d.ComplexInterpolatedPlot
checkImage, getCeiling, getFloor, getGridData, getLoader, indexToX, indexToY, isAutoscaleZ, isMeasured, isSymmetricZ, recolorImage, setAll, setAll, setAutoscaleZ, setExpandedZ, setSymmetricZ, xToIndex, yToIndex
 
Methods inherited from class org.opensourcephysics.display.MeasuredImage
getImage, getXMax, getXMin, getYMax, getYMin, setImage, setMinMax, setXMax, setXMin, setYMax, setYMin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensourcephysics.display.Measurable
getXMax, getXMin, getYMax, getYMin
 

Constructor Detail

ComplexContourPlot

public ComplexContourPlot()
Constructs the ComplexContourPlot using the given 2d datset.


ComplexContourPlot

public ComplexContourPlot(GridData griddata)
Constructs the ComplexContourPlot using the given 2d datset.

Parameters:
griddata - GridData
Method Detail

getContour

public ContourPlot getContour()

setAutoscaleZ

public void setAutoscaleZ(boolean isAutoscale,
                          double floor,
                          double ceil)
Sets the autoscale flag and the floor and ceiling values for the colors. If autoscaling is true, then the min and max values of z are span the colors. If autoscaling is false, then floor and ceiling values limit the colors. Values below min map to the first color; values above max map to the last color.

Specified by:
setAutoscaleZ in interface Plot2D
Overrides:
setAutoscaleZ in class ComplexInterpolatedPlot
Parameters:
isAutoscale -
floor -
ceil -

update

public void update()
Updates the buffered image using the data array.

Specified by:
update in interface Plot2D
Overrides:
update in class ComplexInterpolatedPlot

setGridData

public void setGridData(GridData griddata)
Sets the data storage to the given value.

Specified by:
setGridData in interface Plot2D
Overrides:
setGridData in class ComplexInterpolatedPlot
Parameters:
griddata -

setIndexes

public void setIndexes(int[] indexes)
Sets the indexes for the data component that will be plotted.

Specified by:
setIndexes in interface Plot2D
Overrides:
setIndexes in class ComplexInterpolatedPlot
Parameters:
indexes - the sample-component

setVisible

public void setVisible(boolean isVisible)
Sets the visibility of the contour plot. Drawing will be disabled if visible is false.

Specified by:
setVisible in interface Plot2D
Overrides:
setVisible in class MeasuredImage
Parameters:
isVisible -

showLegend

public javax.swing.JFrame showLegend()
Shows how values map to colors.

Specified by:
showLegend in interface Plot2D
Overrides:
showLegend in class ComplexInterpolatedPlot

setShowGridLines

public void setShowGridLines(boolean show)
Shows the contour lines.

Specified by:
setShowGridLines in interface Plot2D
Overrides:
setShowGridLines in class ComplexInterpolatedPlot
Parameters:
show -

setColorPalette

public void setColorPalette(java.awt.Color[] colors)
Setting the color palette is not supported. The complex palette always maps phase to color.

Specified by:
setColorPalette in interface Plot2D
Overrides:
setColorPalette in class ComplexInterpolatedPlot
Parameters:
colors -

setPaletteType

public void setPaletteType(int type)
Setting the palette is not supported. The complex palette always maps phase to color.

Specified by:
setPaletteType in interface Plot2D
Overrides:
setPaletteType in class ComplexInterpolatedPlot
Parameters:
type -

setFloorCeilColor

public void setFloorCeilColor(java.awt.Color floorColor,
                              java.awt.Color ceilColor)
Sets the floor and ceiling colors.

Specified by:
setFloorCeilColor in interface Plot2D
Overrides:
setFloorCeilColor in class ComplexInterpolatedPlot
Parameters:
floorColor -
ceilColor -

setGridLineColor

public void setGridLineColor(java.awt.Color color)
Sets the contour line color. The default line color is dark green.

Specified by:
setGridLineColor in interface Plot2D
Overrides:
setGridLineColor in class ComplexInterpolatedPlot
Parameters:
color -

draw

public void draw(DrawingPanel panel,
                 java.awt.Graphics g)
Draws the image and the grid.

Specified by:
draw in interface Drawable
Overrides:
draw in class ComplexInterpolatedPlot
Parameters:
panel -
g -