SciLib.Grp
Class Plot

java.lang.Object
  extended by SciLib.Grp.Plot

public final class Plot
extends java.lang.Object

This class contains some methods to draw a 2D graphics.


Constructor Summary
Plot()
           
 
Method Summary
static void comb(Graphics2D g2D, vector x, vector y, java.lang.String title)
          default comb method
static void comb(vector yv, java.lang.String title)
          default comb method
static void comb(vector x, vector y, java.lang.String title)
          default comb method
static void plot(bitStream bits)
          Plot the graphical representation of a bitStream.
static void plot(bitStream bits, int pulseSize)
          Plot the graphical representation of a bitStream.
static void plot(Function func)
          Plot a function.
static void plot(Graphics2D g2D, Function func)
          Plot a function.
static void plot(Graphics2D g2D, vector x, vector y, java.awt.Color c, java.lang.String title)
          default plot method
static void plot(Graphics2D g2D, vector x, vector y, java.lang.String specific, java.awt.Color c, java.lang.String title)
          Plot the curve that represents the data points stored in vectors with a specific
static void plot(Graphics2D g2D, vector xv, vector yv1, vector yv2, java.awt.Color c1, java.awt.Color c2)
          Plot two curves in the same window.
static void plot(Graphics2D g2D, vector xv, vector yv1, vector yv2, vector yv3, java.awt.Color c1, java.awt.Color c2, java.awt.Color c3)
          Plot three curves in the same window.
static void plot(int[] bits, int xunit, java.lang.String title)
          Plot an array of voltage levels
static void plot(int[] bits, java.lang.String title)
          Plot the graphical representation of a signal array.
static void plot(vector yv)
          plot method with blue color
static void plot(vector yv, java.lang.String specific)
          plot method with blue color
static void plot(vector yv, java.lang.String specific, java.lang.String title)
          plot method with blue color
static void plot(vector xv, vector yv)
          default plot method with blue color
static void plot(vector xv, vector yv, java.awt.Color c)
          default plot method
static void plot(vector x, vector y, java.awt.Color c, java.lang.String title)
          default plot method used default Graphics2D
static void plot(vector xv, vector yv, java.lang.String title)
          default plot method with blue color
static void plot(vector x, vector y, java.lang.String specific, java.awt.Color c, java.lang.String title)
          Plot the curve that represents the data points stored in vectors with a specific
static void plot(vector xv, vector yv, java.lang.String specific, java.lang.String title)
          Plot the curve that represents the data points stored in vectors with a specific
static void plot(vector xv, vector yv1, vector yv2)
          Plot two curves in the same window.
static void plot(vector xv, vector yv1, vector yv2, java.awt.Color c1, java.awt.Color c2)
          Plot two curves in the same window.
static void plot(vector xv, vector yv1, vector yv2, vector yv3)
          Plot three curves in the same window.
static void plot(vector xv, vector yv1, vector yv2, vector yv3, java.awt.Color c1, java.awt.Color c2, java.awt.Color c3)
          Plot three curves in the same window.
static void scatterPlot(Graphics2D g2D, vector x, vector y, java.awt.Color c, java.lang.String title, char symbol)
          scatter plot method
static void scatterPlot(Graphics2D g2D, vector xv1, vector yv1, vector xv2, vector yv2, java.awt.Color c1, java.awt.Color c2, char sym1, char sym2)
          scatter Plot two curves in the same window.
static void scatterPlot(vector y, java.lang.String title, char symbol)
          scatter plot method
static void scatterPlot(vector x, vector y, java.lang.String title, char symbol)
          scatter plot method
static void scatterPlot(vector xv1, vector yv1, vector xv2, vector yv2, char sym1, char sym2)
          scatter Plot two curves in the same window.
static void scatterPlot(vector xv1, vector yv1, vector xv2, vector yv2, java.awt.Color c1, java.awt.Color c2, char sym1, char sym2)
          scatter Plot two curves in the same window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plot

public Plot()
Method Detail

plot

public static void plot(vector xv,
                        vector yv,
                        java.awt.Color c)
default plot method

Parameters:
xv - A vector that contains x-coordinates
yv - A vector that contains y-coordinates
c - Color

plot

public static void plot(vector x,
                        vector y,
                        java.awt.Color c,
                        java.lang.String title)
default plot method used default Graphics2D

Parameters:
x - A vector that contains x-coordinates
y - A vector that contains y-coordinates
c - Color
title - A String

plot

public static void plot(vector xv,
                        vector yv)
default plot method with blue color

Parameters:
xv - A vector that contains x-coordinates
yv - A vector that contains y-coordinates

plot

public static void plot(vector xv,
                        vector yv,
                        java.lang.String title)
