Class Plot2D

  • All Implemented Interfaces:
    Plot

    public class Plot2D
    extends java.lang.Object
    implements Plot
    Small convenient wrapper for JFreeChart line plot derived.
    Author:
    Christian Fries
    • Constructor Summary

      Constructors 
      Constructor Description
      Plot2D​(double xmin, double xmax, int numberOfPointsX, java.util.function.DoubleUnaryOperator function)  
      Plot2D​(double xmin, double xmax, int numberOfPointsX, java.util.function.Function<java.lang.Double,​java.lang.Double> function)  
      Plot2D​(double xmin, double xmax, int numberOfPointsX, java.util.List<Named<java.util.function.DoubleUnaryOperator>> doubleUnaryOperators)  
      Plot2D​(double xmin, double xmax, java.util.function.DoubleUnaryOperator function)  
      Plot2D​(java.util.List<Plotable2D> plotables)  
    • Constructor Detail

      • Plot2D

        public Plot2D​(java.util.List<Plotable2D> plotables)
      • Plot2D

        public Plot2D​(double xmin,
                      double xmax,
                      int numberOfPointsX,
                      java.util.List<Named<java.util.function.DoubleUnaryOperator>> doubleUnaryOperators)
      • Plot2D

        public Plot2D​(double xmin,
                      double xmax,
                      int numberOfPointsX,
                      java.util.function.DoubleUnaryOperator function)
      • Plot2D

        public Plot2D​(double xmin,
                      double xmax,
                      java.util.function.DoubleUnaryOperator function)
      • Plot2D

        public Plot2D​(double xmin,
                      double xmax,
                      int numberOfPointsX,
                      java.util.function.Function<java.lang.Double,​java.lang.Double> function)
    • Method Detail

      • show

        public void show()
        Specified by:
        show in interface Plot
      • saveAsJPG

        public void saveAsJPG​(java.io.File file,
                              int width,
                              int height)
                       throws java.io.IOException
        Specified by:
        saveAsJPG in interface Plot
        Throws:
        java.io.IOException
      • saveAsPDF

        public void saveAsPDF​(java.io.File file,
                              int width,
                              int height)
                       throws java.io.IOException
        Specified by:
        saveAsPDF in interface Plot
        Throws:
        java.io.IOException
      • saveAsSVG

        public void saveAsSVG​(java.io.File file,
                              int width,
                              int height)
                       throws java.io.IOException
        Specified by:
        saveAsSVG in interface Plot
        Throws:
        java.io.IOException
      • setTitle

        public Plot2D setTitle​(java.lang.String title)
        Specified by:
        setTitle in interface Plot
      • setXAxisLabel

        public Plot2D setXAxisLabel​(java.lang.String xAxisLabel)
        Specified by:
        setXAxisLabel in interface Plot
      • setYAxisLabel

        public Plot2D setYAxisLabel​(java.lang.String yAxisLabel)
        Specified by:
        setYAxisLabel in interface Plot
      • setZAxisLabel

        public Plot setZAxisLabel​(java.lang.String zAxisLabel)
        Specified by:
        setZAxisLabel in interface Plot
      • setXAxisNumberFormat

        public Plot2D setXAxisNumberFormat​(java.text.NumberFormat xAxisNumberFormat)
      • setYAxisNumberFormat

        public Plot2D setYAxisNumberFormat​(java.text.NumberFormat yAxisNumberFormat)
      • setYRange

        public Plot setYRange​(double ymin,
                              double ymax)
      • setIsLegendVisible

        public Plot setIsLegendVisible​(java.lang.Boolean isLegendVisible)
        Specified by:
        setIsLegendVisible in interface Plot
        Parameters:
        isLegendVisible - the isLegendVisible to set
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object