Package jisa.gui.plotting
Class JISASeries
- java.lang.Object
-
- jisa.gui.plotting.JISASeries
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
JISASeries.DataSetSelector
-
Nested classes/interfaces inherited from interface jisa.gui.Series
Series.Dash, Series.Ordering, Series.SeriesFitter, Series.SeriesFormatter, Series.Shape
-
-
Field Summary
-
Fields inherited from interface jisa.gui.Series
defaultColours
-
-
Constructor Summary
Constructors Constructor Description JISASeries(java.lang.String name, Plot plot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Series
addPoint(double x, double y, double errorX, double errorY)
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)
Series
clear()
Remove all points from this series.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<JISAErrorDataSet>
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.Series
reduceNow()
Forces the automatic point-reduction to happen now.protected void
regeneratePoints()
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.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.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.Series
watch(ResultTable table, Column<? extends java.lang.Number> xData, Column<? extends java.lang.Number> yData, Column<? extends java.lang.Number> eData)
Watch the specified ResultTable object, plotting points with error-bars based on the specified x,y and error values.Series
watch(ResultTable table, RowEvaluable<? extends java.lang.Number> x, RowEvaluable<? extends java.lang.Number> y, RowEvaluable<? extends java.lang.Number> eX, RowEvaluable<? extends java.lang.Number> eY)
-
-
-
Constructor Detail
-
JISASeries
public JISASeries(java.lang.String name, Plot plot)
-
-
Method Detail
-
watch
public Series watch(ResultTable table, RowEvaluable<? extends java.lang.Number> x, RowEvaluable<? extends java.lang.Number> y, RowEvaluable<? extends java.lang.Number> eX, RowEvaluable<? extends java.lang.Number> eY)
-
watch
public Series watch(ResultTable table, Column<? extends java.lang.Number> xData, Column<? extends java.lang.Number> yData)
Description copied from interface:Series
Watch the specified ResultTable object, plotting points without error-bars based on the specified x and y values.
-
setLimit
public Series setLimit(int count)
Description copied from interface:Series
Instructs the Series to only plot the last N points added to it. A value of 0 indicates no limit.
-
watch
public Series watch(ResultTable table, Column<? extends java.lang.Number> xData, Column<? extends java.lang.Number> yData, Column<? extends java.lang.Number> eData)
Description copied from interface:Series
Watch the specified ResultTable object, plotting points with error-bars based on the specified x,y and error values.
-
regeneratePoints
protected void regeneratePoints()
-
split
public Series split(RowEvaluable<?> splitBy, Series.SeriesFormatter pattern)
Description copied from interface:Series
Cause the series to automatically split into a set of sub-series based on a value in each result.
-
getWatched
public ResultTable getWatched()
Description copied from interface:Series
Returns which, if any, ResultTable is currently being watched by this series.- Specified by:
getWatched
in interfaceSeries
- Returns:
- ResultTable, null if none
-
filter
public Series filter(java.util.function.Predicate<Row> filter)
Description copied from interface:Series
Set a true/false test to filter data by, only plotting rows from the ResultTable that return true when tested.
-
addPoint
public Series addPoint(double x, double y, double errorX, double errorY)
-
addPoints
public 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)
-
removePoint
public Series removePoint(int index)
- Specified by:
removePoint
in interfaceSeries
-
removePoints
public Series removePoints(int from, int to)
- Specified by:
removePoints
in interfaceSeries
-
clear
public Series clear()
Description copied from interface:Series
Remove all points from this series.
-
setMarkerVisible
public Series setMarkerVisible(boolean show)
Description copied from interface:Series
Sets whether a marker should be placed at each data point in this series or not.- Specified by:
setMarkerVisible
in interfaceSeries
- Parameters:
show
- Show markers?- Returns:
- Self-reference
-
isMarkerVisible
public boolean isMarkerVisible()
Description copied from interface:Series
Returns whether markers are being shown at each data point or not in this series.- Specified by:
isMarkerVisible
in interfaceSeries
- Returns:
- Markers showing?
-
getMarkerShape
public Series.Shape getMarkerShape()
Description copied from interface:Series
Returns the marker shape currently being used by this series.- Specified by:
getMarkerShape
in interfaceSeries
- Returns:
- Maker shape being used
-
setMarkerShape
public Series setMarkerShape(Series.Shape shape)
Description copied from interface:Series
Sets the marker shape to use for this series.- Specified by:
setMarkerShape
in interfaceSeries
- Parameters:
shape
- Marker shape to use- Returns:
- Self-reference
-
getMarkerSize
public double getMarkerSize()
Description copied from interface:Series
Returns the marker size being used for this series.- Specified by:
getMarkerSize
in interfaceSeries
- Returns:
- Size
-
setMarkerSize
public Series setMarkerSize(double size)
Description copied from interface:Series
Sets the marker size to use for this series.- Specified by:
setMarkerSize
in interfaceSeries
- Parameters:
size
- Size- Returns:
- Self-reference
-
getName
public java.lang.String getName()
Description copied from interface:Series
Returns the name of the series.
-
setName
public Series setName(java.lang.String name)
Description copied from interface:Series
Sets the name of the series.
-
getColour
public javafx.scene.paint.Color getColour()
Description copied from interface:Series
Returns the colour being used to represent this series.
-
setColour
public Series setColour(javafx.scene.paint.Color colour)
Description copied from interface:Series
Sets the colour used to represent this series.
-
getErrorColour
public javafx.scene.paint.Color getErrorColour()
Description copied from interface:Series
Returns the colour being used to represent errors in this series.- Specified by:
getErrorColour
in interfaceSeries
- Returns:
- Colour of series
-
setErrorColour
public Series setErrorColour(javafx.scene.paint.Color colour)
Description copied from interface:Series
Sets the colour used to represent errors in this series.- Specified by:
setErrorColour
in interfaceSeries
- Parameters:
colour
- Colour to use- Returns:
- Self-reference
-
setColourSequence
public Series setColourSequence(javafx.scene.paint.Color... colours)
Description copied from interface:Series
Sets the sequence of colours to use when auto-generating sub-series (for example, when split() is called).- Specified by:
setColourSequence
in interfaceSeries
- Parameters:
colours
- The colours in order that they should be used.- Returns:
- Self-reference.
-
getLineWidth
public double getLineWidth()
Description copied from interface:Series
Returns line-width used when drawing the line for this series.- Specified by:
getLineWidth
in interfaceSeries
- Returns:
- Line width, in pixels
-
setLineWidth
public Series setLineWidth(double width)
Description copied from interface:Series
Sets the line-width used for drawing the line for this series.- Specified by:
setLineWidth
in interfaceSeries
- Parameters:
width
- Line width to use, in pixels- Returns:
- Self-reference
-
getErrorLineWidth
public double getErrorLineWidth()
Description copied from interface:Series
Returns line-width used when drawing lines for error bars on this series.- Specified by:
getErrorLineWidth
in interfaceSeries
- Returns:
- Line width, in pixels
-
setErrorLineWidth
public Series setErrorLineWidth(double width)
Description copied from interface:Series
Sets the line-width used for drawing lines for error bars on this series.- Specified by:
setErrorLineWidth
in interfaceSeries
- Parameters:
width
- Line width to use, in pixels- Returns:
- Self-reference
-
getLineDash
public Series.Dash getLineDash()
Description copied from interface:Series
Returns the dash type used for drawing the line for this series.- Specified by:
getLineDash
in interfaceSeries
- Returns:
- Dash type
-
setLineDash
public Series setLineDash(Series.Dash dash)
Description copied from interface:Series
Sets the dash type for the line of this series.- Specified by:
setLineDash
in interfaceSeries
- Parameters:
dash
- Dash type- Returns:
- Self-reference
-
setLineVisible
public Series setLineVisible(boolean show)
Description copied from interface:Series
Sets whether to show the line of this series.- Specified by:
setLineVisible
in interfaceSeries
- Parameters:
show
- Line visible?- Returns:
- Self-reference
-
isLineVisible
public boolean isLineVisible()
Description copied from interface:Series
Returns whether the series line is visible or not.- Specified by:
isLineVisible
in interfaceSeries
- Returns:
- Line visible?
-
setAutoReduction
public Series setAutoReduction(int reduceTo, int limit)
Description copied from interface:Series
Sets the series to automatically reduce the number of data points to the specified number when exceeding the specified limit.- Specified by:
setAutoReduction
in interfaceSeries
- Parameters:
reduceTo
- Number of points to reduce tolimit
- Limit at which reducing should occur- Returns:
- Self-reference
-
reduceNow
public Series reduceNow()
Description copied from interface:Series
Forces the automatic point-reduction to happen now.
-
setXAutoRemove
public Series setXAutoRemove(double range)
Description copied from interface:Series
Sets the range below the greatest x-value that outside of which points are automatically removed.- Specified by:
setXAutoRemove
in interfaceSeries
- Parameters:
range
- Range to use- Returns:
- Self-reference
-
setYAutoRemove
public Series setYAutoRemove(double range)
Description copied from interface:Series
Sets the range below the greatest y-value that outside of which points are automatically removed.- Specified by:
setYAutoRemove
in interfaceSeries
- Parameters:
range
- Range to use- Returns:
- Self-reference
-
remove
public Series remove()
Description copied from interface:Series
Removes this series from its plot.
-
getFit
public Fit getFit()
Description copied from interface:Series
Returns the fit being used to draw the fitted curve to the data currently.
-
fit
public Series fit(Series.SeriesFitter fitter)
-
isFitted
public boolean isFitted()
Description copied from interface:Series
Returns whether the data is currently being fitted.
-
setPointOrder
public Series setPointOrder(Series.Ordering order)
- Specified by:
setPointOrder
in interfaceSeries
-
getPointOrdering
public Series.Ordering getPointOrdering()
- Specified by:
getPointOrdering
in interfaceSeries
-
getDatasets
public javafx.collections.ObservableList<JISAErrorDataSet> getDatasets()
Description copied from interface:Series
Returns the unboxed JavaFx representation of this series.- Specified by:
getDatasets
in interfaceSeries
- Returns:
- JavaFx XYChart.Series object
-
-