default plot method with blue color

Parameters:
xv - A vector that contains x-coordinates
yv - A vector that contains y-coordinates

plot

public static void plot(vector x,
                        vector y,
                        java.lang.String specific,
                        java.awt.Color c,
                        java.lang.String title)
Plot the curve that represents the data points stored in vectors with a specific

Parameters:
x - A vector that contains x-coordinates
y - A vector that contains y-coordinates
specific - A String that can have the following - grid = grid lines - coord = write out coordinates without grid lines - "" = do not write out coordinates
c - Color
title - The title of the graph, a String

plot

public static void plot(vector xv,
                        vector yv,
                        java.lang.String specific,
                        java.lang.String title)
Plot the curve that represents the data points stored in vectors with a specific

Parameters:
xv - A vector that contains x-coordinates
yv - A vector that contains y-coordinates
specific - A String that can have the following - grid = grid lines - coord = write out coordinates without grid lines - "" = do not write out coordinates
title - The title of the graph, a String

plot

public static void plot(vector yv)
plot method with blue color

Parameters:
yv - A vector that contains y-coordinates

plot

public static void plot(vector yv,
                        java.lang.String specific)
plot method with blue color

Parameters:
yv - A vector that contains y-coordinates
specific - A String that can have the following - grid = grid lines - coord = write out coordinates without grid lines - "" = do not write out coordinates

plot

public static void plot(vector yv,
                        java.lang.String specific,
                        java.lang.String title)
plot method with blue color

Parameters:
yv - A vector that contains y-coordinates
specific - A String that can have the following - grid = grid lines - coord = write out coordinates without grid lines - "" = do not write out coordinates
title - A String

comb

public static void comb(vector x,
                        vector y,
                        java.lang.String title)
default comb method

Parameters:
x - A vector that contains x-coordinates
y - A vector that contains y-coordinates
title - A String

comb

public static void comb(vector yv,
                        java.lang.String title)
default comb method

Parameters:
yv - A vector that contains y-coordinates
title - A String

plot

public static void plot(vector xv,
                        vector yv1,
                        vector yv2,
                        java.awt.Color c1,
                        java.awt.Color c2)
Plot two curves in the same window.

Parameters:
xv - A vector that contains x-coordinates
yv1 - A vector that contains y-coordinates of the first curve
yv2 - A vector that contains y-coordinates of the second curve
c1 - Color of the first curves
c2 - Color of the second curve

plot

public static void plot(vector xv,
                        vector yv1,
                        vector yv2)
Plot two curves in the same window.

Parameters:
xv - A vector that contains x-coordinates
yv1 - A vector that contains y-coordinates of the first curve
yv2 - A vector that contains y-coordinates of the second curve

plot

public static void plot(vector xv,
                        vector yv1,
                        vector yv2,
                        vector yv3,
                        java.awt.Color c1,
                        java.awt.Color c2,
                        java.awt.Color c3)
Plot three curves in the same window.

Parameters:
xv - A vector that contains x-coordinates
yv1 - A vector that contains y-coordinates of the first curve
yv2 - A vector that contains y-coordinates of the second curve
yv3 - A vector that contains y-coordinates of the third curve
c1 - Color of the first curves
c2 - Color of the second curve
c3 - Color of the third curve

plot

public static void plot(vector xv,
                        vector yv1,
                        vector yv2,
                        vector yv3)
Plot three curves in the same window.

Parameters:
xv - A vector that contains x-coordinates
yv1 - A vector that contains y-coordinates of the first curve
yv2 - A vector that contains y-coordinates of the second curve
yv3 - A vector that contains y-coordinates of the third curve

plot

public static void plot(Function func)
Plot a function.

Parameters:
func - An object that implements the Function interface

plot

public static void plot(Graphics2D g2D,
                        vector x,
                        vector y,
                        java.awt.Color c,
                        java.lang.String title)
default plot method

Parameters:
g2D - A Graphics2D object
x - A vector that contains x-coordinates
y - A vector that contains y-coordinates
c - Color
title - A String

plot

public static void plot(Graphics2D g2D,
                        vector x,
                        vector y,
                        java.lang.String specific,
                        java.awt.Color c,
                        java.lang.String title)
Plot the curve that represents the data points stored in vectors with a specific

Parameters:
g2D - A Graphics2D object
x - A vector that contains x-coordinates
y - A vector that contains y-coordinates
specific - A String that can have the following - grid = grid lines - coord = write out coordinates without grid lines - "" = do not write out coordinates
c - Color

comb

public static void comb(Graphics2D g2D,
                        vector x,
                        vector y,
                        java.lang.String title)
default comb method

Parameters:
g2D - A Graphics2D object
x - A vector that contains x-coordinates
y - A vector that contains y-coordinates
title - A String

plot

public static void plot(Graphics2D g2D,
                        vector xv,
                        vector yv1,
                        vector yv2,
                        java.awt.Color c1,
                        java.awt.Color c2)
Plot two curves in the same window.

Parameters:
g2D - A Graphics2D object
xv - A vector that contains x-coordinates
yv1 - A vector that contains y-coordinates of the first curve
yv2 - A vector that contains y-coordinates of the second curve
c1 - Color of the first curves
c2 - Color of the second curve

plot

public static void plot(Graphics2D g2D,
                        vector xv,
                        vector yv1,
                        vector yv2,
                        vector yv3,
                        java.awt.Color c1,
                        java.awt.Color c2,
                        java.awt.Color c3)
Plot three curves in the same window.

Parameters:
g2D - A Graphics2D object
xv - A vector that contains x-coordinates
yv1 - A vector that contains y-coordinates of the first curve
yv2 - A vector that contains y-coordinates of the second curve
yv3 - A vector that contains y-coordinates of the third curve
c1 - Color of the first curves
c2 - Color of the second curve
c3 - Color of the third curve

plot

public static void plot(Graphics2D g2D,
                        Function func)
Plot a function.

Parameters:
g2D - A Graphics2D object
func - An object that implements the Function interface

plot

public static void plot(bitStream bits,
                        int pulseSize)
Plot the graphical representation of a bitStream.

Parameters:
bits - A bitStream
pulseSize - An integer, the length of a pulse

plot

public static void plot(bitStream bits)
Plot the graphical representation of a bitStream.

Parameters:
bits - A bitStream

plot

public static void plot(int[] bits,
                        java.lang.String title)
Plot the graphical representation of a signal array.

Parameters:
bits - A pulse array

plot

public static void plot(int[] bits,
                        int xunit,
                        java.lang.String title)
Plot an array of voltage levels

Parameters:
bits - An integr array of voltage levels, +1, 0, or -1
xunit - The length of each pulse
title - a String

scatterPlot

public static void scatterPlot(Graphics2D g2D,
                               vector x,
                               vector y,
                               java.awt.Color c,
                               java.lang.String title,
                               char symbol)
scatter plot method

Parameters:
g2D - A Graphics2D object
x - A vector that contains x-coordinates
y - A vector that contains y-coordinates
c - Color
title - A String
symbol - A character

scatterPlot

public static void scatterPlot(vector x,
                               vector y,
                               java.lang.String title,
                               char symbol)
scatter plot method

Parameters:
x - A vector that contains x-coordinates
y - A vector that contains y-coordinates
title - A String
symbol - A character

scatterPlot

public static void scatterPlot(vector y,
                               java.lang.String title,
                               char symbol)
scatter plot method

Parameters:
y - A vector that contains y-coordinates
title - A String
symbol - A character

scatterPlot

public static void scatterPlot(Graphics2D g2D,
                               vector xv1,
                               vector yv1,
                               vector xv2,
                               vector yv2,
                               java.awt.Color c1,
                               java.awt.Color c2,
                               char sym1,
                               char sym2)
scatter Plot two curves in the same window.

Parameters:
g2D - A Graphics2D object
xv1 - A vector that contains x-coordinates
yv1 - A vector that contains y-coordinates of the first curve
yv2 - A vector that contains y-coordinates of the second curve
c1 - Color of the first curves
c2 - Color of the second curve
sym1 - Plot symbol for the curve 1, A character
sym2 - Plot symbol for the curve 2, A character

scatterPlot

public static void scatterPlot(vector xv1,
                               vector yv1,
                               vector xv2,
                               vector yv2,
                               java.awt.Color c1,
                               java.awt.Color c2,
                               char sym1,
                               char sym2)
scatter Plot two curves in the same window.

Parameters:
xv1 - A vector that contains x-coordinates
yv1 - A vector that contains y-coordinates of the first curve
yv2 - A vector that contains y-coordinates of the second curve
c1 - Color of the first curves
c2 - Color of the second curve
sym1 - Plot symbol for the curve 1, A character
sym2 - Plot symbol for the curve 2, A character

scatterPlot

public static void scatterPlot(vector xv1,
                               vector yv1,
                               vector xv2,
                               vector yv2,
                               char sym1,
                               char sym2)
scatter Plot two curves in the same window.

Parameters:
xv1 - A vector that contains x-coordinates
yv1 - A vector that contains y-coordinates of the first curve
xv2 - A vector that contains x-coordinates of the second curve
yv2 - A vector that contains y-coordinates of the second curve
sym1 - Plot symbol for the curve 1, A character
sym2 - Plot symbol for the curve 2, A character