Interface ILineTrace
- All Superinterfaces:
org.eclipse.january.INameable,ITrace
- All Known Implementing Classes:
LineTraceImpl
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionintorg.eclipse.swt.graphics.Colorintintintorg.eclipse.swt.graphics.ColorgetXAxis()org.eclipse.january.dataset.IDatasetgetXData()The x data of the plot - might often be indices of y.getYAxis()org.eclipse.january.dataset.IDatasetgetYData()The Y data of the plot, considered as the main data as the x-data might often be indices of y.booleanbooleanReturn if the Y error is set to draw as an area instead of discrete pointsbooleanvoidrepaint()May be called to refresh the whole graph, for instance if you change trace color, you may need to repaint the legend.voidsetAntiAliasing(boolean antiAliasing) Turn on anti-aliasing of 1D plots here.voidsetAreaAlpha(int areaAlpha) The transparency of areas draw by the trace (for instance in HISTO trace type or FILL trace type).voidsetData(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.voidsetDrawYErrorInArea(boolean drawYErrorInArea) Set the Y error to draw as an area instead of discrete pointsvoidsetErrorBarColor(org.eclipse.swt.graphics.Color errorBarColor) Color of error bars.voidsetErrorBarEnabled(boolean errorBarEnabled) For 1D tracesvoidsetErrorBarWidth(int errorBarCapWidth) The size of the error bar in pixels not real coordinates.voidsetLineWidth(int lineWidth) The width of line plotted, if trace is a line plot.voidsetPointSize(int pointSize) The size of points plotted if Trace is a Line type.voidsetPointStyle(ILineTrace.PointStyle pointStyle) The style of points if plotted by the trace.voidsetTraceColor(org.eclipse.swt.graphics.Color traceColor) The Color of the tracevoidsetTraceType(ILineTrace.TraceType traceType) Set TraceType.voidsetXErrorBarType(ILineTrace.ErrorBarType errorBarType) If showing error bars, sets the y error bar type.voidsetYErrorBarType(ILineTrace.ErrorBarType errorBarType) If showing error bars, sets the y error bar type.Methods inherited from interface org.eclipse.january.INameable
getName, setNameMethods inherited from interface org.eclipse.dawnsci.plotting.api.trace.ITrace
dispose, getData, getDataName, getRank, getUserObject, initialize, is3DTrace, isUserTrace, isVisible, setDataName, setUserObject, setUserTrace, setVisible
-
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
Set TraceType. For instance change to a bar plot by calling this.- Parameters:
traceType-
-
getPointStyle
ILineTrace.PointStyle getPointStyle() -
setPointStyle
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
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
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:
-