org.jscience.engineering.control.gui
Class Plot

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by org.jscience.engineering.control.gui.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

DOCUMENT ME!

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
          DOCUMENT ME!
protected  double[][] copy
          DOCUMENT ME!
protected  int[] dashLength
          DOCUMENT ME!
protected  double[][] data
          DOCUMENT ME!
protected static double dataFill
          DOCUMENT ME!
protected  boolean[] errorBar
          DOCUMENT ME!
protected  double[][] errors
          DOCUMENT ME!
protected  double[][] errorsCopy
          DOCUMENT ME!
protected  int fontSize
          DOCUMENT ME!
protected  java.lang.String graphTitle
          DOCUMENT ME!
protected  java.lang.String graphTitle2
          DOCUMENT ME!
protected  int[] lineOpt
          DOCUMENT ME!
protected  boolean[] minMaxOpt
          DOCUMENT ME!
protected  int nCurves
          DOCUMENT ME!
protected  int niPoints
          DOCUMENT ME!
protected  int nmPoints
          DOCUMENT ME!
protected  boolean noXoffset
          DOCUMENT ME!
protected  boolean noXunits
          DOCUMENT ME!
protected  boolean noYoffset
          DOCUMENT ME!
protected  boolean noYunits
          DOCUMENT ME!
protected  int[] nPoints
          DOCUMENT ME!
protected  int npTypes
          DOCUMENT ME!
protected  int[] pointOpt
          DOCUMENT ME!
protected  int[] pointSize
          DOCUMENT ME!
protected  boolean[] trimOpt
          DOCUMENT ME!
protected  java.lang.String[] xAxisChar
          DOCUMENT ME!
protected  java.lang.String xAxisLegend
          DOCUMENT ME!
protected  double[] xAxisNo
          DOCUMENT ME!
protected  java.lang.String xAxisUnits
          DOCUMENT ME!
protected  int xBot
          DOCUMENT ME!
protected  int xFac
          DOCUMENT ME!
protected  double xHigh
          DOCUMENT ME!
protected  int xLen
          DOCUMENT ME!
protected  double xLow
          DOCUMENT ME!
protected  double xLowFac
          DOCUMENT ME!
protected  double xMax
          DOCUMENT ME!
protected  double xMin
          DOCUMENT ME!
protected  double xOffset
          DOCUMENT ME!
protected  int xTicks
          DOCUMENT ME!
protected  int xTop
          DOCUMENT ME!
protected  boolean xZero
          DOCUMENT ME!
protected  java.lang.String[] yAxisChar
          DOCUMENT ME!
protected  java.lang.String yAxisLegend
          DOCUMENT ME!
protected  double[] yAxisNo
          DOCUMENT ME!
protected  java.lang.String yAxisUnits
          DOCUMENT ME!
protected  int yBot
          DOCUMENT ME!
protected  int yFac
          DOCUMENT ME!
protected  double yHigh
          DOCUMENT ME!
protected  int yLen
          DOCUMENT ME!
protected  double yLow
          DOCUMENT ME!
protected  double yLowFac
          DOCUMENT ME!
protected  double yMax
          DOCUMENT ME!
protected  double yMin
          DOCUMENT ME!
protected  double yOffset
          DOCUMENT ME!
protected  int yTicks
          DOCUMENT ME!
protected  int yTop
          DOCUMENT ME!
protected  boolean yZero
          DOCUMENT ME!
 
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)
          Creates a new Plot object.
Plot(double[] xdata, double[] ydata)
          Creates a new Plot object.
 
Method Summary
 void axesScaleOffset()
          DOCUMENT ME!
static double[][] data(int n, int m)
          DOCUMENT ME!
 int[] getDashlength()
          DOCUMENT ME!
static double getDataFillValue()
          DOCUMENT ME!
 int getFontSize()
          DOCUMENT ME!
 int[] getLine()
          DOCUMENT ME!
 int getNiPoints()
          DOCUMENT ME!
 boolean getNoXoffset()
          DOCUMENT ME!
 boolean getNoYoffset()
          DOCUMENT ME!
 int[] getPoint()
          DOCUMENT ME!
 int[] getPointsize()
          DOCUMENT ME!
 int getXaxisLen()
          DOCUMENT ME!
 int getXlow()
          DOCUMENT ME!
 double getXlowFac()
          DOCUMENT ME!
 double getXmax()
          DOCUMENT ME!
 double getXmin()
          DOCUMENT ME!
 int getYaxisLen()
          DOCUMENT ME!
 int getYhigh()
          DOCUMENT ME!
 double getYlowFac()
          DOCUMENT ME!
 double getYmax()
          DOCUMENT ME!
 double getYmin()
          DOCUMENT ME!
 void graph(java.awt.Graphics g)
          DOCUMENT ME!
static void limits(double low, double high, double lowfac, double[] limits)
          DOCUMENT ME!
 void minMax()
          DOCUMENT ME!
static double offset(double low, double high)
          DOCUMENT ME!
protected static java.lang.String offsetString(double offset)
          DOCUMENT ME!
 boolean printCheck(boolean trim, int xoldpoint, int xnewpoint, int yoldpoint, int ynewpoint)
          DOCUMENT ME!
static int scale(double mmin, double mmax)
          DOCUMENT ME!
 void setDashLength(int sdashLength)
          DOCUMENT ME!
 void setDashLength(int[] dashLength)
          DOCUMENT ME!
static void setDataFillValue(double dataFill)
          DOCUMENT ME!
 void setErrorBars(int nc, double[] err)
          DOCUMENT ME!
 void setFontSize(int fontSize)
          DOCUMENT ME!
 void setGraphTitle(java.lang.String graphTitle)
          DOCUMENT ME!
 void setGraphTitle2(java.lang.String graphTitle2)
          DOCUMENT ME!
 void setLine(int slineOpt)
          DOCUMENT ME!
 void setLine(int[] lineOpt)
          DOCUMENT ME!
 void setMinMaxOpt(boolean[] minmax)
          DOCUMENT ME!
 void setNiPoints(int niPoints)
          DOCUMENT ME!
 void setNoOffset(boolean nooffset)
          DOCUMENT ME!
 void setNoXoffset(boolean noXoffset)
          DOCUMENT ME!
 void setNoYoffset(boolean noYoffset)
          DOCUMENT ME!
 void setPoint(int spointOpt)
          DOCUMENT ME!
 void setPoint(int[] pointOpt)
          DOCUMENT ME!
 void setPointSize(int spointSize)
          DOCUMENT ME!
 void setPointSize(int[] mpointSize)
          DOCUMENT ME!
 void setTrimOpt(boolean[] trim)
          DOCUMENT ME!
 void setXaxisLegend(java.lang.String xAxisLegend)
          DOCUMENT ME!
 void setXaxisLen(int xLen)
          DOCUMENT ME!
 void setXaxisUnitsName(java.lang.String xAxisUnits)
          DOCUMENT ME!
 void setXlow(int xBot)
          DOCUMENT ME!
 void setXlowFac(double xLowFac)
          DOCUMENT ME!
 void setYaxisLegend(java.lang.String yAxisLegend)
          DOCUMENT ME!
 void setYaxisLen(int yLen)
          DOCUMENT ME!
 void setYaxisUnitsName(java.lang.String yAxisUnits)
          DOCUMENT ME!
 void setYhigh(int yTop)
          DOCUMENT ME!
 void setYlowFac(double yLowFac)
          DOCUMENT ME!
static int ticks(double low, double high, double[] tickval, java.lang.String[] tickchar)
          DOCUMENT ME!
protected  void update()
          DOCUMENT ME!
 
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

dataFill

protected static double dataFill
DOCUMENT ME!


data

protected double[][] data
DOCUMENT ME!


copy

protected double[][] copy
DOCUMENT ME!


nCurves

protected int nCurves
DOCUMENT ME!


nPoints

protected int[] nPoints
DOCUMENT ME!


nmPoints

protected int nmPoints
DOCUMENT ME!


niPoints

protected int niPoints
DOCUMENT ME!


pointOpt

protected int[] pointOpt
DOCUMENT ME!


pointSize

protected int[] pointSize
DOCUMENT ME!


npTypes

protected int npTypes
DOCUMENT ME!


errorBar

protected boolean[] errorBar
DOCUMENT ME!


errors

protected double[][] errors
DOCUMENT ME!


errorsCopy

protected double[][] errorsCopy
DOCUMENT ME!


lineOpt

protected int[] lineOpt
DOCUMENT ME!


dashLength

protected int[] dashLength
DOCUMENT ME!


minMaxOpt

protected boolean[] minMaxOpt
DOCUMENT ME!


trimOpt

protected boolean[] trimOpt
DOCUMENT ME!


fontSize

protected int fontSize
DOCUMENT ME!


xLen

protected int xLen
DOCUMENT ME!


yLen

protected int yLen
DOCUMENT ME!


xBot

protected int xBot
DOCUMENT ME!


xTop

protected int xTop
DOCUMENT ME!


yTop

protected int yTop
DOCUMENT ME!


yBot

protected int yBot
DOCUMENT ME!


xLow

protected double xLow
DOCUMENT ME!


xHigh

protected double xHigh
DOCUMENT ME!


