gui
Class Plot

java.lang.Object
  extended bygui.Plot

public class Plot
extends java.lang.Object

Class Plot: Visual representation of a plot for an Absurdist variable.


Field Summary
(package private)  int DX
          Number of pixels each step (on x-axis) or value unit (on y-axis) occupies
(package private)  double DY
           
(package private)  int height
           
(package private)  int nStep
           
(package private) static int OX
           
(package private) static int OY1
           
(package private) static int OY2
           
(package private)  int SX
          Number of pixels each of x/y axis scale occupies
(package private)  double[][][] var
           
(package private)  int width
           
(package private)  int x
           
(package private)  int y
           
 
Constructor Summary
Plot(double[][][] var, int nStep, int x, int y, int width, int height)
          Creates a plot from a variable array.
 
Method Summary
(package private)  int[] getRange()
          Returns a pair numbers that encloses the entire range of var[][][]
 void paint(java.awt.Graphics2D g)
          Paints the object.
 void setSteps(int nStep)
          Sets the number of steps.
 void setVar(double[][][] var)
          Sets the variable array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OX

static final int OX
See Also:
Constant Field Values

OY1

static final int OY1
See Also:
Constant Field Values

OY2

static final int OY2
See Also:
Constant Field Values

DX

final int DX
Number of pixels each step (on x-axis) or value unit (on y-axis) occupies

See Also:
Constant Field Values

DY

double DY

SX

final int SX
Number of pixels each of x/y axis scale occupies

See Also:
Constant Field Values

var

double[][][] var

nStep

int nStep

x

int x

y

int y

width

int width

height

int height
Constructor Detail

Plot

public Plot(double[][][] var,
            int nStep,
            int x,
            int y,
            int width,
            int height)
Creates a plot from a variable array.

Method Detail

setVar

public void setVar(double[][][] var)
Sets the variable array.


setSteps

public void setSteps(int nStep)
Sets the number of steps.


getRange

int[] getRange()
Returns a pair numbers that encloses the entire range of var[][][]


paint

public void paint(java.awt.Graphics2D g)
Paints the object. The formula for mapping v to y:
        y = oy - DY * (v - minVar);
        
where
        DY = H/(maxVar-minVar);
        H=(height - OY)