Interface ILineTrace

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

public interface ILineTrace extends ITrace
Line trace is used for all 1D trace data. So as well as lines, it is used for histogram data. You can transform lines to histograms using the setTraceType method.
  • Method Details

    • getErrorBarWidth

      int getErrorBarWidth()
    • setErrorBarWidth

      void setErrorBarWidth(int errorBarCapWidth)
      The size of the error bar in pixels not real coordinates.
      Parameters:
      errorBarCapWidth -
    • getTraceColor

      org.eclipse.swt.graphics.Color getTraceColor()
    • setTraceColor

      void setTraceColor(org.eclipse.swt.graphics.Color traceColor)
      The Color of the trace
      Parameters:
      traceColor -
    • getTraceType

      ILineTrace.TraceType getTraceType()
    • setTraceType

      void setTraceType(ILineTrace.TraceType traceType)
      Set TraceType. For instance change to a bar plot by calling this.
      Parameters:
      traceType -
    • getPointStyle

      ILineTrace.PointStyle getPointStyle()
    • setPointStyle

      void setPointStyle(ILineTrace.PointStyle pointStyle)
      The style of points if plotted by the trace.
      Parameters:
      pointStyle -
    • getLineWidth

      int getLineWidth()
    • setLineWidth

      void setLineWidth(int lineWidth)
      The width of line plotted, if trace is a line plot.
      Parameters:
      lineWidth -
    • getPointSize

      int getPointSize()
    • setPointSize

      void setPointSize(int pointSize)
      The size of points plotted if Trace is a Line type.
      Parameters:
      pointSize -
    • getAreaAlpha

      int getAreaAlpha()
    • setAreaAlpha

      void setAreaAlpha(int areaAlpha)
      The transparency of areas draw by the trace (for instance in HISTO trace type or FILL trace type).
      Parameters:
      areaAlpha -
    • isAntiAliasing

      boolean isAntiAliasing()
    • setAntiAliasing

      void setAntiAliasing(boolean antiAliasing)
      Turn on anti-aliasing of 1D plots here. No effect on images.
      Parameters:
      antiAliasing -
    • isErrorBarEnabled

      boolean isErrorBarEnabled()
    • setErrorBarEnabled

      void setErrorBarEnabled(boolean errorBarEnabled)
      For 1D traces
      Parameters:
      errorBarEnabled -
    • getYErrorBarType

      ILineTrace.ErrorBarType getYErrorBarType()
    • setYErrorBarType

      void setYErrorBarType(ILineTrace.ErrorBarType errorBarType)
      If showing error bars, sets the y error bar type. Use setErrorBarEnabled(...) to start showing the error bars.
      Parameters:
      errorBarType -
    • getXErrorBarType

      ILineTrace.ErrorBarType getXErrorBarType()
    • setXErrorBarType

      void setXErrorBarType(ILineTrace.ErrorBarType errorBarType)
      If showing error bars, sets the y error bar type. Use setErrorBarEnabled(...) to start showing the error bars.
      Parameters:
      errorBarType -
    • getErrorBarColor

      org.eclipse.swt.graphics.Color getErrorBarColor()
    • setErrorBarColor

      void setErrorBarColor(org.eclipse.swt.graphics.Color errorBarColor)
      Color of error bars.
      Parameters:
      errorBarColor -
    • getYData

      org.eclipse.january.dataset.IDataset getYData()
      The Y data of the plot, considered as the main data as the x-data might often be indices of y.
      Returns:
    • getXData

      org.eclipse.january.dataset.IDataset getXData()
      The x data of the plot - might often be indices of y.
      Returns:
    • setData

      void setData(org.eclipse.january.dataset.IDataset xData, org.eclipse.january.dataset.IDataset yData)
      Set the yData for the trace, replaces old yData Repaint may be required as the system does not assume you want to repaint right away. If the yData is an instance of IErrorDataset the method getError will be called. If this is non-null then error bars will be switched on (unless they have been explicitly turned off with setErrorBarEnabled(false))
      Parameters:
      yData -
    • repaint

      void repaint()
      May be called to refresh the whole graph, for instance if you change trace color, you may need to repaint the legend.
    • getXAxis

      IAxis getXAxis()
      Returns:
      The x-axis which this trace is being drawn with
    • getYAxis

      IAxis getYAxis()
      Returns:
      The y-axis which this trace is being drawn with
    • setDrawYErrorInArea

      void setDrawYErrorInArea(boolean drawYErrorInArea)
      Set the Y error to draw as an area instead of discrete points
      Parameters:
      drawYErrorInArea -
    • isDrawYErrorInArea

      boolean isDrawYErrorInArea()
      Return if the Y error is set to draw as an area instead of discrete points
      Returns: