Class XYSegment


  • public class XYSegment
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.List<java.lang.String> cssClasses  
      java.lang.String description  
      double[] x  
      double[] y  
    • Constructor Summary

      Constructors 
      Constructor Description
      XYSegment​(double[] x, double[] y)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void asGMT​(java.io.PrintWriter writer, java.lang.String label, java.lang.String xFormat, java.lang.String yFormat)  
      org.json.JSONObject asJSON()
      Output as JSON Object.
      void asSVG​(java.io.PrintWriter writer, java.lang.String css_class)
      Output as an SVG polyline.
      void asSVG​(java.io.PrintWriter writer, java.lang.String css_class, java.lang.String xFormat, java.lang.String yFormat)  
      static java.util.List<XYSegment> createFromLists​(java.util.List<double[]> xData, java.util.List<double[]> yData)  
      static XYSegment fromSingleList​(java.util.List<java.lang.Double> xData, java.util.List<java.lang.Double> yData)  
      double[] minMax​(double[] priorMinMax)  
      double[] minMaxInXRange​(double[] priorMinMax, double[] xRange)  
      double[] minMaxInYRange​(double[] priorMinMax, double[] yRange)  
      static XYSegment radianDepthToXY​(XYSegment segment, double R)  
      XYSegment recalcForAbs​(boolean xAxisAbs, boolean yAxisAbs)  
      java.util.List<XYSegment> recalcForLog​(boolean xAxisLog, boolean yAxisLog)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • x

        public final double[] x
      • y

        public final double[] y
      • cssClasses

        public java.util.List<java.lang.String> cssClasses
      • description

        public java.lang.String description
    • Constructor Detail

      • XYSegment

        public XYSegment​(double[] x,
                         double[] y)
    • Method Detail

      • fromSingleList

        public static XYSegment fromSingleList​(java.util.List<java.lang.Double> xData,
                                               java.util.List<java.lang.Double> yData)
      • createFromLists

        public static java.util.List<XYSegment> createFromLists​(java.util.List<double[]> xData,
                                                                java.util.List<double[]> yData)
      • minMax

        public double[] minMax​(double[] priorMinMax)
      • minMaxInXRange

        public double[] minMaxInXRange​(double[] priorMinMax,
                                       double[] xRange)
      • minMaxInYRange

        public double[] minMaxInYRange​(double[] priorMinMax,
                                       double[] yRange)
      • recalcForAbs

        public XYSegment recalcForAbs​(boolean xAxisAbs,
                                      boolean yAxisAbs)
      • recalcForLog

        public java.util.List<XYSegment> recalcForLog​(boolean xAxisLog,
                                                      boolean yAxisLog)
      • radianDepthToXY

        public static XYSegment radianDepthToXY​(XYSegment segment,
                                                double R)
      • asSVG

        public void asSVG​(java.io.PrintWriter writer,
                          java.lang.String css_class)
        Output as an SVG polyline. Limit to float precision per SVG spec.
        Parameters:
        writer - to write to
        css_class - optional class to add to css class attribute
      • asSVG

        public void asSVG​(java.io.PrintWriter writer,
                          java.lang.String css_class,
                          java.lang.String xFormat,
                          java.lang.String yFormat)
      • asGMT

        public void asGMT​(java.io.PrintWriter writer,
                          java.lang.String label,
                          java.lang.String xFormat,
                          java.lang.String yFormat)
      • asJSON

        public org.json.JSONObject asJSON()
        Output as JSON Object. NaN and Infinity values are skipped per JSON spec.
        Returns: