|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ij.gui.Plot
public class Plot
This class is an image that line graphs can be drawn on.
Field Summary | |
---|---|
static int |
BOX
Display points using an box-shaped mark. |
static int |
CIRCLE
Display points using a circle 5 pixels in diameter. |
static int |
CROSS
Display points using an cross-shaped mark. |
static int |
DOT
Display points using a single pixel. |
static int |
LINE
Connect points with solid lines. |
static int |
TRIANGLE
Display points using an tiangular mark. |
static int |
X
Display points using an X-shaped mark. |
Constructor Summary | |
---|---|
Plot(java.lang.String title,
java.lang.String xLabel,
java.lang.String yLabel,
double[] xValues,
double[] yValues)
This version of the constructor excepts double arrays. |
|
Plot(java.lang.String title,
java.lang.String xLabel,
java.lang.String yLabel,
float[] xValues,
float[] yValues)
Construct a new PlotWindow. |
Method Summary | |
---|---|
void |
addErrorBars(double[] errorBars)
Adds error bars to the plot. |
void |
addErrorBars(float[] errorBars)
Adds error bars to the plot. |
void |
addLabel(double x,
double y,
java.lang.String label)
Draws text at the specified location, where (0,0) is the upper left corner of the the plot frame and (1,1) is the lower right corner. |
void |
addPoints(double[] x,
double[] y,
int shape)
Adds a set of points to the plot using double arrays. |
void |
addPoints(float[] x,
float[] y,
int shape)
Adds a set of points to the plot or adds a curve if shape is set to LINE. |
void |
changeFont(java.awt.Font font)
Changes the font. |
void |
draw()
Draws the plot specified in the constructor. |
ImagePlus |
getImagePlus()
Returns the plot as an ImagePlus. |
ImageProcessor |
getProcessor()
Returns the plot as an ImageProcessor. |
void |
setColor(java.awt.Color c)
Changes the drawing color. |
void |
setJustification(int justification)
Sets the justification used by addLabel(), where justification
is ImageProcessor.LEFT, ImageProcessor.CENTER or ImageProcessor.RIGHT. |
void |
setLimits(double xMin,
double xMax,
double yMin,
double yMax)
Sets the x-axis and y-axis range. |
void |
setLineWidth(int lineWidth)
Changes the line width. |
PlotWindow |
show()
Displays the plot in a PlotWindow and returns a reference to the PlotWindow. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CIRCLE
public static final int X
public static final int BOX
public static final int TRIANGLE
public static final int CROSS
public static final int DOT
public static final int LINE
Constructor Detail |
---|
public Plot(java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, float[] xValues, float[] yValues)
title
- the window titlexLabel
- the x-axis labelyLabel
- the y-axis labelxValues
- the x-coodinates, or nullyValues
- the y-coodinates, or nullpublic Plot(java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, double[] xValues, double[] yValues)
Method Detail |
---|
public void setLimits(double xMin, double xMax, double yMin, double yMax)
public void addPoints(float[] x, float[] y, int shape)
x
- the x-coodinatesy
- the y-coodinatesshape
- CIRCLE, X, BOX, TRIANGLE, CROSS, DOT or LINEpublic void addPoints(double[] x, double[] y, int shape)
public void addErrorBars(float[] errorBars)
public void addErrorBars(double[] errorBars)
public void addLabel(double x, double y, java.lang.String label)
public void setJustification(int justification)
justification
is ImageProcessor.LEFT, ImageProcessor.CENTER or ImageProcessor.RIGHT.
public void setColor(java.awt.Color c)
public void setLineWidth(int lineWidth)
public void changeFont(java.awt.Font font)
public void draw()
public ImageProcessor getProcessor()
public ImagePlus getImagePlus()
public PlotWindow show()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |