Interface IVectorTrace

All Superinterfaces:
org.eclipse.january.INameable, ITrace
All Known Implementing Classes:
VectorTrace

public interface IVectorTrace extends ITrace
A vector trace can be added to a 1D or 2D plot to show a vector map over the top. It requires a 3D dataset where the first two coordinates are the position in x and y and the third coordinate is a size two argument. This represents a magnitude and angle (anti-clockwise from 12 O'Clock) in radians for the vector arrow.
  • Method Details

    • setArrowConfiguration

      void setArrowConfiguration(IVectorTrace.ArrowConfiguration arrowPosition)
      Set the way the arrow pointing should be done.
      Parameters:
      arrowPosition -
    • getArrowConfiguration

      IVectorTrace.ArrowConfiguration getArrowConfiguration()
      Get the way the arrow pointing should be done.
      Parameters:
      arrowPosition -
    • setMaximumArrowSize

      void setMaximumArrowSize(int screenPixels)
      The maximum size of the arrow in screen pixels. Default is 20.
      Parameters:
      screenPixels -
    • getMaximumArrowSize

      int getMaximumArrowSize()
      The maximum size of the arrow in screen pixels. Default is 20.
      Parameters:
      screenPixels -
    • setArrowColor

      void setArrowColor(int... rgb)
      Set the rgb values for the arrow color. By default the arrow is drawn black.
      Parameters:
      rgb -
    • getArrowColor

      int[] getArrowColor()
      Get the rgb values for the arrow color. By default the arrow is drawn black.
      Parameters:
      rgb -
    • setArrowPalette

      void setArrowPalette(org.eclipse.swt.graphics.PaletteData jet)
      Instead of a fixed color the arrow may use a palette. If the palette is set the arrowColor is ignored providing the ArrowHistogram has been set to a non-fixed type.
      Parameters:
      jet -
    • getArrowPalette

      org.eclipse.swt.graphics.PaletteData getArrowPalette()
      Instead of a fixed color the arrow may use a palette. If the palette is set the arrowColor is ignored providing the ArrowHistogram has been set to a non-fixed type.
    • setCircleColor

      void setCircleColor(int... rgb)
      Set the rgb values for the circle color. By default the circle is drawn black.
      Parameters:
      rgb -
    • getCircleColor

      int[] getCircleColor()
      Get the rgb values for the circle color. By default the circle is drawn black.
      Parameters:
      rgb -
    • setData

      boolean setData(org.eclipse.january.dataset.IDataset vectors, List<org.eclipse.january.dataset.IDataset> axes)
      Call to set image data
      Parameters:
      vectors - a 3D dataset [x,y,2] where the first two coordinates are the position in x and y and the third coordinate is a size two argument. This represents a magnitude and angle for the vector arrow.
      axes - or null.
      Returns:
      false if could not set data
    • getAxes

      List<org.eclipse.january.dataset.IDataset> getAxes()
      Returns:
      the axes used to look up the position which the vector should be drawn.
    • repaint

      void repaint()
      Call to redraw the image, normally the same as repaint on Figure.
    • setVectorNormalization

      void setVectorNormalization(IVectorTrace.VectorNormalization type)
      Used when the values of the vectors are normalized to the maximum arrow size.
      Parameters:
      type -
    • getVectorNormalization

      IVectorTrace.VectorNormalization getVectorNormalization()
      Used when the values of the vectors are normalized to the maximum arrow size.
      Returns:
      VectorNormalizationType
    • getArrowHistogram

      IVectorTrace.ArrowHistogram getArrowHistogram()
      How to color the arrows
      Returns:
    • setArrowHistogram

      void setArrowHistogram(IVectorTrace.ArrowHistogram arrowHistogram)
      How to color the arrows
    • getPercentageThreshold

      double[] getPercentageThreshold()
      Get the percentage threshold for clipping outliers in the magnitude
      Returns:
      percentages
    • setPercentageThreshold

      void setPercentageThreshold(double[] percentageThreshold)
      Set the percentage threshold for clipping outliers in the magnitude
    • isRadians

      boolean isRadians()
      Is direction data in radians
      Returns:
    • setRadians

      void setRadians(boolean isRadians)
      Set whether the direction data is radians (false for degrees)
      Parameters:
      isRadians -