Interface IAxis

All Known Implementing Classes:
AspectAxis

public interface IAxis
Interface used to define an axis on the graph (multiple x and y are allowed). You can get an IAxis by using IPlottingSystem.createAxis(...) then you can configure the axis as desired, for instance setLog10(...)
  • Method Details

    • getTitle

      String getTitle()
      Returns:
    • setTitle

      void setTitle(String title)
      Parameters:
      title -
    • setTitleFont

      void setTitleFont(org.eclipse.swt.graphics.Font titleFont)
      Parameters:
      titleFont -
    • getTitleFont

      org.eclipse.swt.graphics.Font getTitleFont()
      Returns:
    • isPrimaryAxis

      boolean isPrimaryAxis()
      Returns:
      true if axis is a primary one that cannot be deleted.
    • isLog10

      boolean isLog10()
      Returns:
    • setLog10

      void setLog10(boolean isLog10)
      Parameters:
      isLog10 -
    • setForegroundColor

      void setForegroundColor(org.eclipse.swt.graphics.Color color)
      Parameters:
      color -
    • getForegroundColor

      org.eclipse.swt.graphics.Color getForegroundColor()
      Returns:
    • setBackgroundColor

      void setBackgroundColor(org.eclipse.swt.graphics.Color color)
      Parameters:
      color -
    • getBackgroundColor

      org.eclipse.swt.graphics.Color getBackgroundColor()
      Returns:
    • isShowMajorGrid

      boolean isShowMajorGrid()
      Returns:
    • setShowMajorGrid

      void setShowMajorGrid(boolean showMajorGrid)
      Parameters:
      showMajorGrid -
    • isShowMinorGrid

      boolean isShowMinorGrid()
      Returns:
    • setShowMinorGrid

      void setShowMinorGrid(boolean showMinorGrid)
      Parameters:
      showMinorGrid -
    • getMajorGridColor

      org.eclipse.swt.graphics.Color getMajorGridColor()
      Returns:
    • setMajorGridColor

      void setMajorGridColor(org.eclipse.swt.graphics.Color majorGridColor)
      Parameters:
      majorGridColor -
    • getMinorGridColor

      org.eclipse.swt.graphics.Color getMinorGridColor()
      Returns:
    • setMinorGridColor

      void setMinorGridColor(org.eclipse.swt.graphics.Color minorGridColor)
      Parameters:
      minorGridColor -
    • getFormatPattern

      String getFormatPattern()
      NumberFormat pattern for axis
      Returns:
    • setFormatPattern

      void setFormatPattern(String formatPattern)
      NumberFormat pattern for axis
      Parameters:
      formatPattern -
    • isYAxis

      boolean isYAxis()
      Returns:
    • setYAxis

      void setYAxis(boolean isYAxis)
      Parameters:
      isYAxis -
    • setVisible

      void setVisible(boolean b)
      Parameters:
      b -
    • isVisible

      boolean isVisible()
      Returns:
    • getUpper

      double getUpper()
      returns the upper bound in the units of the axis (not pixels)
    • getLower

      double getLower()
      returns the lower bound in the units of the axis (not pixels)
    • setRange

      void setRange(double start, double end)
      Sets the range of the axis, start maybe > end for reversed axes.
      Parameters:
      start -
      end -
    • addAxisListener

      void addAxisListener(IAxisListener listener)
      Add a listener notified when the axis changes.
      Parameters:
      listener -
    • removeAxisListener

      void removeAxisListener(IAxisListener listener)
      Add a listener notified when the axis changes.
      Parameters:
      listener -
    • setDateFormatEnabled

      void setDateFormatEnabled(boolean dateEnabled)
      Sets if the date format should be formatting this axis.
      Parameters:
      dateEnabled -
    • isDateFormatEnabled

      boolean isDateFormatEnabled()
      Returns:
      true if in date/time mode, false normally.
    • getValuePosition

      int getValuePosition(double value)
      The position in pixels of a given value.
      Parameters:
      value -
      Returns:
      position
    • getPositionValue

      double getPositionValue(int position)
      The value for a position in pixels.
      Parameters:
      position -
      Returns:
      value
    • getValueFromPosition

      double getValueFromPosition(double position)
      The value for a position in pixels.
      Parameters:
      position -
      Returns:
    • getPositionFromValue

      double getPositionFromValue(double value)
      The position in pixels of a given value.
      Parameters:
      value -
      Returns:
    • setLabelDataAndTitle

      void setLabelDataAndTitle(org.eclipse.january.dataset.IDataset labels)
      Sets an alternative dataset to use for the labels and the title
      Parameters:
      labels -
    • setMaximumRange

      void setMaximumRange(double lower, double upper)
      Call to set a maximum range for the axis
    • format

      String format(Object value)
      Parameters:
      value -
      Returns:
      the number (usually Double) formatted to the current format
    • format

      String format(Object value, int extraDP)
      Parameters:
      value -
      extraDP - extra decimal places
      Returns:
      the number (usually Double) formatted to the current format
    • getScaling

      double getScaling()
      Returns:
      scaling of axis in terms of pixels/unit
    • setAutoFormat

      void setAutoFormat(boolean autoFormat)
      Parameters:
      set - whether axis label is automatically formatted or set by the user
    • isAutoFormat

      boolean isAutoFormat()
      Returns:
      true if axis format is done automatically, false if user format is to be used
    • setAutoscale

      void setAutoscale(boolean autoscale)
      Parameters:
      set - whether to autoscale
    • setAxisAutoscaleTight

      void setAxisAutoscaleTight(boolean axisTight)
      Parameters:
      set - whether autoscale sets axis range tight to the data or the end of axis is set to the nearest tickmark
    • isAxisAutoscaleTight

      boolean isAxisAutoscaleTight()
      Returns:
      true if autoscaling axis is tight to displayed data
    • setInverted

      void setInverted(boolean isInverted)
      Parameters:
      set - whether axis is inverted
    • isInverted

      boolean isInverted()
      Returns:
      true if axis is inverted