Package jslx.charts

Class JSLChartUtil


  • public class JSLChartUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      JSLChartUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static tech.tablesaw.plotly.components.Figure makePartialSumsPlotFigure​(java.lang.String dataName, double[] partialSums)
      Warning: This method uses plotly.
      static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure​(java.lang.String title, java.lang.String dataName, double[] avg, double[] cumAvg)
      Warning: This method uses plotly.
      static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure​(WelchDataArrayObserver dataArrayObserver)
      Warning: This method uses plotly.
      static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure​(WelchDataFileAnalyzer analyzer)
      Warning: This method uses plotly.
      static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure​(WelchDataFileAnalyzer analyzer, int totalNumObservations)
      Warning: This method uses plotly.
      static boolean showPlot​(tech.tablesaw.plotly.components.Figure figureToPlot)
      Shows the plot in a web page and makes an html file of the plot.
      static boolean showPlot​(tech.tablesaw.plotly.components.Figure figureToPlot, java.lang.String nameOfFigureFile)
      Shows the plot in a web page and makes an html file of the plot.
      static void showPlot​(tech.tablesaw.plotly.components.Figure figureToPlot, java.nio.file.Path pathToSaveFigure)
      Shows the plot in a web page and makes an html file of the plot.
      static boolean showPlotNE​(tech.tablesaw.plotly.components.Figure figureToPlot, java.nio.file.Path pathToSaveFigure)
      Shows the plot in a web page and makes an html file of the plot.
      • Methods inherited from class java.lang.Object

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

      • LOGGER

        public static final org.slf4j.Logger LOGGER
      • DEFAULT_FIGURE_FILE_NAME

        public static final java.lang.String DEFAULT_FIGURE_FILE_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • JSLChartUtil

        public JSLChartUtil()
    • Method Detail

      • showPlot

        public static boolean showPlot​(tech.tablesaw.plotly.components.Figure figureToPlot)
        Shows the plot in a web page and makes an html file of the plot. Squelches inconvenient FileIO exceptions The plot file is named DefaultFigure_ + yyyy_MM_dd_HH_mm_ss
        Parameters:
        figureToPlot - the constructed figure to plot
        Returns:
        false if there was a problem/error
      • showPlot

        public static boolean showPlot​(tech.tablesaw.plotly.components.Figure figureToPlot,
                                       java.lang.String nameOfFigureFile)
        Shows the plot in a web page and makes an html file of the plot. Squelches inconvenient FileIO exceptions
        Parameters:
        figureToPlot - the constructed figure to plot
        nameOfFigureFile - the name of the file in the jslOutput/plotDir to hold the plot
        Returns:
        false if there was a problem/error
      • showPlotNE

        public static boolean showPlotNE​(tech.tablesaw.plotly.components.Figure figureToPlot,
                                         java.nio.file.Path pathToSaveFigure)
        Shows the plot in a web page and makes an html file of the plot. Squelches inconvenient FileIO exceptions
        Parameters:
        figureToPlot - the constructed figure to plot
        pathToSaveFigure - the path to the file that will hold the html for the plot
        Returns:
        false if there was a problem/error
      • showPlot

        public static void showPlot​(tech.tablesaw.plotly.components.Figure figureToPlot,
                                    java.nio.file.Path pathToSaveFigure)
                             throws java.io.IOException
        Shows the plot in a web page and makes an html file of the plot.
        Parameters:
        figureToPlot - the constructed figure to plot
        pathToSaveFigure - the path to the file that will hold the html for the plot
        Throws:
        java.io.IOException - if a problem with the temp files occurs
      • makePartialSumsPlotFigure

        public static tech.tablesaw.plotly.components.Figure makePartialSumsPlotFigure​(java.lang.String dataName,
                                                                                       double[] partialSums)
        Warning: This method uses plotly. If there are too many data points then it may not work. Stick with less than 50K points
        Parameters:
        dataName - the name of the response
        partialSums - the partial sums to plot
        Returns:
        the figure
      • makeWelchPlotFigure

        public static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure​(WelchDataFileAnalyzer analyzer)
        Warning: This method uses plotly. If there are too many data points then it may not work. This will only permit less than 50K points
        Parameters:
        analyzer - the WelchDataFileAnalyzer that has the Welch data to display
        Returns:
        the figure
      • makeWelchPlotFigure

        public static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure​(WelchDataFileAnalyzer analyzer,
                                                                                 int totalNumObservations)
        Warning: This method uses plotly. If there are too many data points then it may not work. This will only permit less than 50K points
        Parameters:
        analyzer - the WelchDataFileAnalyzer that has the Welch data to display
        totalNumObservations - the number of observations to plot
        Returns:
        the figure
      • makeWelchPlotFigure

        public static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure​(WelchDataArrayObserver dataArrayObserver)
        Warning: This method uses plotly. If there are too many data points then it may not work. Stick with less than 50K points
        Parameters:
        dataArrayObserver - the WelchDataArrayObserver that has the Welch data to display
        Returns:
        the figure
      • makeWelchPlotFigure

        public static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure​(java.lang.String title,
                                                                                 java.lang.String dataName,
                                                                                 double[] avg,
                                                                                 double[] cumAvg)
        Warning: This method uses plotly. If there are too many data points then it may not work. Stick with less than 50K points
        Parameters:
        title - the title of the chart
        dataName - the name of the response
        avg - the Welch averages
        cumAvg - the cumulative averages
        Returns:
        the figure