Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uchicago.src.sim.analysis.plot
Class RepastPlot

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      uchicago.src.sim.analysis.plot.RepastPlotBox
                          uchicago.src.sim.analysis.plot.RepastPlot

All Implemented Interfaces:
  java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

    public class RepastPlot

extends RepastPlotBox

A flexible signal plotter. The plot can be configured and data can be provided either through a file with commands or through direct invocation of the public methods of the class.

When calling the public methods, in most cases the changes will not be visible until paint() is called. To request that this be done, call repaint(). One exception is addPoint(), which makes the new point visible immediately if the plot is visible on the screen.

BELOW ADDED BY NICK COLLIER This is almost entirely a cut and paste from Ptolemy's Plot class. This approach was necessary as the scope of some methods needed to be changed. See the Ptolemy docs for more information.

Version:
  $Revision: 1.7 $ $Date: 2004/11/03 19:51:02 $
Author:
  Edward A. Lee, Christopher Hylands with some small additions by Nick Collier
See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class uchicago.src.sim.analysis.plot.RepastPlotBox
`RepastPlotBox.DragListener, RepastPlotBox.PtZoomListener`

Nested classes/interfaces inherited from class javax.swing.JPanel
`javax.swing.JPanel.AccessibleJPanel`

Nested classes/interfaces inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes/interfaces inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes/interfaces inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`protected int` | `_currentdataset`
`protected int` | `_marks`
`protected boolean` | `_painted`
`protected java.util.Vector` | `_points`

Fields inherited from class uchicago.src.sim.analysis.plot.RepastPlotBox
`_background, _bottomPadding, _colors, _documentBase, _foreground, _grid, _height, _leftPadding, _LOG10SCALE, _lrx, _lry, _MAX_MARKS, _PADDING, _rangesGivenByZooming, _rightPadding, _topPadding, _ulx, _uly, _usecolor, _width, _wrap, _xBottom, _xhighgiven, _xlog, _xlowgiven, _xMax, _xMin, _xRangeGiven, _xscale, _xTop, _yBottom, _yhighgiven, _ylog, _ylowgiven, _yMax, _yMin, _yRangeGiven, _yscale, _yTop, dsColorMap, dsMarkMap`

Fields inherited from class javax.swing.JComponent
`accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

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
`RepastPlot(ZoomListener listener)`

Method Summary
`protected void` | `_checkDatasetIndex(int dataset)` Check the argument to ensure that it is a valid data set index.
`protected void` | `_drawBar(java.awt.Graphics graphics, int dataset, long xpos, long ypos, boolean clip)` Draw bar from the specified point to the y axis.
`protected void` | `_drawErrorBar(java.awt.Graphics graphics, int dataset, long xpos, long yLowEBPos, long yHighEBPos, boolean clip)` Draw an error bar for the specified yLowEB and yHighEB values.
`protected void` | `_drawImpulse(java.awt.Graphics graphics, long xpos, long ypos, boolean clip)` Draw a line from the specified point to the y axis.
`protected void` | `_drawLine(java.awt.Graphics graphics, int dataset, long startx, long starty, long endx, long endy, boolean clip)` Draw a line from the specified starting point to the specified ending point.
`protected void` | `_drawPlot(java.awt.Graphics graphics, boolean clearfirst)` Draw the axes and then plot all points.
`protected void` | `_drawPoint(java.awt.Graphics graphics, int dataset, long xpos, long ypos, boolean clip)` Put a mark corresponding to the specified dataset at the specified x and y position.
`protected boolean` | `_parseLine(java.lang.String line)` Parse a line that gives plotting information.
`protected void` | `_write(java.io.PrintWriter output)` Write plot information to the specified output stream in PlotML, an XML extension.
`protected void` | `_writeOldSyntax(java.io.PrintWriter output)` Deprecated.
`void` | `addLegend(int dataset, java.lang.String legend)` Add a legend (displayed at the upper right) for the specified data set with the specified string.
`void` | `addLegend(int dataset, java.lang.String legend, java.awt.Color color)`
`void` | `addLegend(int dataset, java.lang.String legend, java.awt.Color color, int markStyle)`
`void` | `addLegend(int dataset, java.lang.String legend, int markStyle)`
`void` | `addPoint(int dataset, double x, double y, boolean connected)` In the specified data set, add the specified x, y point to the plot.
`void` | `addPointWithErrorBars(int dataset, double x, double y, double yLowEB, double yHighEB, boolean connected)` In the specified data set, add the specified x, y point to the plot with error bars.
`void` | `clear(boolean format)` Clear the plot of all data points.
`void` | `clear(int dataset)` Clear the plot of data points in the specified dataset.
`void` | `clearPoints()`
`void` | `erasePoint(int dataset, int index)` Erase the point at the given index in the given dataset.
`void` | `fillPlot()` Rescale so that the data that is currently plotted just fits.
`boolean` | `getConnected()` Return whether the default is to connect subsequent points with a line.
`boolean` | `getImpulses()` Return whether a line will be drawn from any plotted point down to the x axis.
`java.lang.String` | `getMarksStyle()` Get the marks style, which is one of "none", "points", "dots", or "various".
`int` | `getMaxDataSets()` Deprecated.
`int` | `getNumDataSets()` Return the actual number of data sets.
`void` | `parseFile(java.lang.String filespec, java.net.URL documentBase)` Deprecated.
`void` | `read(java.io.InputStream in)` Read a file with the old syntax (non-XML).
`void` | `samplePlot()` Create a sample plot.
`void` | `setBars(boolean on)` Turn bars on or off (for bar charts).
`void` | `setBars(double width, double offset)` Turn bars on and set the width and offset.
`void` | `setConnected(boolean on)` If the argument is true, then the default is to connect subsequent points with a line.
`void` | `setConnected(boolean on, int dataset)` If the first argument is true, then by default for the specified dataset, points will be connected by a line.
`void` | `setDrawOnAddPoint(boolean draw)`
`void` | `setImpulses(boolean on)` If the argument is true, then a line will be drawn from any plotted point down to the x axis.
`void` | `setImpulses(boolean on, int dataset)` If the first argument is true, then a line will be drawn from any plotted point in the specified dataset down to the x axis.
`void` | `setMarksStyle(java.lang.String style)` Set the marks style to "none", "points", "dots", or "various".
`void` | `setMarksStyle(java.lang.String style, int dataset)` Set the marks style to "none", "points", "dots", or "various" for the specified dataset.
`void` | `setNumSets(int numsets)` Deprecated.
`void` | `setPointsPersistence(int persistence)` Calling this method with a positive argument sets the persistence of the plot to the given number of points.
`void` | `setReuseDatasets(boolean on)` If the argument is true, then datasets with the same name are merged into a single dataset.
`void` | `setSweepsPersistence(int persistence)` A sweep is a sequence of points where the value of X is increasing.

Methods inherited from class uchicago.src.sim.analysis.plot.RepastPlotBox
`_help, _setButtonsVisibility, addDetailString, addXTick, addYTick, clearDetailStrings, export, getColor, getColorByName, getDataurl, getDocumentBase, getGrid, getImage, getLegend, getMinimumSize, getPreferredSize, getTitle, getXLabel, getXLog, getXRange, getXTicks, getYLabel, getYLog, getYRange, getYTicks, init, paint, parseFile, read, setBackground, setBounds, setButtons, setColor, setDataurl, setDocumentBase, setForeground, setGrid, setLabelFont, setSize, setTitle, setTitleFont, setWrap, setXLabel, setXLog, setXRange, setYLabel, setYLog, setYRange, update, updateXTick, write, write, writeOldSyntax, zoom`

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction`

