Package jisa.gui.plotting
Class JISASeries
- java.lang.Object
-
- jisa.gui.plotting.JISASeries
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceJISASeries.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 SeriesaddPoint(double x, double y, double errorX, double errorY)SeriesaddPoints(java.lang.Iterable<? extends java.lang.Number> x, java.lang.Iterable<? extends java.lang.Number> y, java.lang.Iterable<? extends java.lang.Number> eY)Seriesclear()Remove all points from this series.Seriesfilter(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.Seriesfit(Series.SeriesFitter fitter)javafx.scene.paint.ColorgetColour()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.ColorgetErrorColour()Returns the colour being used to represent errors in this series.doublegetErrorLineWidth()Returns line-width used when drawing lines for error bars on this series.FitgetFit()Returns the fit being used to draw the fitted curve to the data currently.intgetLimit()Series.DashgetLineDash()Returns the dash type used for drawing the line for this series.doublegetLineWidth()Returns line-width used when drawing the line for this series.Series.ShapegetMarkerShape()Returns the marker shape currently being used by this series.doublegetMarkerSize()Returns the marker size being used for this series.java.lang.StringgetName()Returns the name of the series.Series.OrderinggetPointOrdering()ResultTablegetWatched()Returns which, if any, ResultTable is currently being watched by this series.booleanisFitted()Returns whether the data is currently being fitted.booleanisLineVisible()Returns whether the series line is visible or not.booleanisMarkerVisible()Returns whether markers are being shown at each data point or not in this series.SeriesreduceNow()Forces the automatic point-reduction to happen now.protected voidregeneratePoints()Seriesremove()Removes this series from its plot.SeriesremoveFit()SeriesremovePoint(int index)SeriesremovePoints(int from, int to)SeriessetAutoReduction(int reduceTo, int limit)Sets the series to automatically reduce the number of data points to the specified number when exceeding the specified limit.SeriessetColour(javafx.scene.paint.Color colour)Sets the colour used to represent this series.SeriessetColourSequence(javafx.scene.paint.Color... colours)Sets the sequence of colours to use when auto-generating sub-series (for example, when split() is called).SeriessetErrorColour(javafx.scene.paint.Color colour)Sets the colour used to represent errors in this series.SeriessetErrorLineWidth(double width)Sets the line-width used for drawing lines for error bars on this series.SeriessetLimit(int count)Instructs the Series to only plot the last N points added to it.SeriessetLineDash(Series.Dash dash)Sets the dash type for the line of this series.SeriessetLineVisible(boolean show)Sets whether to show the line of this series.SeriessetLineWidth(double width)Sets the line-width used for drawing the line for this series.SeriessetMarkerShape(Series.Shape shape)Sets the marker shape to use for this series.SeriessetMarkerSize(double size)Sets the marker size to use for this series.SeriessetMarkerVisible(boolean show)Sets whether a marker should be placed at each data point in this series or not.SeriessetName(java.lang.String name)Sets the name of the series.SeriessetPointOrder(Series.Ordering order)SeriessetXAutoRemove(double range)Sets the range below the greatest x-value that outside of which points are automatically removed.SeriessetYAutoRemove(double range)Sets the range below the greatest y-value that outside of which points are automatically removed.Seriessplit(RowEvaluable<?> splitBy, Series.SeriesFormatter pattern)Cause the series to automatically split into a set of sub-series based on a value in each result.Serieswatch(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.Serieswatch(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.Serieswatch(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:SeriesWatch 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:SeriesInstructs 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:SeriesWatch 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:SeriesCause 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:SeriesReturns which, if any, ResultTable is currently being watched by this series.- Specified by:
getWatchedin interfaceSeries- Returns:
- ResultTable, null if none
-
filter
public Series filter(java.util.function.Predicate<Row> filter)
Description copied from interface:SeriesSet 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:
removePointin interfaceSeries
-
removePoints
public Series removePoints(int from, int to)
- Specified by:
removePointsin interfaceSeries
-
clear
public Series clear()
Description copied from interface:SeriesRemove all points from this series.
-
setMarkerVisible
public Series setMarkerVisible(boolean show)
Description copied from interface:SeriesSets whether a marker should be placed at each data point in this series or not.- Specified by:
setMarkerVisiblein interfaceSeries- Parameters:
show- Show markers?- Returns:
- Self-reference
-
isMarkerVisible
public boolean isMarkerVisible()
Description copied from interface:SeriesReturns whether markers are being shown at each data point or not in this series.- Specified by:
isMarkerVisiblein interfaceSeries- Returns:
- Markers showing?
-
getMarkerShape
public Series.Shape getMarkerShape()
Description copied from interface:SeriesReturns the marker shape currently being used by this series.- Specified by:
getMarkerShapein interfaceSeries- Returns:
- Maker shape being used
-
setMarkerShape
public Series setMarkerShape(Series.Shape shape)
Description copied from interface:SeriesSets the marker shape to use for this series.- Specified by:
setMarkerShapein interfaceSeries- Parameters:
shape- Marker shape to use- Returns:
- Self-reference
-
getMarkerSize
public double getMarkerSize()
Description copied from interface:SeriesReturns the marker size being used for this series.- Specified by:
getMarkerSizein interfaceSeries- Returns:
- Size
-
setMarkerSize
public Series setMarkerSize(double size)
Description copied from interface:SeriesSets the marker size to use for this series.- Specified by:
setMarkerSizein interfaceSeries- Parameters:
size- Size- Returns:
- Self-reference
-
getName
public java.lang.String getName()
Description copied from interface:SeriesReturns the name of the series.
-
setName
public Series setName(java.lang.String name)
Description copied from interface:SeriesSets the name of the series.
-
getColour
public javafx.scene.paint.Color getColour()
Description copied from interface:SeriesReturns the colour being used to represent this series.
-
setColour
public Series setColour(javafx.scene.paint.Color colour)
Description copied from interface:SeriesSets the colour used to represent this series.
-
getErrorColour
public javafx.scene.paint.Color getErrorColour()
Description copied from interface:SeriesReturns the colour being used to represent errors in this series.- Specified by:
getErrorColourin interfaceSeries- Returns:
- Colour of series
-
setErrorColour
public Series setErrorColour(javafx.scene.paint.Color colour)
Description copied from interface:SeriesSets the colour used to represent errors in this series.- Specified by:
setErrorColourin interfaceSeries- Parameters:
colour- Colour to use- Returns:
- Self-reference
-
setColourSequence
public Series setColourSequence(javafx.scene.paint.Color... colours)
Description copied from interface:SeriesSets the sequence of colours to use when auto-generating sub-series (for example, when split() is called).- Specified by:
setColourSequencein interfaceSeries- Parameters:
colours- The colours in order that they should be used.- Returns:
- Self-reference.
-
getLineWidth
public double getLineWidth()
Description copied from interface:SeriesReturns line-width used when drawing the line for this series.- Specified by:
getLineWidthin interfaceSeries- Returns:
- Line width, in pixels
-
setLineWidth
public Series setLineWidth(double width)
Description copied from interface:SeriesSets the line-width used for drawing the line for this series.- Specified by:
setLineWidthin interfaceSeries- Parameters:
width- Line width to use, in pixels- Returns:
- Self-reference
-
getErrorLineWidth
public double getErrorLineWidth()
Description copied from interface:SeriesReturns line-width used when drawing lines for error bars on this series.- Specified by:
getErrorLineWidthin interfaceSeries- Returns:
- Line width, in pixels
-
setErrorLineWidth
public Series setErrorLineWidth(double width)
Description copied from interface:SeriesSets the line-width used for drawing lines for error bars on this series.- Specified by:
setErrorLineWidthin interfaceSeries- Parameters:
width- Line width to use, in pixels- Returns:
- Self-reference
-
getLineDash
public Series.Dash getLineDash()
Description copied from interface:SeriesReturns the dash type used for drawing the line for this series.- Specified by:
getLineDashin interfaceSeries- Returns:
- Dash type
-
setLineDash
public Series setLineDash(Series.Dash dash)
Description copied from interface:SeriesSets the dash type for the line of this series.- Specified by:
setLineDashin interfaceSeries- Parameters:
dash- Dash type- Returns:
- Self-reference
-
setLineVisible
public Series setLineVisible(boolean show)
Description copied from interface:SeriesSets whether to show the line of this series.- Specified by:
setLineVisiblein interfaceSeries- Parameters:
show- Line visible?- Returns:
- Self-reference
-
isLineVisible
public boolean isLineVisible()
Description copied from interface:SeriesReturns whether the series line is visible or not.- Specified by:
isLineVisiblein interfaceSeries- Returns:
- Line visible?
-
setAutoReduction
public Series setAutoReduction(int reduceTo, int limit)
Description copied from interface:SeriesSets the series to automatically reduce the number of data points to the specified number when exceeding the specified limit.- Specified by:
setAutoReductionin 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:SeriesForces the automatic point-reduction to happen now.
-
setXAutoRemove
public Series setXAutoRemove(double range)
Description copied from interface:SeriesSets the range below the greatest x-value that outside of which points are automatically removed.- Specified by:
setXAutoRemovein interfaceSeries- Parameters:
range- Range to use- Returns:
- Self-reference
-
setYAutoRemove
public Series setYAutoRemove(double range)
Description copied from interface:SeriesSets the range below the greatest y-value that outside of which points are automatically removed.- Specified by:
setYAutoRemovein interfaceSeries- Parameters:
range- Range to use- Returns:
- Self-reference
-
remove
public Series remove()
Description copied from interface:SeriesRemoves this series from its plot.
-
getFit
public Fit getFit()
Description copied from interface:SeriesReturns 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:SeriesReturns whether the data is currently being fitted.
-
setPointOrder
public Series setPointOrder(Series.Ordering order)
- Specified by:
setPointOrderin interfaceSeries
-
getPointOrdering
public Series.Ordering getPointOrdering()
- Specified by:
getPointOrderingin interfaceSeries
-
getDatasets
public javafx.collections.ObservableList<JISAErrorDataSet> getDatasets()
Description copied from interface:SeriesReturns the unboxed JavaFx representation of this series.- Specified by:
getDatasetsin interfaceSeries- Returns:
- JavaFx XYChart.Series object
-
-