Package jisa.gui

Interface Series

  • All Known Subinterfaces:
    SeriesGroup
    All Known Implementing Classes:
    JISASeries

    public interface Series
    • Field Detail

      • defaultColours

        static final javafx.scene.paint.Color[] defaultColours
    • Method Detail

      • 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 watch
        xData - Lambda representing the x-data to plot
        yData - 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 watch
        xData - Index representing the x-data to plot
        yData - Index representing the y-data to plot
        eData - 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 watch
        xData - Index representing the x-data to plot
        yData - 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 by
        pattern - 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 by
        pattern - 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 splitting
        pattern - 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-value
        y - 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)
      • addPoints

        default Series addPoints​(Matrix<java.lang.Double> data)
      • 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 to
        limit - Limit at which reducing should occur
        Returns:
        Self-reference
      • disableAutoReduction

        default Series disableAutoReduction()
        Disables any automatic point-reduction set using setAutoReduction().
        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 by setXAutoRemove().
        Returns:
        Self-reference
      • disableYAutoRemove

        default Series disableYAutoRemove()
        Disables any automatic point reduction set by setYAutoRemove().
        Returns:
        Self-reference
      • remove

        Series remove()
        Removes this series from its plot.
        Returns:
        Self-reference
      • 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?
      • getDatasets

        javafx.collections.ObservableList<? extends de.gsi.dataset.DataSet> getDatasets()
        Returns the unboxed JavaFx representation of this series.
        Returns:
        JavaFx XYChart.Series object