Methods inherited from class java.awt.Container
`add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### _currentdataset

    protected int _currentdataset

### _points

    protected java.util.Vector _points

### _marks

    protected int _marks

### _painted

    protected boolean _painted

Constructor Detail

### RepastPlot

    public RepastPlot(ZoomListener listener)

Method Detail

### addLegend

    public void addLegend(int dataset,
                          java.lang.String legend)

  Add a legend (displayed at the upper right) for the specified data set with the specified string. Short strings generally fit better than long strings.

  Overrides:
    `addLegend` in class `RepastPlotBox`
  Parameters:
    `dataset` - The dataset index.
    `legend` - The label for the dataset.

### addLegend

    public void addLegend(int dataset,
                          java.lang.String legend,
                          java.awt.Color color)

  Overrides:
    `addLegend` in class `RepastPlotBox`

### addLegend

    public void addLegend(int dataset,
                          java.lang.String legend,
                          int markStyle)

  Overrides:
    `addLegend` in class `RepastPlotBox`

### addLegend

    public void addLegend(int dataset,
                          java.lang.String legend,
                          java.awt.Color color,
                          int markStyle)

  Overrides:
    `addLegend` in class `RepastPlotBox`

### addPoint

    public void addPoint(int dataset,
                         double x,
                         double y,
                         boolean connected)

  In the specified data set, add the specified x, y point to the plot. Data set indices begin with zero. If the data set does not exist, create it. The fourth argument indicates whether the point should be connected by a line to the previous point. Regardless of the value of this argument, a line will not drawn if either there has been no previous point for this dataset or setConnected() has been called with a false argument. The new point will be made visible if the plot is visible on the screen. Otherwise, it will be drawn the next time the plot is drawn on the screen.

  Parameters:
    `dataset` - The data set index.
    `x` - The X position of the new point.
    `y` - The Y position of the new point.
    `connected` - If true, a line is drawn to connect to the previous point.

### addPointWithErrorBars

    public void addPointWithErrorBars(int dataset,
                                      double x,
                                      double y,
                                      double yLowEB,
                                      double yHighEB,
                                      boolean connected)

  In the specified data set, add the specified x, y point to the plot with error bars. Data set indices begin with zero. If the dataset does not exist, create it. yLowEB and yHighEB are the lower and upper error bars. The sixth argument indicates whether the point should be connected by a line to the previous point. The new point will be made visible if the plot is visible on the screen. Otherwise, it will be drawn the next time the plot is drawn on the screen. This method is based on a suggestion by Michael Altmann .

  Parameters:
    `dataset` - The data set index.
    `x` - The X position of the new point.
    `y` - The Y position of the new point.
    `yLowEB` - The low point of the error bar.
    `yHighEB` - The high point of the error bar.
    `connected` - If true, a line is drawn to connect to the previous point.

### clear

    public void clear(boolean format)

  Clear the plot of all data points. If the argument is true, then reset all parameters to their initial conditions, including the persistence, plotting format, and axes formats. For the change to take effect, you must call repaint().

  Overrides:
    `clear` in class `RepastPlotBox`
  Parameters:
    `format` - If true, clear the format controls as well.

### clear

    public void clear(int dataset)

  Clear the plot of data points in the specified dataset. This calls repaint() to request an update of the display.

  Parameters:
    `dataset` - The dataset to clear.

### erasePoint

    public void erasePoint(int dataset,
                           int index)

  Erase the point at the given index in the given dataset. If lines are being drawn, also erase the line to the next points (note: not to the previous point). The point is not checked to see whether it is in range, so care must be taken by the caller to ensure that it is. The change will be made visible if the plot is visible on the screen. Otherwise, it will take effect the next time the plot is drawn on the screen.

  Parameters:
    `dataset` - The data set index.
    `index` - The index of the point to erase.

### fillPlot

    public void fillPlot()

  Rescale so that the data that is currently plotted just fits. This overrides the base class method to ensure that the protected variables _xBottom, _xTop, _yBottom, and _yTop are valid. This method calls repaint(), which eventually causes the display to be updated.

  Overrides:
    `fillPlot` in class `RepastPlotBox`

### getConnected

    public boolean getConnected()

  Return whether the default is to connect subsequent points with a line. If the result is false, then points are not connected. When points are by default connected, individual points can be not connected by giving the appropriate argument to addPoint(). Also, a different default can be set for each dataset, overriding this global default.

### getImpulses

    public boolean getImpulses()

  Return whether a line will be drawn from any plotted point down to the x axis. A plot with such lines is also known as a stem plot.

  Parameters:
    `on` - If true, draw a stem plot.

### getMarksStyle

    public java.lang.String getMarksStyle()

  Get the marks style, which is one of "none", "points", "dots", or "various".

  Returns:
    A string specifying the style for points.

### getMaxDataSets

    public int getMaxDataSets()

  Deprecated.

  Return the maximum number of data sets. This method is deprecated, since there is no longer an upper bound.

### getNumDataSets

    public int getNumDataSets()

  Return the actual number of data sets.

  Returns:
    The number of data sets that have been created.

### parseFile

    public void parseFile(java.lang.String filespec,
                          java.net.URL documentBase)

  Deprecated.

  Override the base class to indicate that a new data set is being read. This method is deprecated. Use read() instead (to read the old file format) or one of the classes in the plotml package to read the new (XML) file format.

  Overrides:
    `parseFile` in class `RepastPlotBox`

### read

    public void read(java.io.InputStream in)
              throws java.io.IOException

  Read a file with the old syntax (non-XML). Override the base class to register that we are reading a new data set.

  Overrides:
    `read` in class `RepastPlotBox`
  Parameters:
    `inputstream` - The input stream.
  Throws:
    `java.io.IOException` - If the stream cannot be read.

### samplePlot

    public void samplePlot()

  Create a sample plot.

  Overrides:
    `samplePlot` in class `RepastPlotBox`

### setBars

    public void setBars(boolean on)

  Turn bars on or off (for bar charts).

  Parameters:
    `on` - If true, turn bars on.

### setBars

    public void setBars(double width,
                        double offset)

  Turn bars on and set the width and offset. Both are specified in units of the x axis. The offset is the amount by which the i < sup>th data set is shifted to the right, so that it peeks out from behind the earlier data sets.

  Parameters:
    `width` - The width of the bars.
    `offset` - The offset per data set.

### setConnected

    public void setConnected(boolean on)

  If the argument is true, then the default is to connect subsequent points with a line. If the argument is false, then points are not connected. When points are by default connected, individual points can be not connected by giving the appropriate argument to addPoint(). Also, a different default can be set for each dataset, overriding this global default.

### setConnected

    public void setConnected(boolean on,
                             int dataset)

  If the first argument is true, then by default for the specified dataset, points will be connected by a line. Otherwise, the points will not be connected. When points are by default connected, individual points can be not connected by giving the appropriate argument to addPoint().

  Parameters:
    `on` - If true, draw lines between points.
    `dataset` - The dataset to which this should apply.

### setImpulses

    public void setImpulses(boolean on)

  If the argument is true, then a line will be drawn from any plotted point down to the x axis. Otherwise, this feature is disabled. A plot with such lines is also known as a stem plot.

  Parameters:
    `on` - If true, draw a stem plot.

### setImpulses

    public void setImpulses(boolean on,
                            int dataset)

  If the first argument is true, then a line will be drawn from any plotted point in the specified dataset down to the x axis. Otherwise, this feature is disabled. A plot with such lines is also known as a stem plot.

  Parameters:
    `on` - If true, draw a stem plot.
    `dataset` - The dataset to which this should apply.

### setMarksStyle

    public void setMarksStyle(java.lang.String style)

  Set the marks style to "none", "points", "dots", or "various". In the last case, unique marks are used for the first ten data sets, then recycled.

  Parameters:
    `style` - A string specifying the style for points.

### setMarksStyle

    public void setMarksStyle(java.lang.String style,
                              int dataset)

  Set the marks style to "none", "points", "dots", or "various" for the specified dataset. In the last case, unique marks are used for the first ten data sets, then recycled.

  Parameters:
    `style` - A string specifying the style for points.
    `dataset` - The dataset to which this should apply.

### setNumSets

    public void setNumSets(int numsets)

  Deprecated.

  Specify the number of data sets to be plotted together. This method is deprecated, since it is no longer necessary to specify the number of data sets ahead of time. It has the effect of clearing all previously plotted points. This method should be called before setPointsPersistence(). This method throws IllegalArgumentException if the number is less than 1. This is a runtime exception, so it need not be declared.

  Parameters:
    `numsets` - The number of data sets.

### setPointsPersistence

    public void setPointsPersistence(int persistence)

  Calling this method with a positive argument sets the persistence of the plot to the given number of points. Calling with a zero argument turns off this feature, reverting to infinite memory (unless sweeps persistence is set). If both sweeps and points persistence are set then sweeps take precedence.

### setReuseDatasets

    public void setReuseDatasets(boolean on)

  If the argument is true, then datasets with the same name are merged into a single dataset.

  Parameters:
    `on` - If true, then merge datasets.

### setSweepsPersistence

    public void setSweepsPersistence(int persistence)

  A sweep is a sequence of points where the value of X is increasing. A point that is added with a smaller x than the previous point increments the sweep count. Calling this method with a non-zero argument sets the persistence of the plot to the given number of sweeps. Calling with a zero argument turns off this feature. If both sweeps and points persistence are set then sweeps take precedence. This feature is not implemented yet, so this method has no effect.

### _checkDatasetIndex

    protected void _checkDatasetIndex(int dataset)

  Check the argument to ensure that it is a valid data set index. If it is less than zero, throw an IllegalArgumentException (which is a runtime exception). If it does not refer to an existing data set, then fill out the _points Vector so that it does refer to an existing data set. All other dataset-related vectors are similarly filled out.

  Parameters:
    `dataset` - The data set index.

### _drawBar

    protected void _drawBar(java.awt.Graphics graphics,
                            int dataset,
                            long xpos,
                            long ypos,
                            boolean clip)

  Draw bar from the specified point to the y axis. If the specified point is below the y axis or outside the x range, do nothing. If the clip argument is true, then do not draw above the y range. Note that paint() should be called before calling this method so that _xscale and _yscale are properly set.

  Parameters:
    `graphics` - The graphics context.
    `dataset` - The index of the dataset.
    `xpos` - The x position.
    `ypos` - The y position.
    `clip` - If true, then do not draw outside the range.

### _drawErrorBar

    protected void _drawErrorBar(java.awt.Graphics graphics,
                                 int dataset,
                                 long xpos,
                                 long yLowEBPos,
                                 long yHighEBPos,
                                 boolean clip)

  Draw an error bar for the specified yLowEB and yHighEB values. If the specified point is below the y axis or outside the x range, do nothing. If the clip argument is true, then do not draw above the y range.

  Parameters:
    `graphics` - The graphics context.
    `dataset` - The index of the dataset.
    `xpos` - The x position.
    `yLowEBPos` - The lower y position of the error bar.
    `yHighEBPos` - The upper y position of the error bar.
    `clip` - If true, then do not draw above the range.

### _drawImpulse

    protected void _drawImpulse(java.awt.Graphics graphics,
                                long xpos,
                                long ypos,
                                boolean clip)

  Draw a line from the specified point to the y axis. If the specified point is below the y axis or outside the x range, do nothing. If the clip argument is true, then do not draw above the y range.

  Parameters:
    `graphics` - The graphics context.
    `xpos` - The x position.
    `ypos` - The y position.
    `clip` - If true, then do not draw outside the range.

### _drawLine

    protected void _drawLine(java.awt.Graphics graphics,
                             int dataset,
                             long startx,
                             long starty,
                             long endx,
                             long endy,
                             boolean clip)

  Draw a line from the specified starting point to the specified ending point. The current color is used. If the clip argument is true, then draw only that portion of the line that lies within the plotting rectangle.

  Parameters:
    `graphics` - The graphics context.
    `dataset` - The index of the dataset.
    `startx` - The starting x position.
    `starty` - The starting y position.
    `endx` - The ending x position.
    `endy` - The ending y position.
    `clip` - If true, then do not draw outside the range.

### _drawPlot

    protected void _drawPlot(java.awt.Graphics graphics,
                             boolean clearfirst)

  Draw the axes and then plot all points. This is synchronized to prevent multiple threads from drawing the plot at the same time. It sets _painted true and calls notifyAll() at the end so that a thread can use `wait()` to prevent it plotting points before the axes have been first drawn. If the second argument is true, clear the display first. This method is called by paint(). To cause it to be called you would normally call repaint(), which eventually causes paint() to be called.

  Overrides:
    `_drawPlot` in class `RepastPlotBox`
  Parameters:
    `graphics` - The graphics context.
    `clearfirst` - If true, clear the plot before proceeding.

### _drawPoint

    protected void _drawPoint(java.awt.Graphics graphics,
                              int dataset,
                              long xpos,
                              long ypos,
                              boolean clip)

  Put a mark corresponding to the specified dataset at the specified x and y position. The mark is drawn in the current color. What kind of mark is drawn depends on the _marks variable and the dataset argument. If the fourth argument is true, then check the range and plot only points that are in range.

  Overrides:
    `_drawPoint` in class `RepastPlotBox`
  Parameters:
    `graphics` - The graphics context.
    `dataset` - The index of the dataset.
    `xpos` - The x position.
    `ypos` - The y position.
    `clip` - If true, then do not draw outside the range.

### _parseLine

    protected boolean _parseLine(java.lang.String line)

  Parse a line that gives plotting information. Return true if the line is recognized. Lines with syntax errors are ignored.

  Overrides:
    `_parseLine` in class `RepastPlotBox`
  Parameters:
    `line` - A command line.
  Returns:
    True if the line is recognized.

### _write

    protected void _write(java.io.PrintWriter output)

  Write plot information to the specified output stream in PlotML, an XML extension. Derived classes should override this method to first call the parent class method, then add whatever additional information they wish to add to the stream.

  Overrides:
    `_write` in class `RepastPlotBox`
  Parameters:
    `output` - A buffered print writer.

### _writeOldSyntax

    protected void _writeOldSyntax(java.io.PrintWriter output)

  Deprecated.

  Write plot information to the specified output stream in the "old syntax," which predates PlotML. Derived classes should override this method to first call the parent class method, then add whatever additional information they wish to add to the stream.

  Overrides:
    `_writeOldSyntax` in class `RepastPlotBox`
  Parameters:
    `output` - A buffered print writer.

### clearPoints

    public void clearPoints()

### setDrawOnAddPoint

    public void setDrawOnAddPoint(boolean draw)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD