|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.
| 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 |
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 |
| Method Detail |
public void setAll(java.lang.Object val)
val - an array of new values
public void setAll(java.lang.Object obj,
double xmin,
double xmax,
double ymin,
double ymax)
obj - array of new valuesxmin - doublexmax - doubleymin - doubleymax - doublepublic void setGridData(GridData _griddata)
_griddata - public GridData getGridData()
public double indexToX(int i)
i - int
public double indexToY(int i)
i - int
public int xToIndex(double x)
x - double the coordinate
public int yToIndex(double y)
y - double the coordinate
public boolean isAutoscaleZ()
public double getFloor()
public double getCeiling()
public void setAutoscaleZ(boolean isAutoscale,
double floor,
double ceil)
isAutoscale - floor - ceil -
public void setFloorCeilColor(java.awt.Color floorColor,
java.awt.Color ceilColor)
floorColor - ceilColor - public void setColorPalette(java.awt.Color[] colors)
colors - public void setPaletteType(int type)
type - public void setGridLineColor(java.awt.Color c)
c - public void setShowGridLines(boolean showGrid)
showGrid - public javax.swing.JFrame showLegend()
public void setVisible(boolean isVisible)
isVisible - public void setIndexes(int[] indexes)
indexes - the sample-component indexespublic void update()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||