Package jisa.gui
Interface Series
-
- All Known Subinterfaces:
SeriesGroup
- All Known Implementing Classes:
JISASeries
public interface Series
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Series.Dash
static class
Series.Ordering
static interface
Series.SeriesFitter
static interface
Series.SeriesFormatter
static class
Series.Shape
-
Field Summary
Fields Modifier and Type Field Description static javafx.scene.paint.Color[]
defaultColours
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Series
addPoint(double x, double y)
Manually add a data-point, without an error-bar, to the series.default Series
addPoint(double x, double y, double errorY)
Series
addPoint(double x, double y, double errorX, double errorY)
default Series
addPoints(java.lang.Iterable<? extends java.lang.Number> x, java.lang.Iterable<? extends java.lang.Number> y, java.lang.Iterable<? extends java.lang.Number> eY)
default Series
addPoints(java.lang.Iterable<? extends java.lang.Number> x, java.lang.Iterable<? extends java.lang.Number> y, java.lang.Iterable<? extends java.lang.Number> eX, java.lang.Iterable<? extends java.lang.Number> eY)
default Series
addPoints(java.lang.Iterable<java.lang.Double> x, java.lang.Iterable<java.lang.Double> y)
default Series
addPoints(Matrix<java.lang.Double> data)
Series
clear()
Remove all points from this series.default Series
disableAutoReduction()
Disables any automatic point-reduction set usingsetAutoReduction()
.default Series
disableXAutoRemove()
Disables any automatic point reduction set bysetXAutoRemove()
.default Series
disableYAutoRemove()
Disables any automatic point reduction set bysetYAutoRemove()
.Series
filter(java.util.function.Predicate<Row> filter)
Set a true/false test to filter data by, only plotting rows from the ResultTable that return true when tested.Series
fit(Series.SeriesFitter fitter)
javafx.scene.paint.Color
getColour()
Returns the colour being used to represent this series.javafx.collections.ObservableList<? extends de.gsi.dataset.DataSet>
getDatasets()
Returns the unboxed JavaFx representation of this series.javafx.scene.paint.Color
getErrorColour()
Returns the colour being used to represent errors in this series.double
getErrorLineWidth()
Returns line-width used when drawing lines for error bars on this series.Fit
getFit()
Returns the fit being used to draw the fitted curve to the data currently.int
getLimit()
Series.Dash
getLineDash()
Returns the dash type used for drawing the line for this series.double
getLineWidth()
Returns line-width used when drawing the line for this series.Series.Shape
getMarkerShape()
Returns the marker shape currently being used by this series.double
getMarkerSize()
Returns the marker size being used for this series.java.lang.String
getName()
Returns the name of the series.Series.Ordering
getPointOrdering()
ResultTable
getWatched()
Returns which, if any, ResultTable is currently being watched by this series.boolean
isFitted()
Returns whether the data is currently being fitted.boolean
isLineVisible()
Returns whether the series line is visible or not.boolean
isMarkerVisible()
Returns whether markers are being shown at each data point or not in this series.default Series
polyFit(int order)
Series
reduceNow()
Forces the automatic point-reduction to happen now.Series
remove()
Removes this series from its plot.Series
removeFit()
Series
removePoint(int index)
Series
removePoints(int from, int to)
Series
setAutoReduction(int reduceTo, int limit)
Sets the series to automatically reduce the number of data points to the specified number when exceeding the specified limit.Series
setColour(javafx.scene.paint.Color colour)
Sets the colour used to represent this series.Series
setColourSequence(javafx.scene.paint.Color... colours)
Sets the sequence of colours to use when auto-generating sub-series (for example, when split() is called).Series
setErrorColour(javafx.scene.paint.Color colour)
Sets the colour used to represent errors in this series.Series
setErrorLineWidth(double width)
Sets the line-width used for drawing lines for error bars on this series.Series
setLimit(int count)
Instructs the Series to only plot the last N points added to it.Series
setLineDash(Series.Dash dash)
Sets the dash type for the line of this series.Series
setLineVisible(boolean show)
Sets whether to show the line of this series.Series
setLineWidth(double width)
Sets the line-width used for drawing the line for this series.Series
setMarkerShape(Series.Shape shape)
Sets the marker shape to use for this series.Series
setMarkerSize(double size)
Sets the marker size to use for this series.Series
setMarkerVisible(boolean show)
Sets whether a marker should be placed at each data point in this series or not.Series
setName(java.lang.String name)
Sets the name of the series.Series
setPointOrder(Series.Ordering order)
Series
setXAutoRemove(double range)
Sets the range below the greatest x-value that outside of which points are automatically removed.Series
setYAutoRemove(double range)
Sets the range below the greatest y-value that outside of which points are automatically removed.default Series
split(Column<?> column)
Cause the series to automatically split into a set of sub-series based on a value in each result.default Series
split(Column<?> column, java.lang.String pattern)
Cause the series to automatically split into a set of sub-series based on a value in each result.default Series
split(RowEvaluable<?> splitBy)
Cause the series to automatically split into a set of sub-series based on a value in each result.default Series
split(RowEvaluable<?> splitBy, java.lang.String pattern)
Cause the series to automatically split into a set of sub-series based on a value in each result.Series
split(RowEvaluable<?> splitBy, Series.SeriesFormatter pattern)
Cause the series to automatically split into a set of sub-series based on a value in each result.default Series
watch(ResultTable table, Column<? extends java.lang.Number> xData, Column<? extends java.lang.Number> yData)
Watch the specified ResultTable object, plotting points without error-bars based on the specified x and y values.default Series
watch(ResultTable table, Column<? extends java.lang.Number> xData, Column<? extends java.lang.Number> yData, Column<? extends java.lang.Number> eYData)
Watch the specified ResultTable object, plotting points with error-bars based on the specified x,y and error values.default Series
watch(ResultTable table, Column<? extends java.lang.Number> xData, Column<? extends java.lang.Number> yData, Column<? extends java.lang.Number> eXData, Column<? extends java.lang.Number> eYData)
default Series
watch(ResultTable table, RowEvaluable<? extends java.lang.Number> xData, RowEvaluable<? extends java.lang.Number> yData, RowEvaluable<? extends java.lang.Number> eYData)
Series
watch(ResultTable table, RowEvaluable<? extends java.lang.Number> xData, RowEvaluable<? extends java.lang.Number> yData, RowEvaluable<? extends java.lang.Number> eXData, RowEvaluable<? extends java.lang.Number> eYData)
default Series
watch(ResultTable table, RowEvaluable xData, RowEvaluable yData)
Watch the specified ResultTable object, plotting points without error-bars based on the specified x and y values.
-
-
-
Method Detail
-
watch
Series watch(ResultTable table, RowEvaluable<? extends java.lang.Number> xData, RowEvaluable<? extends java.lang.Number> yData, RowEvaluable<? extends java.lang.Number> eXData, RowEvaluable<? extends java.lang.Number> eYData)
-
watch
default Series watch(ResultTable table, RowEvaluable<? extends java.lang.Number> xData, RowEvaluable<? extends java.lang.Number> yData, RowEvaluable<? extends java.lang.Number> eYData)
-
watch
default Series watch(ResultTable table, RowEvaluable xData, RowEvaluable yData)
Watch the specified ResultTable object, plotting points without error-bars based on the specified x and y values.- Parameters:
table
- ResultTable to watchxData
- Lambda representing the x-data to plotyData
- Lambda representing the y-data to plot- Returns:
- Self-reference
-
watch
default Series watch(ResultTable table, Column<? extends java.lang.Number> xData, Column<? extends java.lang.Number> yData, Column<? extends java.lang.Number> eYData)
Watch the specified ResultTable object, plotting points with error-bars based on the specified x,y and error values.- Parameters:
table
- ResultTable to watchxData
- Index representing the x-data to plotyData
- Index representing the y-data to ploteData
- Index representing the error-bar data- Returns:
- Self-reference
-
watch
default Series watch(ResultTable table, Column<? extends java.lang.Number> xData, Column<? extends java.lang.Number> yData, Column<? extends java.lang.Number> eXData, Column<? extends java.lang.Number> eYData)
-
watch
default Series watch(ResultTable table, Column<? extends java.lang.Number> xData, Column<? extends java.lang.Number> yData)
Watch the specified ResultTable object, plotting points without error-bars based on the specified x and y values.- Parameters:
table
- ResultTable to watchxData
- Index representing the x-data to plotyData
- Index representing the y-data to plot- Returns:
- Self-reference
-
setLimit
Series setLimit(int count)
Instructs the Series to only plot the last N points added to it. A value of 0 indicates no limit.- Parameters:
count
- The maximum number of plots to point.- Returns:
- Self-reference
-
getLimit
int getLimit()
-
split
Series split(RowEvaluable<?> splitBy, Series.SeriesFormatter pattern)
Cause the series to automatically split into a set of sub-series based on a value in each result.- Parameters:
splitBy
- Lambda representing the value to split bypattern
- Lambda that returns the name of each series- Returns:
- Self-reference
-
split
default Series split(RowEvaluable<?> splitBy, java.lang.String pattern)
Cause the series to automatically split into a set of sub-series based on a value in each result.- Parameters:
splitBy
- Lambda representing the value to split bypattern
- String formatting pattern for the split value to use as the name of each series- Returns:
- Self-reference
-
split
default Series split(RowEvaluable<?> splitBy)
Cause the series to automatically split into a set of sub-series based on a value in each result.- Parameters:
splitBy
- Lambda representing the value to split by- Returns:
- Self-reference
-
split
default Series split(Column<?> column, java.lang.String pattern)
Cause the series to automatically split into a set of sub-series based on a value in each result.- Parameters:
column
- Column to use for the splittingpattern
- String formatting pattern for the split value to use as the name of each series- Returns:
- Self-reference
-
split
default Series split(Column<?> column)
Cause the series to automatically split into a set of sub-series based on a value in each result.- Parameters:
column
- Column to use for the splitting- Returns:
- Self-reference
-
getWatched
ResultTable getWatched()
Returns which, if any, ResultTable is currently being watched by this series.- Returns:
- ResultTable, null if none
-
filter
Series filter(java.util.function.Predicate<Row> filter)
Set a true/false test to filter data by, only plotting rows from the ResultTable that return true when tested.- Parameters:
filter
- true/false test- Returns:
- Self-reference
-
addPoint
Series addPoint(double x, double y, double errorX, double errorY)
-
removePoint
Series removePoint(int index)
-
removePoints
Series removePoints(int from, int to)
-
addPoint
default Series addPoint(double x, double y, double errorY)
-
addPoint
default Series addPoint(double x, double y)
Manually add a data-point, without an error-bar, to the series.- Parameters:
x
- x-valuey
- y-value- Returns:
- Self-reference
-
addPoints
default Series addPoints(java.lang.Iterable<java.lang.Double> x, java.lang.Iterable<java.lang.Double> y)
-
addPoints
default Series addPoints(java.lang.Iterable<? extends java.lang.Number> x, java.lang.Iterable<? extends java.lang.Number> y, java.lang.Iterable<? extends java.lang.Number> eX, java.lang.Iterable<? extends java.lang.Number> eY)
-
addPoints
default Series addPoints(java.lang.Iterable<? extends java.lang.Number> x, java.lang.Iterable<? extends java.lang.Number> y, java.lang.Iterable<? extends java.lang.Number> eY)
-
clear
Series clear()
Remove all points from this series.- Returns:
- Self-reference
-
setMarkerVisible
Series setMarkerVisible(boolean show)
Sets whether a marker should be placed at each data point in this series or not.- Parameters:
show
- Show markers?- Returns:
- Self-reference
-
isMarkerVisible
boolean isMarkerVisible()
Returns whether markers are being shown at each data point or not in this series.- Returns:
- Markers showing?
-
getMarkerShape
Series.Shape getMarkerShape()
Returns the marker shape currently being used by this series.- Returns:
- Maker shape being used
-
setMarkerShape
Series setMarkerShape(Series.Shape shape)
Sets the marker shape to use for this series.- Parameters:
shape
- Marker shape to use- Returns:
- Self-reference
-
getMarkerSize
double getMarkerSize()
Returns the marker size being used for this series.- Returns:
- Size
-
setMarkerSize
Series setMarkerSize(double size)
Sets the marker size to use for this series.- Parameters:
size
- Size- Returns:
- Self-reference
-
getName
java.lang.String getName()
Returns the name of the series.- Returns:
- Name
-
setName
Series setName(java.lang.String name)
Sets the name of the series.- Parameters:
name
- Name- Returns:
- Self-reference
-
getColour
javafx.scene.paint.Color getColour()
Returns the colour being used to represent this series.- Returns:
- Colour of series
-
setColour
Series setColour(javafx.scene.paint.Color colour)
Sets the colour used to represent this series.- Parameters:
colour
- Colour to use- Returns:
- Self-reference
-
getErrorColour
javafx.scene.paint.Color getErrorColour()
Returns the colour being used to represent errors in this series.- Returns:
- Colour of series
-
setErrorColour
Series setErrorColour(javafx.scene.paint.Color colour)
Sets the colour used to represent errors in this series.- Parameters:
colour
- Colour to use- Returns:
- Self-reference
-
setColourSequence
Series setColourSequence(javafx.scene.paint.Color... colours)
Sets the sequence of colours to use when auto-generating sub-series (for example, when split() is called).- Parameters:
colours
- The colours in order that they should be used.- Returns:
- Self-reference.
-
getLineWidth
double getLineWidth()
Returns line-width used when drawing the line for this series.- Returns:
- Line width, in pixels
-
setLineWidth
Series setLineWidth(double width)
Sets the line-width used for drawing the line for this series.- Parameters:
width
- Line width to use, in pixels- Returns:
- Self-reference
-
getErrorLineWidth
double getErrorLineWidth()
Returns line-width used when drawing lines for error bars on this series.- Returns:
- Line width, in pixels
-
setErrorLineWidth
Series setErrorLineWidth(double width)
Sets the line-width used for drawing lines for error bars on this series.- Parameters:
width
- Line width to use, in pixels- Returns:
- Self-reference
-
getLineDash
Series.Dash getLineDash()
Returns the dash type used for drawing the line for this series.- Returns:
- Dash type
-
setLineDash
Series setLineDash(Series.Dash dash)
Sets the dash type for the line of this series.- Parameters:
dash
- Dash type- Returns:
- Self-reference
-
setLineVisible
Series setLineVisible(boolean show)
Sets whether to show the line of this series.- Parameters:
show
- Line visible?- Returns:
- Self-reference
-
isLineVisible
boolean isLineVisible()
Returns whether the series line is visible or not.- Returns:
- Line visible?
-
setAutoReduction
Series setAutoReduction(int reduceTo, int limit)
Sets the series to automatically reduce the number of data points to the specified number when exceeding the specified limit.- Parameters:
reduceTo
- Number of points to reduce tolimit
- Limit at which reducing should occur- Returns:
- Self-reference
-
disableAutoReduction
default Series disableAutoReduction()
Disables any automatic point-reduction set usingsetAutoReduction()
.- Returns:
- Self-reference
-
reduceNow
Series reduceNow()
Forces the automatic point-reduction to happen now.- Returns:
- Self-reference
-
setXAutoRemove
Series setXAutoRemove(double range)
Sets the range below the greatest x-value that outside of which points are automatically removed.- Parameters:
range
- Range to use- Returns:
- Self-reference
-
setYAutoRemove
Series setYAutoRemove(double range)
Sets the range below the greatest y-value that outside of which points are automatically removed.- Parameters:
range
- Range to use- Returns:
- Self-reference
-
disableXAutoRemove
default Series disableXAutoRemove()
Disables any automatic point reduction set bysetXAutoRemove()
.- Returns:
- Self-reference
-
disableYAutoRemove
default Series disableYAutoRemove()
Disables any automatic point reduction set bysetYAutoRemove()
.- Returns:
- Self-reference
-
remove
Series remove()
Removes this series from its plot.- Returns:
- Self-reference
-
fit
Series fit(Series.SeriesFitter fitter)
-
polyFit
default Series polyFit(int order)
-
removeFit
Series removeFit()
-
getFit
Fit getFit()
Returns the fit being used to draw the fitted curve to the data currently.- Returns:
- Fit being used currently
-
isFitted
boolean isFitted()
Returns whether the data is currently being fitted.- Returns:
- Fitted?
-
setPointOrder
Series setPointOrder(Series.Ordering order)
-
getPointOrdering
Series.Ordering getPointOrdering()
-
getDatasets
javafx.collections.ObservableList<? extends de.gsi.dataset.DataSet> getDatasets()
Returns the unboxed JavaFx representation of this series.- Returns:
- JavaFx XYChart.Series object
-
-