yLow

protected double yLow
DOCUMENT ME!


yHigh

protected double yHigh
DOCUMENT ME!


xFac

protected int xFac
DOCUMENT ME!


yFac

protected int yFac
DOCUMENT ME!


xTicks

protected int xTicks
DOCUMENT ME!


yTicks

protected int yTicks
DOCUMENT ME!


xMin

protected double xMin
DOCUMENT ME!


xMax

protected double xMax
DOCUMENT ME!


yMin

protected double yMin
DOCUMENT ME!


yMax

protected double yMax
DOCUMENT ME!


xOffset

protected double xOffset
DOCUMENT ME!


yOffset

protected double yOffset
DOCUMENT ME!


noXoffset

protected boolean noXoffset
DOCUMENT ME!


noYoffset

protected boolean noYoffset
DOCUMENT ME!


xLowFac

protected double xLowFac
DOCUMENT ME!


yLowFac

protected double yLowFac
DOCUMENT ME!


graphTitle

protected java.lang.String graphTitle
DOCUMENT ME!


graphTitle2

protected java.lang.String graphTitle2
DOCUMENT ME!


xAxisLegend

protected java.lang.String xAxisLegend
DOCUMENT ME!


xAxisUnits

protected java.lang.String xAxisUnits
DOCUMENT ME!


yAxisLegend

protected java.lang.String yAxisLegend
DOCUMENT ME!


yAxisUnits

protected java.lang.String yAxisUnits
DOCUMENT ME!


xZero

protected boolean xZero
DOCUMENT ME!


yZero

protected boolean yZero
DOCUMENT ME!


noXunits

protected boolean noXunits
DOCUMENT ME!


noYunits

protected boolean noYunits
DOCUMENT ME!


xAxisNo

protected double[] xAxisNo
DOCUMENT ME!


yAxisNo

protected double[] yAxisNo
DOCUMENT ME!


xAxisChar

protected java.lang.String[] xAxisChar
DOCUMENT ME!


yAxisChar

protected java.lang.String[] yAxisChar
DOCUMENT ME!


axisTicks

protected int[] axisTicks
DOCUMENT ME!

Constructor Detail

Plot

public Plot(double[][] data)
Creates a new Plot object.

Parameters:
data - DOCUMENT ME!

Plot

public Plot(double[] xdata,
            double[] ydata)
Creates a new Plot object.

Parameters:
xdata - DOCUMENT ME!
ydata - DOCUMENT ME!
Method Detail

data

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

Parameters:
n - DOCUMENT ME!
m - DOCUMENT ME!
Returns:
DOCUMENT ME!

setDataFillValue

public static void setDataFillValue(double dataFill)
DOCUMENT ME!

Parameters:
dataFill - DOCUMENT ME!

getDataFillValue

public static double getDataFillValue()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setGraphTitle

public void setGraphTitle(java.lang.String graphTitle)
DOCUMENT ME!

Parameters:
graphTitle - DOCUMENT ME!

setGraphTitle2

public void setGraphTitle2(java.lang.String graphTitle2)
DOCUMENT ME!

Parameters:
graphTitle2 - DOCUMENT ME!

setXaxisLegend

public void setXaxisLegend(java.lang.String xAxisLegend)
DOCUMENT ME!

Parameters:
xAxisLegend - DOCUMENT ME!

setYaxisLegend

public void setYaxisLegend(java.lang.String yAxisLegend)
DOCUMENT ME!

Parameters:
yAxisLegend - DOCUMENT ME!

setXaxisUnitsName

public void setXaxisUnitsName(java.lang.String xAxisUnits)
DOCUMENT ME!

Parameters:
xAxisUnits - DOCUMENT ME!

setYaxisUnitsName

public void setYaxisUnitsName(java.lang.String yAxisUnits)
DOCUMENT ME!

Parameters:
yAxisUnits - DOCUMENT ME!

getXaxisLen

public int getXaxisLen()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getYaxisLen

public int getYaxisLen()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getXlow

public int getXlow()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getYhigh

public int getYhigh()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getPointsize

public int[] getPointsize()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getDashlength

public int[] getDashlength()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getXlowFac

public double getXlowFac()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getYlowFac

public double getYlowFac()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getXmin

public double getXmin()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getXmax

public double getXmax()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getYmin

public double getYmin()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getYmax

public double getYmax()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getLine

public int[] getLine()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getPoint

public int[] getPoint()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNiPoints

public int getNiPoints()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getFontSize

public int getFontSize()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setXaxisLen

public void setXaxisLen(int xLen)
DOCUMENT ME!

Parameters:
xLen - DOCUMENT ME!

setYaxisLen

