|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Plot2D
The Plot2D interface defines common methods for 2d-plotting such as a GridPlot, a VectorPlot, or a ContourPlot. Data must be stored in a GridData object.
Field Summary | |
---|---|
static int |
CONTOUR_PLOT
|
static int |
GRID_PLOT
|
static int |
INTERPOLATED_PLOT
|
static int |
SURFACE_PLOT
|
Method Summary | |
---|---|
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. |
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. |
void |
setAll(java.lang.Object val)
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)
Sets the colors that will be used between the floor and ceiling values. |
void |
setExpandedZ(boolean expanded,
double expansionFactor)
Expands the z 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)
Determines the palette type that will be used. |
void |
setShowGridLines(boolean showGrid)
Outlines the data grid's boundaries. |
void |
setVisible(boolean isVisible)
Sets the visibility of the plot. |
javax.swing.JFrame |
showLegend()
Shows how values map to colors. |
void |
update()
Updates this object's state using new data values. |
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. |
Methods inherited from interface org.opensourcephysics.display.Measurable |
---|
getXMax, getXMin, getYMax, getYMin, isMeasured |
Methods inherited from interface org.opensourcephysics.display.Drawable |
---|
draw |
Field Detail |
---|
static final int GRID_PLOT
static final int INTERPOLATED_PLOT
static final int CONTOUR_PLOT
static final int SURFACE_PLOT
Method Detail |
---|
void setAll(java.lang.Object val)
val
- an array of new valuesvoid setAll(java.lang.Object obj, double xmin, double xmax, double ymin, double ymax)
obj
- array of new valuesxmin
- doublexmax
- doubleymin
- doubleymax
- doublevoid setGridData(GridData _griddata)
_griddata
- GridData getGridData()
double indexToX(int i)
i
- int
double indexToY(int i)
i
- int
int xToIndex(double x)
x
- double the coordinate
int yToIndex(double y)
y
- double the coordinate
boolean isAutoscaleZ()
double getFloor()
double getCeiling()
void setAutoscaleZ(boolean isAutoscale, double floor, double ceil)
isAutoscale
- floor
- ceil
- void setFloorCeilColor(java.awt.Color floorColor, java.awt.Color ceilColor)
floorColor
- ceilColor
- void setColorPalette(java.awt.Color[] colors)
colors
- void setPaletteType(int type)
type
- void setGridLineColor(java.awt.Color c)
c
- void setShowGridLines(boolean showGrid)
showGrid
- javax.swing.JFrame showLegend()
void setVisible(boolean isVisible)
isVisible
- void setIndexes(int[] indexes)
indexes
- the sample-component indexesvoid update()
void setExpandedZ(boolean expanded, double expansionFactor)
expanded
- booleanexpansionFactor
- double
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |