Class cam.visuals.plots.PlotFrame
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----cam.visuals.plots.PlotFrame
- public class PlotFrame
- extends Frame
A frame which plots x and y data and has controls for viewing
the plot. The plotting functionality is provided by an internal
instance of the Plot class. In addition to the output control provided
by the user interface, one can set plot formatting by invoking methods
of the internal Plot instance. For example if PF is a PlotFrame instance, then
the code
Plot P = PF.getPlot();
P.setXlabelFormat(Plot.FIXED);
P.setXlabelPrecision(3);
P.setYlabelFormat(Plot.SCIENTIFIC);
P.setYlabelPrecision(2);
sets the X label format to fixed output and 3 decimal digits and the Y label format
to scientific format with 2 decimal digits.
- Version:
- Oct. 18, 1998
- Author:
- Mark Hoefer, Chris Anderson
-
currentXMax
-
-
currentXMin
-
-
currentYMax
-
-
currentYMin
-
-
legend
-
-
plotCanvas
-
-
PlotCharAction
-
-
xmax
-
-
xmin
-
-
ymax
-
-
ymin
-
-
PlotFrame()
-
-
PlotFrame(String)
-
-
addNotify()
-
-
addPlot(double[], double[], String)
- Plots the input data in the current plot and associates a name with the plot.
-
addPlot(Vector, Vector, String)
- Plots the input data in the current plot and associates a name with the plot.
-
clearPlots()
- Remotes all plots
-
getPlot()
- Returns the contained Plot instance.
-
setAxisLabels(String, String, Font, Color)
- Sets the axis labels (or titles).
-
setPlotTitle(String, Font, Color)
- Sets the title of the plot
-
setXbounds(double, double)
- Sets the x axis limits for the plot.
-
setXYBounds(double, double, double, double)
- Sets the x and y axis limits for the plot.
-
show()
-
-
zoom(double, double)
-
plotCanvas
protected Plot plotCanvas
currentXMin
protected double currentXMin
currentYMin
protected double currentYMin
currentXMax
protected double currentXMax
currentYMax
protected double currentYMax
xmin
protected double xmin
ymin
protected double ymin
xmax
protected double xmax
ymax
protected double ymax
legend
protected LegendDialog legend
PlotCharAction
protected PlotFrame. PlotPropertiesAction PlotCharAction
PlotFrame
public PlotFrame()
PlotFrame
public PlotFrame(String title)
show
public void show()
- Overrides:
- show in class Window
addNotify
public void addNotify()
- Overrides:
- addNotify in class Frame
setPlotTitle
public void setPlotTitle(String title,
Font f,
Color c)
- Sets the title of the plot
setAxisLabels
public void setAxisLabels(String xLabel,
String yLabel,
Font f,
Color c)
- Sets the axis labels (or titles).
setXYBounds
public void setXYBounds(double xmin,
double xmax,
double ymin,
double ymax)
- Sets the x and y axis limits for the plot.
setXbounds
public void setXbounds(double xmin,
double xmax)
- Sets the x axis limits for the plot.
addPlot
public void addPlot(double xdata[],
double ydata[],
String plotName)
- Plots the input data in the current plot and associates a name with the plot.
- Parameters:
- xdata - double array containing the x-coordinates for the plot
- ydata - double array containing the y-coordinates for the plot
- plotName - string name of the plot
addPlot
public void addPlot(Vector xdata,
Vector ydata,
String plotName)
- Plots the input data in the current plot and associates a name with the plot.
- Parameters:
- xdata - Vector of Doubles containing the x-coordinates for the plot
- ydata - Vector of Doubles containing the y-coordinates for the plot
- plotName - string name of the plot
clearPlots
public void clearPlots()
- Remotes all plots
getPlot
public Plot getPlot()
- Returns the contained Plot instance.
zoom
protected void zoom(double xPercent,
double yPercent)