public void setYaxisLen(int yLen)
DOCUMENT ME!

Parameters:
yLen - DOCUMENT ME!

setXlow

public void setXlow(int xBot)
DOCUMENT ME!

Parameters:
xBot - DOCUMENT ME!

setYhigh

public void setYhigh(int yTop)
DOCUMENT ME!

Parameters:
yTop - DOCUMENT ME!

setXlowFac

public void setXlowFac(double xLowFac)
DOCUMENT ME!

Parameters:
xLowFac - DOCUMENT ME!

setYlowFac

public void setYlowFac(double yLowFac)
DOCUMENT ME!

Parameters:
yLowFac - DOCUMENT ME!

setNoXoffset

public void setNoXoffset(boolean noXoffset)
DOCUMENT ME!

Parameters:
noXoffset - DOCUMENT ME!

setNoYoffset

public void setNoYoffset(boolean noYoffset)
DOCUMENT ME!

Parameters:
noYoffset - DOCUMENT ME!

setNoOffset

public void setNoOffset(boolean nooffset)
DOCUMENT ME!

Parameters:
nooffset - DOCUMENT ME!

getNoXoffset

public boolean getNoXoffset()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNoYoffset

public boolean getNoYoffset()
DOCUMENT ME!

Returns:
DOCUMENT ME!

update

protected void update()
DOCUMENT ME!


setLine

public void setLine(int[] lineOpt)
DOCUMENT ME!

Parameters:
lineOpt - DOCUMENT ME!

setLine

public void setLine(int slineOpt)
DOCUMENT ME!

Parameters:
slineOpt - DOCUMENT ME!

setDashLength

public void setDashLength(int[] dashLength)
DOCUMENT ME!

Parameters:
dashLength - DOCUMENT ME!

setDashLength

public void setDashLength(int sdashLength)
DOCUMENT ME!

Parameters:
sdashLength - DOCUMENT ME!

setPoint

public void setPoint(int[] pointOpt)
DOCUMENT ME!

Parameters:
pointOpt - DOCUMENT ME!

setPoint

public void setPoint(int spointOpt)
DOCUMENT ME!

Parameters:
spointOpt - DOCUMENT ME!

setPointSize

public void setPointSize(int[] mpointSize)
DOCUMENT ME!

Parameters:
mpointSize - DOCUMENT ME!

setPointSize

public void setPointSize(int spointSize)
DOCUMENT ME!

Parameters:
spointSize - DOCUMENT ME!

setErrorBars

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

Parameters:
nc - DOCUMENT ME!
err - DOCUMENT ME!

setNiPoints

public void setNiPoints(int niPoints)
DOCUMENT ME!

Parameters:
niPoints - DOCUMENT ME!

setFontSize

public void setFontSize(int fontSize)
DOCUMENT ME!

Parameters:
fontSize - DOCUMENT ME!

setTrimOpt

public void setTrimOpt(boolean[] trim)
DOCUMENT ME!

Parameters:
trim - DOCUMENT ME!

setMinMaxOpt

public void setMinMaxOpt(boolean[] minmax)
DOCUMENT ME!

Parameters:
minmax - DOCUMENT ME!

scale

public static int scale(double mmin,
                        double mmax)
DOCUMENT ME!

Parameters:
mmin - DOCUMENT ME!
mmax - DOCUMENT ME!
Returns:
DOCUMENT ME!

limits

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

Parameters:
low - DOCUMENT ME!
high - DOCUMENT ME!
lowfac - DOCUMENT ME!
limits - DOCUMENT ME!

offset

public static double offset(double low,
                            double high)
DOCUMENT ME!

Parameters:
low - DOCUMENT ME!
high - DOCUMENT ME!
Returns:
DOCUMENT ME!

axesScaleOffset

public void axesScaleOffset()
DOCUMENT ME!


ticks

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

Parameters:
low - DOCUMENT ME!
high - DOCUMENT ME!
tickval - DOCUMENT ME!
tickchar - DOCUMENT ME!
Returns:
DOCUMENT ME!

minMax

public void minMax()
DOCUMENT ME!


offsetString

protected static java.lang.String offsetString(double offset)
DOCUMENT ME!

Parameters:
offset - DOCUMENT ME!
Returns:
DOCUMENT ME!

printCheck

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

Parameters:
trim - DOCUMENT ME!
xoldpoint - DOCUMENT ME!
xnewpoint - DOCUMENT ME!
yoldpoint - DOCUMENT ME!
ynewpoint - DOCUMENT ME!
Returns:
DOCUMENT ME!

graph

public void graph(java.awt.Graphics g)
DOCUMENT ME!

Parameters:
g - DOCUMENT ME!