jass.utils
Class Plot

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by jass.utils.Plot
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
Direct Known Subclasses:
PlotGraph

public class Plot
extends java.awt.Canvas

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  int[] axisTicks
           
protected  double[][] copy
           
protected  int[] dashLength
           
protected  double[][] data
           
protected static double dataFill
           
protected  boolean[] errorBar
           
protected  double[][] errors
           
protected  double[][] errorsCopy
           
protected  int fontSize
           
protected  java.lang.String graphTitle
           
protected  java.lang.String graphTitle2
           
protected  int[] lineOpt
           
protected  boolean[] minMaxOpt
           
protected  int nCurves
           
protected  int niPoints
           
protected  int nmPoints
           
protected  boolean noXoffset
           
protected  boolean noXunits
           
protected  boolean noYoffset
           
protected  boolean noYunits
           
protected  int[] nPoints
           
protected  int npTypes
           
protected  int[] pointOpt
           
protected  int[] pointSize
           
protected  boolean[] trimOpt
           
protected  java.lang.String[] xAxisChar
           
protected  java.lang.String xAxisLegend
           
protected  double[] xAxisNo
           
protected  java.lang.String xAxisUnits
           
protected  int xBot
           
protected  int xFac
           
protected  double xHigh
           
protected  int xLen
           
protected  double xLow
           
protected  double xLowFac
           
protected  double xMax
           
protected  double xMin
           
protected  double xOffset
           
protected  int xTicks
           
protected  int xTop
           
protected  boolean xZero
           
protected  java.lang.String[] yAxisChar
           
protected  java.lang.String yAxisLegend
           
protected  double[] yAxisNo
           
protected  java.lang.String yAxisUnits
           
protected  int yBot
           
protected  int yFac
           
protected  double yHigh
           
protected  int yLen
           
protected  double yLow
           
protected  double yLowFac
           
protected  double yMax
           
protected  double yMin
           
protected  double yOffset
           
protected  int yTicks
           
protected  int yTop
           
protected  boolean yZero
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Plot(double[][] data)
           
Plot(double[] xdata, double[] ydata)
           
 
Method Summary
 void axesScaleOffset()
           
static double[][] data(int n, int m)
           
 int[] getDashlength()
           
static double getDataFillValue()
           
 int getFontSize()
           
 int[] getLine()
           
 int getNiPoints()
           
 boolean getNoXoffset()
           
 boolean getNoYoffset()
           
 int[] getPoint()
           
 int[] getPointsize()
           
 int getXaxisLen()
           
 int getXlow()
           
 double getXlowFac()
           
 double getXmax()
           
 double getXmin()
           
 int getYaxisLen()
           
 int getYhigh()
           
 double getYlowFac()
           
 double getYmax()
           
 double getYmin()
           
 void graph(java.awt.Graphics g)
           
 void initialise(double[][] cdata)
           
static void limits(double low, double high, double lowfac, double[] limits)
           
 void minMax()
           
static double offset(double low, double high)
           
protected static java.lang.String offsetString(double offset)
           
 boolean printCheck(boolean trim, int xoldpoint, int xnewpoint, int yoldpoint, int ynewpoint)
           
static int scale(double mmin, double mmax)
           
static double[][] selectionSort(double[][] aa)
           
 void setDashLength(int sdashLength)
           
 void setDashLength(int[] dashLength)
           
static void setDataFillValue(double dataFill)
           
 void setErrorBars(int nc, double[] err)
           
 void setFontSize(int fontSize)
           
 void setGraphTitle(java.lang.String graphTitle)
           
 void setGraphTitle2(java.lang.String graphTitle2)
           
 void setLine(int slineOpt)
           
 void setLine(int[] lineOpt)
           
 void setMinMaxOpt(boolean[] minmax)
           
 void setNiPoints(int niPoints)
           
 void setNoOffset(boolean nooffset)
           
 void setNoXoffset(boolean noXoffset)
           
 void setNoYoffset(boolean noYoffset)
           
 void setPoint(int spointOpt)
           
 void setPoint(int[] pointOpt)
           
 void setPointSize(int spointSize)
           
 void setPointSize(int[] mpointSize)
           
 void setTrimOpt(boolean[] trim)
           
 void setXaxisLegend(java.lang.String xAxisLegend)
           
 void setXaxisLen(int xLen)
           
 void setXaxisUnitsName(java.lang.String xAxisUnits)
           
 void setXlow(int xBot)
           
 void setXlowFac(double xLowFac)
           
 void setYaxisLegend(java.lang.String yAxisLegend)
           
 void setYaxisLen(int yLen)
           
 void setYaxisUnitsName(java.lang.String yAxisUnits)
           
 void setYhigh(int yTop)
           
 void setYlowFac(double yLowFac)
           
static int ticks(double low, double high, double[] tickval, java.lang.String[] tickchar)
           
protected  void update()
           
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, paint, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

protected double[][] data

copy

protected double[][] copy

nCurves

protected int nCurves

nPoints

protected int[] nPoints

nmPoints

protected int nmPoints

niPoints

protected int niPoints

pointOpt

protected int[] pointOpt

pointSize

protected int[] pointSize

npTypes

protected int npTypes

errorBar

protected boolean[] errorBar

errors

protected double[][] errors

errorsCopy

protected double[][] errorsCopy

lineOpt

protected int[] lineOpt

dashLength

protected int[] dashLength

minMaxOpt

protected boolean[] minMaxOpt

trimOpt

protected boolean[] trimOpt

fontSize

protected int fontSize

xLen

protected int xLen

yLen

protected int yLen

xBot

protected int xBot

xTop

protected int xTop

yTop

protected int yTop

yBot

protected int yBot

xLow

protected double xLow

xHigh

protected double xHigh

yLow

protected double yLow

yHigh

protected double yHigh

xFac

protected int xFac

yFac

protected int yFac

xTicks

protected int xTicks

yTicks

protected int yTicks

xMin

protected double xMin

xMax

protected double xMax

yMin

protected double yMin

yMax

protected double yMax

xOffset

protected double xOffset

yOffset

protected double yOffset

noXoffset

protected boolean noXoffset

noYoffset

protected boolean noYoffset

xLowFac

protected double xLowFac

yLowFac

protected double yLowFac

graphTitle

protected java.lang.String graphTitle

graphTitle2

protected java.lang.String graphTitle2

xAxisLegend

protected java.lang.String xAxisLegend

xAxisUnits

protected java.lang.String xAxisUnits

yAxisLegend

protected java.lang.String yAxisLegend

yAxisUnits

protected java.lang.String yAxisUnits

xZero

protected boolean xZero

yZero

protected boolean yZero

noXunits

protected boolean noXunits

noYunits

protected boolean noYunits

xAxisNo

protected double[] xAxisNo

yAxisNo

protected double[] yAxisNo

xAxisChar

protected java.lang.String[] xAxisChar

yAxisChar

protected java.lang.String[] yAxisChar

axisTicks

protected int[] axisTicks

dataFill

protected static double dataFill
Constructor Detail

Plot

public Plot(double[][] data)

Plot

public Plot(double[] xdata,
            double[] ydata)
Method Detail

initialise

public void initialise(double[][] cdata)

selectionSort

public static double[][] selectionSort(double[][] aa)

data

public static double[][] data(int n,
                              int m)

setDataFillValue

public static void setDataFillValue(double dataFill)

getDataFillValue

public static double getDataFillValue()

setGraphTitle

public void setGraphTitle(java.lang.String graphTitle)

setGraphTitle2

public void setGraphTitle2(java.lang.String graphTitle2)

setXaxisLegend

public void setXaxisLegend(java.lang.String xAxisLegend)

setYaxisLegend

public void setYaxisLegend(java.lang.String yAxisLegend)

setXaxisUnitsName

public void setXaxisUnitsName(java.lang.String xAxisUnits)

setYaxisUnitsName

public void setYaxisUnitsName(java.lang.String yAxisUnits)

getXaxisLen

public int getXaxisLen()

getYaxisLen

public int getYaxisLen()

getXlow

public int getXlow()

getYhigh

public int getYhigh()

getPointsize

public int[] getPointsize()

getDashlength

public int[] getDashlength()

getXlowFac

public double getXlowFac()

getYlowFac

public double getYlowFac()

getXmin

public double getXmin()

getXmax

public double getXmax()

getYmin

public double getYmin()

getYmax

public double getYmax()

getLine

public int[] getLine()

getPoint

public int[] getPoint()

getNiPoints

public int getNiPoints()

getFontSize

public int getFontSize()

setXaxisLen

public void setXaxisLen(int xLen)

setYaxisLen

public void setYaxisLen(int yLen)

setXlow

public void setXlow(int xBot)

setYhigh

public void setYhigh(int yTop)

setXlowFac

public void setXlowFac(double xLowFac)

setYlowFac

public void setYlowFac(double yLowFac)

setNoXoffset

public void setNoXoffset(boolean noXoffset)

setNoYoffset

public void setNoYoffset(boolean noYoffset)

setNoOffset

public void setNoOffset(boolean nooffset)

getNoXoffset

public boolean getNoXoffset()

getNoYoffset

public boolean getNoYoffset()

update

protected void update()

setLine

public void setLine(int[] lineOpt)

setLine

public void setLine(int slineOpt)

setDashLength

public void setDashLength(int[] dashLength)

setDashLength

public void setDashLength(int sdashLength)

setPoint

public void setPoint(int[] pointOpt)

setPoint

public void setPoint(int spointOpt)

setPointSize

public void setPointSize(int[] mpointSize)

setPointSize

public void setPointSize(int spointSize)

setErrorBars

public void setErrorBars(int nc,
                         double[] err)

setNiPoints

public void setNiPoints(int niPoints)

setFontSize

public void setFontSize(int fontSize)

setTrimOpt

public void setTrimOpt(boolean[] trim)

setMinMaxOpt

public void setMinMaxOpt(boolean[] minmax)

scale

public static int scale(double mmin,
                        double mmax)

limits

public static void limits(double low,
                          double high,
                          double lowfac,
                          double[] limits)

offset

public static double offset(double low,
                            double high)

axesScaleOffset

public void axesScaleOffset()

ticks

public static int ticks(double low,
                        double high,
                        double[] tickval,
                        java.lang.String[] tickchar)

minMax

public void minMax()

offsetString

protected static java.lang.String offsetString(double offset)

printCheck

public boolean printCheck(boolean trim,
                          int xoldpoint,
                          int xnewpoint,
                          int yoldpoint,
                          int ynewpoint)

graph

public void graph(java.awt.Graphics g)