Class XYDisplay

Direct Known Subclasses:
HovmollerDisplay, TimeHeightDisplay, XSDisplay

public class XYDisplay extends DisplayMaster
A wrapper for a 2D display for XY plots of data
Version:
$Revision: 1.25 $
Author:
Don Murray
  • Constructor Details

    • XYDisplay

      public XYDisplay() throws VisADException, RemoteException
      Constuctor for display with RealType.XAxis mapped to Display.XAxis and RealType.YAxis mapped to Display.YAxis and a default name.
      Throws:
      VisADException - some VisAD error
      RemoteException - a remote error
    • XYDisplay

      public XYDisplay(String name) throws VisADException, RemoteException
      Constuctor for display with RealType.XAxis mapped to Display.XAxis and RealType.YAxis mapped to Display.YAxis and the specified name.
      Parameters:
      name - name for the display
      Throws:
      VisADException - some VisAD error
      RemoteException - a remote error
    • XYDisplay

      public XYDisplay(boolean offscreen, Dimension dimension) throws VisADException, RemoteException
      Constuctor for display with RealType.XAxis mapped to Display.XAxis and RealType.YAxis mapped to Display.YAxis and the specified offscreen.
      Parameters:
      offscreen - is this display offscreen
      dimension - size of display for off screen rendering. May be null.
      Throws:
      VisADException - some VisAD error
      RemoteException - a remote error
    • XYDisplay

      public XYDisplay(String name, RealType xAxisType, RealType yAxisType) throws VisADException, RemoteException
      Constructor with RealTypes for the X and Y axes and the given name.
      Parameters:
      name - name for the display
      xAxisType - a RealType for ScalarMap(yAxisType, Display.XAxis)
      yAxisType - a RealType for ScalarMap(xAxisType, Display.YAxis)
      Throws:
      VisADException - some VisAD error
      RemoteException - a remote error
    • XYDisplay

      public XYDisplay(String name, RealType xAxisType, RealType yAxisType, boolean offScreen, Dimension dimension) throws VisADException, RemoteException
      Constructor with RealTypes for the X and Y axes and the given name.
      Parameters:
      name - name for the display
      xAxisType - a RealType for ScalarMap(yAxisType, Display.XAxis)
      yAxisType - a RealType for ScalarMap(xAxisType, Display.YAxis)
      offScreen - is this display offscreen
      dimension - size of display for off screen rendering. May be null.
      Throws:
      VisADException - some VisAD error
      RemoteException - a remote error
  • Method Details

    • setXAxisType

      public void setXAxisType(RealType xType) throws VisADException, RemoteException
      Change the mapping for the XAxis.
      Parameters:
      xType - new RealType for ScalarMap
      Throws:
      VisADException - some VisAD error
      RemoteException - a remote error
    • setYAxisType

      public void setYAxisType(RealType yType) throws VisADException, RemoteException
      Change the mapping for the YAxis.
      Parameters:
      yType - new RealType for ScalarMap
      Throws:
      VisADException - some VisAD error
      RemoteException - a remote error
    • getXAxisType

      public RealType getXAxisType()
      Get the mapping for the XAxis.
      Returns:
      RealType for X axis ScalarMap
    • getYAxisType

      public RealType getYAxisType()
      Get the mapping for the YAxis.
      Returns:
      RealType for Y axis ScalarMap
    • setAxisTypes

      public void setAxisTypes(RealType xType, RealType yType) throws VisADException, RemoteException
      Change the mapping for both axes
      Parameters:
      xType - new RealType for X axis ScalarMap
      yType - new RealType for Y axis ScalarMap
      Throws:
      VisADException - some VisAD error
      RemoteException - a remote error
    • getXAxisScale

      public AxisScale getXAxisScale()
      Get the AxisScale associated with the X axis.
      Returns:
      X AxisScale
    • getYAxisScale

      public AxisScale getYAxisScale()
      Get the AxisScale associated with the Y axis.
      Returns:
      X AxisScale
    • showAxisScales

      public void showAxisScales(boolean show)
      Show the scale on both axes.
      Parameters:
      show - true to show
    • setXRange

      public void setXRange(double min, double max)
      Set the range of displayed values on the X axis
      Parameters:
      min - minimum value for axis
      max - maximum value for axis
    • setYRange

      public void setYRange(double min, double max)
      Set the range of displayed values on the Y axis
      Parameters:
      min - minimum value for axis
      max - maximum value for axis
    • autoScaleXAxis

      public void autoScaleXAxis()
      Let the XAxis autoscale.
    • autoScaleYAxis

      public void autoScaleYAxis()
      Let the YAxis autoscale.
    • setXDisplayUnit

      public void setXDisplayUnit(Unit newUnit)
      Set the units of displayed values on the X axis
      Parameters:
      newUnit - units to use
    • setYDisplayUnit

      public void setYDisplayUnit(Unit newUnit)
      Set the units of displayed values on the Y axis
      Parameters:
      newUnit - units to use
    • getXDisplayUnit

      public Unit getXDisplayUnit()
      Get the units of displayed values on the X axis
      Returns:
      axis units
    • getYDisplayUnit

      public Unit getYDisplayUnit()
      Get the units of displayed values on the Y axis
      Returns:
      axis units
    • setAspect

      public void setAspect(double x, double y)
      Set the aspect ratio of the axes
      Parameters:
      x - X axis ratio
      y - Y axis ratio
    • getName

      public String getName()
      Get the name given to this display.
      Returns:
      name of display.
    • setName

      public void setName(String newName)
      Set the name of this display.
      Parameters:
      newName - new name of display.
    • enableClipping

      public void enableClipping(boolean clip)
      Enable clipping of data at the box edges.
      Parameters:
      clip - true to turn clipping on, otherwise off
    • setGridLinesVisible

      public void setGridLinesVisible(boolean yesorno)
      Set the grid lines visible
      Parameters:
      yesorno - true to be visible
    • getGridLinesVisible

      public boolean getGridLinesVisible()
      Get whether the grid lines are visible
      Returns:
      true if visible