Class TraceUtils
java.lang.Object
org.eclipse.dawnsci.plotting.api.trace.TraceUtils
Class containing utility methods for regions to avoid duplication
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetUniqueTrace(String nameStub, IPlottingSystem<?> system, String... usedNames) Call to get a unique region namestatic booleanisAxisCustom(org.eclipse.january.dataset.IDataset axis, int length) Determine if axis is customstatic booleanDetermine if given IImageTrace has any custom axesstatic final ILineTracereplaceCreateLineTrace(IPlottingSystem<?> system, String name) Removes a trace of this name if it is already there.static final voidtransform(boolean interpolate, org.eclipse.january.dataset.Dataset label, int index, double[]... points) static final voidtransform(boolean interpolate, org.eclipse.january.dataset.Dataset label, int index, double[] point, double[] newPoint) static final voidtransform(boolean interpolate, org.eclipse.january.dataset.Dataset label, int index, double[] pointA, double[] pointB, double[] newPointA, double[] newPointB)
-
Method Details
-
getUniqueTrace
public static String getUniqueTrace(String nameStub, IPlottingSystem<?> system, String... usedNames) Call to get a unique region name- Parameters:
nameStub-system-- Returns:
-
replaceCreateLineTrace
Removes a trace of this name if it is already there.- Parameters:
plottingSystem-string-- Returns:
-
isCustomAxes
Determine if given IImageTrace has any custom axes- Parameters:
trace-- Returns:
- true if it does have custom axes
-
isAxisCustom
public static boolean isAxisCustom(org.eclipse.january.dataset.IDataset axis, int length) Determine if axis is custom- Parameters:
axis- dataset of axis valueslength- number of axis values- Returns:
- true if it is custom
-
transform
public static final void transform(boolean interpolate, org.eclipse.january.dataset.Dataset label, int index, double[] point, double[] newPoint) -
transform
public static final void transform(boolean interpolate, org.eclipse.january.dataset.Dataset label, int index, double[] pointA, double[] pointB, double[] newPointA, double[] newPointB) -
transform
public static final void transform(boolean interpolate, org.eclipse.january.dataset.Dataset label, int index, double[]... points)
-