ifi.dsb
Class Axis

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byifi.dsb.Axis
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class Axis
extends javax.swing.JPanel

Class to hold an axis object. An axis object is composed of an AxisLine object, a MajorTicks object, a TickLabels object and an AxisLabel object. An Axis object belongs to a Graph object.

The data values for a curve are stored in two CurveData objects.

Property change listeners can be installed for the properties "Min", "Max", "FixedMin" and "FixedMax".

Author:
Svein Bøe, svein@ifi.uio.no, 2002 - 2003.
See Also:
Plot2D, Graph, Curve, CurveData, Serialized Form

Nested Class Summary
 class Axis.AxisLabel
          Class to hold and paint label of axis (not labels of tick-marks).
 class Axis.AxisLine
          Class to hold and paint line of axis.
 class Axis.MajorTicks
          Class to hold and paint major tickmarks.
 class Axis.TickLabels
          Class to hold and paint the ticklabels of this axis.
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int HORIZONTAL
          Constant to indicate a horizontal axis.
static int VERTICAL
          Constant to indicate a vertical axis.
 
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
Axis(Graph graph, double min, double max, int length, int orientation)
          Constructs an Axis object.
Axis(Graph graph, int length, int orientation)
          Constructs an Axis object.
Axis(int length, int orientation)
          Constructs an Axis object.
 
Method Summary
 boolean getAutomaticBottomMargin()
          Return whether or not to automatically leave some space between curve and axis, at the lower end of the axis.
 boolean getAutomaticTopMargin()
          Return whether or not to automatically leave some space between curve and axis, at the higher end of the axis.
 Axis.AxisLabel getAxisLabel()
          Return the AxisLabel child object.
 java.awt.Color getColor()
          Return the color of this axis (including axis line, tick marks, tick labels and axis label).
 boolean getFixedMax()
          Return whether or not the axis maximum value should be fixed (not automatically updated when axisData are changed).
 boolean getFixedMin()
          Return whether or not the axis minimum value should be fixed (not automatically updated when axisData are changed).
 Graph getGraph()
          Return Graph object to which this Axis belongs.
 int getHeight()
          Return height in pixels.
 Axis.MajorTicks getMajorTicks()
          Return the MajorTicks child object.
 double getMajorTickSpacing()
          Return spacing between major tickmarks.
 boolean getManualBottomMargin()
          Return whether or not to manually leave some space between curve and axis, at the lower end of the axis.
 boolean getManualTopMargin()
          Return whether or not to manually leave some space between curve and axis, at the higher end of the axis.
 double getMax()
          Return the axis maximum value.
 double getMin()
          Return the axis minimum value.
 int getOrientation()
          Return the orientation of the axis (VERTICAL or HORIZONTAL).
 boolean getPaintGrid()
          Return whether or not to draw the grid.
 boolean getPaintMajorTicks()
          Return whether or not to draw major tickmarks.
 boolean getPaintTickLabels()
          Return whether or not to draw labels at the major tickmarks.
 java.awt.Dimension getPreferredSize()
          Return the preferred size of this axis.
 Axis.TickLabels getTickLabels()
          Return the TickLabels child object.
 int getWidth()
          Return width in pixels.
 void paintComponent(java.awt.Graphics g)
          Draw the axis.
 void setAutomaticBottomMargin(boolean set)
          Set whether or not to automatically leave some space between curve and axis, at the lower end of the axis.
 void setAutomaticTopMargin(boolean set)
          Set whether or not to automatically leave some space between curve and axis, at the higher end of the axis.
 void setBottomMargin(double margin)
          Set size of bottom margin.
 void setColor(java.awt.Color color)
          Set the color of this axis (including axis line, tick marks, tick labels and axis label).
 void setFixedMax(boolean fixedMax)
          Set whether or not the axis maximum value should be fixed (not automatically updated when axisData are changed).
 void setFixedMax(boolean fixedMax, boolean notify)
          Set whether or not the axis maximum value should be fixed (not automatically updated when axisData are changed).
 void setFixedMin(boolean fixedMin)
          Set whether or not the axis minimum value should be fixed (not automatically updated when axisData are changed).
 void setFixedMin(boolean fixedMin, boolean notify)
          Set whether or not the axis minimum value should be fixed (not automatically updated when axisData are changed).
 void setGraph(Graph graph)
          Set Graph object to which this Axis belongs.
 void setLabelTable(java.util.Dictionary table)
          Set the lables to be drawn for the major tickmarks.
 void setMajorTickSpacing(double spacing)
          Set spacing between major tickmarks.
 void setManualBottomMargin(boolean set)
          Set whether or not to manually leave some space between curve and axis, at the lower end of the axis.
 void setManualTopMargin(boolean set)
          Set whether or not to manually leave some space between curve and axis, at the higher end of the axis.
 void setMax(double max)
          Set the axis maximum value.
 void setMax(double max, boolean notify)
          Set the axis maximum value.
 void setMin(double min)
          Set the axis minimum value.
 void setMin(double min, boolean notify)
          Set the axis minimum value.
 void setPaintGrid(boolean paintGrid)
          Set whether or not to draw the grid.
 void setPaintMajorTicks(boolean paintTicks)
          Set whether or not to draw major tickmarks.
 void setPaintTickLabels(boolean paintLabels)
          Set whether or not to draw labels at the major tickmarks.
 void setTopMargin(double margin)
          Set size of top margin.
 void updateMax()
          Update axis maximum to reflect the maximum for all the CurveDatas (whether or not exceeding the current axis maximum), but only within a clipped axis range.
 void updateMax(CurveData curveData)
          Update axis maximum if the maximum in CurveData exceeds the current axis maximum, but only within a clipped axis range.
 void updateMax(CurveData curveData, int indMin, int indMax)
          Update axis maximum if the maximum over an index interval in CurveData exceeds the current axis maximum.
 void updateMin()
          Update axis minimum to reflect the minimum for all the CurveDatas (whether or not exceeding the current axis minimum), but only within a clipped axis range.
 void updateMin(CurveData curveData)
          Update axis minimum if the minimum in CurveData exceeds the current axis minimum, but only within a clipped axis range.
 void updateMin(CurveData curveData, int indMin, int indMax)
          Update axis minimum if the minimum over an index interval in CurveData exceeds the current axis minimum.
 void updateMinMax()
          Update axis minimum and maximum to reflect the extremas for all the CurveDatas (whether or not exceeding the current axis extrema), but only within a clipped axis range.
 void updateMinMax(boolean clipped)
          Update axis minimum and maximum to reflect the extremas for all the CurveDatas (whether or not exceeding the current axis extrema), for the complete axis range, with or without clipping.
 void updateMinMax(CurveData curveData)
          Update axis minimum and maximum if the extremas in CurveData exceed the current axis extrema, but only within a clipped axis range.
 void updateMinMax(CurveData curveData, int indMin, int indMax)
          Update axis minimum and maximum if the extremas over an index interval in CurveData exceed the current axis extrema.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, 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

VERTICAL

public static final int VERTICAL
Constant to indicate a vertical axis.

See Also:
Constant Field Values

HORIZONTAL

public static final int HORIZONTAL
Constant to indicate a horizontal axis.

See Also:
Constant Field Values
Constructor Detail

Axis

public Axis(int length,
            int orientation)
Constructs an Axis object. No data is set, axis minimum and maximum will get default values. Graph must be set later.

Parameters:
length - Length of axis in pixels. Zero gives default value.
orientation - Orientation (VERTICAL or HORIZONTAL)

Axis

public Axis(Graph graph,
            int length,
            int orientation)
Constructs an Axis object. Axis minimum and maximum will get default values.

Parameters:
graph - Graph to which this axis belongs.
length - Length of axis in pixels. Zero gives default value.
orientation - Orientation (VERTICAL or HORIZONTAL).

Axis

public Axis(Graph graph,
            double min,
            double max,
            int length,
            int orientation)
Constructs an Axis object.

Parameters:
graph - Graph to which this axis belongs.
min - Minimum value of axis. Will be set fixed unless both min and max are zero. If not set fixed, the value will be updated when axis is repainted.
max - Maximum value of axis. Will be set fixed unless both min and max are zero. If not set fixed, the value will be updated when axis is repainted.
length - Length of axis in pixels. Zero gives default value.
orientation - Orientation (VERTICAL or HORIZONTAL).
Method Detail

getWidth

public int getWidth()
Return width in pixels.


getHeight

public int getHeight()
Return height in pixels.


getGraph

public Graph getGraph()
Return Graph object to which this Axis belongs.


setGraph

public void setGraph(Graph graph)
Set Graph object to which this Axis belongs.


paintComponent

public void paintComponent(java.awt.Graphics g)
Draw the axis. The children are redrawn, unless the axis minimum and maximum are fixed (no rescaling).


getPreferredSize

public java.awt.Dimension getPreferredSize()
Return the preferred size of this axis.


updateMinMax

public void updateMinMax()
Update axis minimum and maximum to reflect the extremas for all the CurveDatas (whether or not exceeding the current axis extrema), but only within a clipped axis range. Don't update an axis extremum which has been set fixed.

The clipping range is determined by the intersection of [min, max] for this and the sister axis.

See Also:
updateMinMax(boolean), updateMinMax(CurveData)

updateMinMax

public void updateMinMax(boolean clipped)
Update axis minimum and maximum to reflect the extremas for all the CurveDatas (whether or not exceeding the current axis extrema), for the complete axis range, with or without clipping. Don't update an axis extremum which has been set fixed.

Parameters:
clipped - Whether or not to update only within a clipped range. The clipping range is determined by the intersection of [min, max] for this and the sister axis.
See Also:
updateMinMax(), updateMinMax(CurveData)

updateMinMax

public void updateMinMax(CurveData curveData)
Update axis minimum and maximum if the extremas in CurveData exceed the current axis extrema, but only within a clipped axis range. The clipping range is determined by the intersection of [min, max] for this and the sister axis.

Don't update an axis extremum which has been set fixed. Typical usage is for real-time plotting, i.e. when displaying a new curve which should not go outside the plot space.

Parameters:
curveData - Reference to data for one of the coordinates of a curve.
See Also:
updateMinMax(CurveData, int, int)

updateMinMax

public void updateMinMax(CurveData curveData,
                         int indMin,
                         int indMax)
Update axis minimum and maximum if the extremas over an index interval in CurveData exceed the current axis extrema. Don't update an axis extremum which has been set fixed. Typical usage is for real-time plotting, i.e. when displaying a new curve which should not go outside the plot space.

Parameters:
curveData - Reference to data for one of the coordinates of a curve.
indMin - Lower bound of the index interval for the data array in curveData.
indMax - Upper bound of the index interval for the data array in curveData.

updateMin

public void updateMin()
Update axis minimum to reflect the minimum for all the CurveDatas (whether or not exceeding the current axis minimum), but only within a clipped axis range. Don't update an axis extremum which has been set fixed.

The clipping range is determined by the intersection of [min, max] for this and the sister axis.

See Also:
updateMin(CurveData)

updateMin

public void updateMin(CurveData curveData)
Update axis minimum if the minimum in CurveData exceeds the current axis minimum, but only within a clipped axis range. Don't update an axis extremum which has been set fixed.

The clipping range is determined by the intersection of [min, max] for this and the sister axis.

See Also:
updateMin(CurveData, int, int)

updateMin

public void updateMin(CurveData curveData,
                      int indMin,
                      int indMax)
Update axis minimum if the minimum over an index interval in CurveData exceeds the current axis minimum. Don't update an axis extremum which has been set fixed.

Parameters:
curveData - Reference to data for one of the coordinates of a curve.
indMin - Lower bound of the index interval for the data array in curveData.
indMax - Upper bound of the index interval for the data array in curveData.

updateMax

public void updateMax()
Update axis maximum to reflect the maximum for all the CurveDatas (whether or not exceeding the current axis maximum), but only within a clipped axis range. Don't update an axis extremum which has been set fixed.

The clipping range is determined by the intersection of [min, max] for this and the sister axis.

See Also:
updateMax(CurveData)

updateMax

public void updateMax(CurveData curveData)
Update axis maximum if the maximum in CurveData exceeds the current axis maximum, but only within a clipped axis range. Don't update an axis extremum which has been set fixed.

The clipping range is determined by the intersection of [min, max] for this and the sister axis.

See Also:
updateMax(CurveData, int, int)

updateMax

public void updateMax(CurveData curveData,
                      int indMin,
                      int indMax)
Update axis maximum if the maximum over an index interval in CurveData exceeds the current axis maximum.

Parameters:
curveData - Reference to data for one of the coordinates of a curve.
indMin - Lower bound of the index interval for the data array in curveData.
indMax - Upper bound of the index interval for the data array in curveData.

getOrientation

public int getOrientation()
Return the orientation of the axis (VERTICAL or HORIZONTAL).


getMin

public double getMin()
Return the axis minimum value.


setMin

public void setMin(double min)
Set the axis minimum value. Also update index minimum for every curve. Notify property-change listeners (property "Min").

Parameters:
min - New value for axis minimum.

setMin

public void setMin(double min,
                   boolean notify)
Set the axis minimum value. Also update index minimum for every curve.

Parameters:
min - New value for axis minimum.
notify - Whether to notify property-change listeners (property "Min");

getMax

public double getMax()
Return the axis maximum value.


setMax

public void setMax(double max)
Set the axis maximum value. Also update index maximum for every curve. Notify property-change listeners (property "Max").

Parameters:
max - New value for axis maximum.

setMax

public void setMax(double max,
                   boolean notify)
Set the axis maximum value. Also update index maximum for every curve.

Parameters:
max - New value for axis maximum.
notify - Whether to notify property-change listeners (property "Max").

getFixedMin

public boolean getFixedMin()
Return whether or not the axis minimum value should be fixed (not automatically updated when axisData are changed).


setFixedMin

public void setFixedMin(boolean fixedMin)
Set whether or not the axis minimum value should be fixed (not automatically updated when axisData are changed). Notify property-change listeners (property "FixedMin").


setFixedMin

public void setFixedMin(boolean fixedMin,
                        boolean notify)
Set whether or not the axis minimum value should be fixed (not automatically updated when axisData are changed).

Parameters:
notify - Whether to notify property-change listeners (property "FixedMin").

getFixedMax

public boolean getFixedMax()
Return whether or not the axis maximum value should be fixed (not automatically updated when axisData are changed).


setFixedMax

public void setFixedMax(boolean fixedMax)
Set whether or not the axis maximum value should be fixed (not automatically updated when axisData are changed). Notify property-change listeners (property "FixedMax").


setFixedMax

public void setFixedMax(boolean fixedMax,
                        boolean notify)
Set whether or not the axis maximum value should be fixed (not automatically updated when axisData are changed).

Parameters:
notify - Whether to notify property-change listeners (property "FixedMax").

getPaintGrid

public boolean getPaintGrid()
Return whether or not to draw the grid.


setPaintGrid

public void setPaintGrid(boolean paintGrid)
Set whether or not to draw the grid.


getPaintMajorTicks

public boolean getPaintMajorTicks()
Return whether or not to draw major tickmarks.


setPaintMajorTicks

public void setPaintMajorTicks(boolean paintTicks)
Set whether or not to draw major tickmarks.


getMajorTickSpacing

public double getMajorTickSpacing()
Return spacing between major tickmarks.


setMajorTickSpacing

public void setMajorTickSpacing(double spacing)
Set spacing between major tickmarks.


getPaintTickLabels

public boolean getPaintTickLabels()
Return whether or not to draw labels at the major tickmarks.


setPaintTickLabels

public void setPaintTickLabels(boolean paintLabels)
Set whether or not to draw labels at the major tickmarks.


setLabelTable

public void setLabelTable(java.util.Dictionary table)
Set the lables to be drawn for the major tickmarks. Not implemented.


getColor

public java.awt.Color getColor()
Return the color of this axis (including axis line, tick marks, tick labels and axis label).


setColor

public void setColor(java.awt.Color color)
Set the color of this axis (including axis line, tick marks, tick labels and axis label).


getAxisLabel

public Axis.AxisLabel getAxisLabel()
Return the AxisLabel child object.


getMajorTicks

public Axis.MajorTicks getMajorTicks()
Return the MajorTicks child object.


getTickLabels

public Axis.TickLabels getTickLabels()
Return the TickLabels child object.


getAutomaticBottomMargin

public boolean getAutomaticBottomMargin()
Return whether or not to automatically leave some space between curve and axis, at the lower end of the axis.


setAutomaticBottomMargin

public void setAutomaticBottomMargin(boolean set)
Set whether or not to automatically leave some space between curve and axis, at the lower end of the axis. Turns off manual margin.


getAutomaticTopMargin

public boolean getAutomaticTopMargin()
Return whether or not to automatically leave some space between curve and axis, at the higher end of the axis.


setAutomaticTopMargin

public void setAutomaticTopMargin(boolean set)
Set whether or not to automatically leave some space between curve and axis, at the higher end of the axis. Turns off manual margin.


getManualBottomMargin

public boolean getManualBottomMargin()
Return whether or not to manually leave some space between curve and axis, at the lower end of the axis.


setManualBottomMargin

public void setManualBottomMargin(boolean set)
Set whether or not to manually leave some space between curve and axis, at the lower end of the axis. Turns off automatic margin.


getManualTopMargin

public boolean getManualTopMargin()
Return whether or not to manually leave some space between curve and axis, at the higher end of the axis.


setManualTopMargin

public void setManualTopMargin(boolean set)
Set whether or not to manually leave some space between curve and axis, at the higher end of the axis. Turns off automatic margin.


setBottomMargin

public void setBottomMargin(double margin)
Set size of bottom margin. Results in manual margin on, automatic margin off.


setTopMargin

public void setTopMargin(double margin)
Set size of top margin. Results in manual margin on, automatic margin off.