Documentation of 'jyplot.XYErrorBar.XYErrorBarSeries' Java class
XYErrorBarSeries
jyplot.XYErrorBar

Class XYErrorBarSeries

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable


    public class XYErrorBarSeries
    extends Series
    Represents a sequence of zero or more data items in the form (x, y, y start, y end). Items in the series will be sorted into ascending order by X-value, and duplicate X-values are permitted. Both the sorting and duplicate defaults can be changed in the constructor.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      XYErrorBarSeries(java.lang.String name)
      Creates a new empty series.
      XYErrorBarSeries(java.lang.String name, boolean autoSort, boolean allowDuplicateXValues)
      Constructs a new xy-series that contains no data.
    • Constructor Detail

      • XYErrorBarSeries

        public XYErrorBarSeries(java.lang.String name)
        Creates a new empty series. By default, items added to the series will be sorted into ascending order by x-value, and duplicate x-values will be allowed (these defaults can be modified with another constructor.
        Parameters:
        name - the series name (null not permitted).
      • XYErrorBarSeries

        public XYErrorBarSeries(java.lang.String name,
                                boolean autoSort,
                                boolean allowDuplicateXValues)
        Constructs a new xy-series that contains no data. You can specify whether or not duplicate x-values are allowed for the series.
        Parameters:
        name - the series name (null not permitted).
        autoSort - a flag that controls whether or not the items in the series are sorted.
        allowDuplicateXValues - a flag that controls whether duplicate x-values are allowed.
    • Method Detail

      • getAutoSort

        public boolean getAutoSort()
        Returns the flag that controls whether the items in the series are automatically sorted. There is no setter for this flag, it must be defined in the series constructor.
        Returns:
        A boolean.
      • getAllowDuplicateXValues

        public boolean getAllowDuplicateXValues()
        Returns a flag that controls whether duplicate x-values are allowed. This flag can only be set in the constructor.
        Returns:
        A boolean.
      • getItemCount

        public int getItemCount()
        Returns the number of items in the series.
        Specified by:
        getItemCount in class Series
        Returns:
        The item count.
      • getMaximumItemCount

        public int getMaximumItemCount()
        Returns the maximum number of items that will be retained in the series. The default value is Integer.MAX_VALUE).
        Returns:
        The maximum item count.
      • setMaximumItemCount

        public void setMaximumItemCount(int maximum)
        Sets the maximum number of items that will be retained in the series.

        If you add a new item to the series such that the number of items will exceed the maximum item count, then the FIRST element in the series is automatically removed, ensuring that the maximum item count is not exceeded.

        Parameters:
        maximum - the maximum.
      • add

        public void add(double x,
                        double y,
                        double ylow,
                        double yhigh)
        Adds a data item to the series and sends a SeriesChangeEvent to all registered listeners.
        Parameters:
        x - the x value.
        y - the y value.
        ylow - the minimum y value
        yhigh - the maximum y value
      • add

        public void add(double x,
                        double y,
                        double ylow,
                        double yhigh,
                        boolean notify)
        Adds a data item to the series and, if requested, sends a SeriesChangeEvent to all registered listeners.
        Parameters:
        x - the x value.
        y - the y value.
        ylow - the minimum y value
        yhigh - the maximum y value
        notify - a flag that controls whether or not a SeriesChangeEvent is sent to all registered listeners.
      • delete

        public void delete(int start,
                           int end)
        Deletes a range of items from the series and sends a SeriesChangeEvent to all registered listeners.
        Parameters:
        start - the start index (zero-based).
        end - the end index (zero-based).
      • remove

        public void remove(int index)
        Removes the item at the specified index.
        Parameters:
        index - the index.
      • clear

        public void clear()
        Removes all data items from the series.
      • getX

        public java.lang.Number getX(int index)
        Returns the x-value at the specified index.
        Parameters:
        index - the index (zero-based).
        Returns:
        The x-value (never null).
      • getY

        public java.lang.Number getY(int index)
        Returns the y-value at the specified index.
        Parameters:
        index - the index (zero-based).
        Returns:
        The y-value (possibly null).
      • getStartY

        public java.lang.Number getStartY(int index)
        Returns the y-value at the specified index.
        Parameters:
        index - the index (zero-based).
        Returns:
        The y-value (possibly null).
      • getEndY

        public java.lang.Number getEndY(int index)
        Returns the y-value at the specified index.
        Parameters:
        index - the index (zero-based).
        Returns:
        The y-value (possibly null).
      • indexOf

        public int indexOf(java.lang.Number x)
        Returns the index of the item with the specified x-value. Note: if the series is not sorted in order of ascending x-values, the result is undefined.
        Parameters:
        x - the x-value (null not permitted).
        Returns:
        The index.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.