Class XYPlot

  • All Implemented Interfaces:
    java.lang.Iterable<XYPlot.Curve>

    public class XYPlot
    extends java.lang.Object
    implements java.lang.Iterable<XYPlot.Curve>
    An XYCurve is an ordered collection of 2d XYPlot.Curves, meant for chart generation.
    Since:
    0.7.0
    Author:
    Erich Schubert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  XYPlot.Curve
      Curve on this plot.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.ArrayList<XYPlot.Curve> curves
      Curves on this plot.
      protected java.lang.String labelx
      Label of X axis
      protected java.lang.String labely
      Label of Y axis
      protected double maxx
      Minimum and maximum for X axis
      protected double maxy
      Minimum and maximum for Y axis
      protected double minx
      Minimum and maximum for X axis
      protected double miny
      Minimum and maximum for Y axis
      protected static double THRESHOLD
      Simplification threshold
    • Constructor Summary

      Constructors 
      Constructor Description
      XYPlot()
      Constructor.
      XYPlot​(java.lang.String labelx, java.lang.String labely)
      Constructor with labels
    • Field Detail

      • THRESHOLD

        protected static final double THRESHOLD
        Simplification threshold
        See Also:
        Constant Field Values
      • curves

        protected java.util.ArrayList<XYPlot.Curve> curves
        Curves on this plot.
      • labelx

        protected java.lang.String labelx
        Label of X axis
      • labely

        protected java.lang.String labely
        Label of Y axis
      • minx

        protected double minx
        Minimum and maximum for X axis
      • maxx

        protected double maxx
        Minimum and maximum for X axis
      • miny

        protected double miny
        Minimum and maximum for Y axis
      • maxy

        protected double maxy
        Minimum and maximum for Y axis
    • Constructor Detail

      • XYPlot

        public XYPlot​(java.lang.String labelx,
                      java.lang.String labely)
        Constructor with labels
        Parameters:
        labelx - Label for X axis
        labely - Label for Y axis
      • XYPlot

        public XYPlot()
        Constructor.
    • Method Detail

      • makeCurve

        public XYPlot.Curve makeCurve()
        Make a new curve.
        Returns:
        Curve
      • makeCurve

        public XYPlot.Curve makeCurve​(int color)
        Make a new curve with desired color.
        Parameters:
        color - Color number
        Returns:
        Curve
      • makeCurve

        public XYPlot.Curve makeCurve​(int color,
                                      int size)
        Make a new curve with desired color.
        Parameters:
        color - Color number
        size - Expected size
        Returns:
        Curve
      • getLabelx

        public java.lang.String getLabelx()
        Get label of x axis
        Returns:
        label of x axis
      • getLabely

        public java.lang.String getLabely()
        Get label of y axis
        Returns:
        label of y axis
      • getMinx

        public double getMinx()
        Minimum on x axis.
        Returns:
        Minimum on X
      • getMaxx

        public double getMaxx()
        Maximum on x axis.
        Returns:
        Maximum on X
      • getMiny

        public double getMiny()
        Minimum on y axis.
        Returns:
        Minimum on Y
      • getMaxy

        public double getMaxy()
        Maximum on y axis.
        Returns:
        Maximum on Y
      • iterator

        public java.util.Iterator<XYPlot.Curve> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<XYPlot.Curve>
      • getLongName

        public java.lang.String getLongName()
      • getShortName

        public java.lang.String getShortName()