Documentation of 'smile.plot.ScatterPlot' Java class
ScatterPlot
smile.plot

Class ScatterPlot

  • Direct Known Subclasses:
    LinePlot


    public class ScatterPlot
    extends Plot
    The data is displayed as a collection of points.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ScatterPlot(double[][] data)
      Constructor.
      ScatterPlot(double[][] data, char legend)
      Constructor.
      ScatterPlot(double[][] data, char legend, java.awt.Color color)
      Constructor.
      ScatterPlot(double[][] data, java.awt.Color color)
      Constructor.
      ScatterPlot(double[][] data, int[] y, char[] legends)
      Constructor.
      ScatterPlot(double[][] data, int[] y, char[] legends, java.awt.Color color)
      Constructor.
      ScatterPlot(double[][] data, int[] y, char[] legends, java.awt.Color[] palette)
      Constructor.
      ScatterPlot(double[][] data, int[] y, char legend, java.awt.Color[] palette)
      Constructor.
      ScatterPlot(double[][] data, int[] y, java.awt.Color[] palette)
      Constructor.
      ScatterPlot(double[][] data, java.lang.String[] labels)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      char getLegend()
      Get the legend of points.
      void paint(Graphics g)
      Draw the component with given graphics object.
      static PlotCanvas plot(double[]... data)
      Create a plot canvas with the scatter plot of given data.
      static PlotCanvas plot(double[][] data, char legend)
      Create a plot canvas with the scatter plot of given data with specific legend.
      static PlotCanvas plot(double[][] data, char legend, java.awt.Color color)
      Create a plot canvas with the scatter plot of given data with specific legend and color.
      static PlotCanvas plot(double[][] data, java.awt.Color color)
      Create a plot canvas with the scatter plot of given data and specific color.
      static PlotCanvas plot(double[][] data, int[] y, char[] legend, java.awt.Color[] palette)
      Create a plot canvas with the scatter plot of given data with specific legend and color.
      static PlotCanvas plot(double[][] data, int[] y, char legend, java.awt.Color[] palette)
      Create a plot canvas with the scatter plot of given data with specific legend and color.
      static PlotCanvas plot(double[][] data, java.lang.String[] labels)
      Create a plot canvas with the scatter plot of given data.
      static PlotCanvas plot(java.lang.String id, double[]... data)
      Create a plot canvas with the scatter plot of given data.
      static PlotCanvas plot(java.lang.String id, double[][] data, char legend)
      Create a plot canvas with the scatter plot of given data with specific legend.
      static PlotCanvas plot(java.lang.String id, double[][] data, char legend, java.awt.Color color)
      Create a plot canvas with the scatter plot of given data with specific legend and color.
      static PlotCanvas plot(java.lang.String id, double[][] data, java.awt.Color color)
      Create a plot canvas with the scatter plot of given data and specific color.
      static PlotCanvas plot(java.lang.String id, double[][] data, int[] y, char[] legend, java.awt.Color[] palette)
      Create a plot canvas with the scatter plot of given data with specific legend and color.
      static PlotCanvas plot(java.lang.String id, double[][] data, int[] y, char legend, java.awt.Color[] palette)
      Create a plot canvas with the scatter plot of given data with specific legend and color.
      static PlotCanvas plot(java.lang.String id, double[][] data, java.lang.String[] labels)
      Create a plot canvas with the scatter plot of given data.
      ScatterPlot setLegend(char legend)
      Set the legend of points.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScatterPlot

        public ScatterPlot(double[][] data)
        Constructor.
      • ScatterPlot

        public ScatterPlot(double[][] data,
                           java.lang.String[] labels)
        Constructor.
      • ScatterPlot

        public ScatterPlot(double[][] data,
                           char legend)
        Constructor.
      • ScatterPlot

        public ScatterPlot(double[][] data,
                           java.awt.Color color)
        Constructor.
      • ScatterPlot

        public ScatterPlot(double[][] data,
                           char legend,
                           java.awt.Color color)
        Constructor.
      • ScatterPlot

        public ScatterPlot(double[][] data,
                           int[] y,
                           char[] legends)
        Constructor.
        Parameters:
        data - The array of data to plot. The elements should be of dimension 2 or 3.
        y - The class label of each data point of size n, where n is the size of data.
        legends - The legend of each class, of size k, where k is the amount of unique values in y.
      • ScatterPlot

        public ScatterPlot(double[][] data,
                           int[] y,
                           char[] legends,
                           java.awt.Color color)
        Constructor.
        Parameters:
        data - The array of data to plot. The elements should be of dimension 2 or 3.
        y - The class label of each data point of size n, where n is the size of data.
        legends - The legend of each class, of size k, where k is the amount of unique values in y.
        color - The color of all data points.
      • ScatterPlot

        public ScatterPlot(double[][] data,
                           int[] y,
                           java.awt.Color[] palette)
        Constructor.
        Parameters:
        data - The array of data to plot. The elements should be of dimension 2 or 3.
        y - The class label of each data point of size n, where n is the size of data.
        palette - The color of each class, of size k, where k is the amount of unique values in y.
      • ScatterPlot

        public ScatterPlot(double[][] data,
                           int[] y,
                           char legend,
                           java.awt.Color[] palette)
        Constructor.
        Parameters:
        data - The array of data to plot. The elements should be of dimension 2 or 3.
        y - The class label of each data point of size n, where n is the size of data.
        legend - The legend of all data points.
        palette - The color of each class, of size k, where k is the amount of unique values in y.
      • ScatterPlot

        public ScatterPlot(double[][] data,
                           int[] y,
                           char[] legends,
                           java.awt.Color[] palette)
        Constructor.
        Parameters:
        data - The array of data to plot. The elements should be of dimension 2 or 3.
        y - The class label of each data point of size n, where n is the size of data.
        legends - The legend of each class, of size k, where k is the amount of unique values in y.
        palette - The color of each class, of size k, where k is the amount of unique values in y.
    • Method Detail

      • paint

        public void paint(Graphics g)
        Description copied from class: Shape
        Draw the component with given graphics object.
        Specified by:
        paint in class Shape
      • setLegend

        public ScatterPlot setLegend(char legend)
        Set the legend of points.
      • getLegend

        public char getLegend()
        Get the legend of points.
      • plot

        public static PlotCanvas plot(double[]... data)
        Create a plot canvas with the scatter plot of given data.
        Parameters:
        data - a n-by-2 or n-by-3 matrix that describes coordinates of n points.
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[]... data)
        Create a plot canvas with the scatter plot of given data.
        Parameters:
        id - the id of the plot.
        data - a n-by-2 or n-by-3 matrix that describes coordinates of n points.
      • plot

        public static PlotCanvas plot(double[][] data,
                                      java.lang.String[] labels)
        Create a plot canvas with the scatter plot of given data.
        Parameters:
        data - a n-by-2 or n-by-3 matrix that describes coordinates of n points.
        labels - labels of points.
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[][] data,
                                      java.lang.String[] labels)
        Create a plot canvas with the scatter plot of given data.
        Parameters:
        id - the id of the plot.
        data - a n-by-2 or n-by-3 matrix that describes coordinates of n points.
        labels - labels of points.
      • plot

        public static PlotCanvas plot(double[][] data,
                                      java.awt.Color color)
        Create a plot canvas with the scatter plot of given data and specific color.
        Parameters:
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        color - the color used to draw points.
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[][] data,
                                      java.awt.Color color)
        Create a plot canvas with the scatter plot of given data and specific color.
        Parameters:
        id - the id of the plot.
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        color - the color used to draw points.
      • plot

        public static PlotCanvas plot(double[][] data,
                                      char legend)
        Create a plot canvas with the scatter plot of given data with specific legend.
        Parameters:
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        legend - the legend used to draw points.
        • . : dot
        • + : +
        • - : -
        • | : |
        • * : star
        • x : x
        • o : circle
        • O : large circle
        • @ : solid circle
        • # : large solid circle
        • s : square
        • S : large square
        • q : solid square
        • Q : large solid square
        • others : dot
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[][] data,
                                      char legend)
        Create a plot canvas with the scatter plot of given data with specific legend.
        Parameters:
        id - the id of the plot.
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        legend - the legend used to draw points.
        • . : dot
        • + : +
        • - : -
        • | : |
        • * : star
        • x : x
        • o : circle
        • O : large circle
        • @ : solid circle
        • # : large solid circle
        • s : square
        • S : large square
        • q : solid square
        • Q : large solid square
        • others : dot
      • plot

        public static PlotCanvas plot(double[][] data,
                                      char legend,
                                      java.awt.Color color)
        Create a plot canvas with the scatter plot of given data with specific legend and color.
        Parameters:
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        color - the color used to draw points.
        legend - the legend used to draw points.
        • . : dot
        • + : +
        • - : -
        • | : |
        • * : star
        • x : x
        • o : circle
        • O : large circle
        • @ : solid circle
        • # : large solid circle
        • s : square
        • S : large square
        • q : solid square
        • Q : large solid square
        • others : dot
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[][] data,
                                      char legend,
                                      java.awt.Color color)
        Create a plot canvas with the scatter plot of given data with specific legend and color.
        Parameters:
        id - the id of the plot.
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        color - the color used to draw points.
        legend - the legend used to draw points.
        • . : dot
        • + : +
        • - : -
        • | : |
        • * : star
        • x : x
        • o : circle
        • O : large circle
        • @ : solid circle
        • # : large solid circle
        • s : square
        • S : large square
        • q : solid square
        • Q : large solid square
        • others : dot
      • plot

        public static PlotCanvas plot(double[][] data,
                                      int[] y,
                                      char legend,
                                      java.awt.Color[] palette)
        Create a plot canvas with the scatter plot of given data with specific legend and color.
        Parameters:
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        y - the class labels of data.
        palette - the colors for each class.
        legend - the legend used to draw points.
        • . : dot
        • + : +
        • - : -
        • | : |
        • * : star
        • x : x
        • o : circle
        • O : large circle
        • @ : solid circle
        • # : large solid circle
        • s : square
        • S : large square
        • q : solid square
        • Q : large solid square
        • others : dot
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[][] data,
                                      int[] y,
                                      char legend,
                                      java.awt.Color[] palette)
        Create a plot canvas with the scatter plot of given data with specific legend and color.
        Parameters:
        id - the id of the plot.
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        y - the class labels of data.
        palette - the colors for each class.
        legend - the legend used to draw points.
        • . : dot
        • + : +
        • - : -
        • | : |
        • * : star
        • x : x
        • o : circle
        • O : large circle
        • @ : solid circle
        • # : large solid circle
        • s : square
        • S : large square
        • q : solid square
        • Q : large solid square
        • others : dot
      • plot

        public static PlotCanvas plot(double[][] data,
                                      int[] y,
                                      char[] legend,
                                      java.awt.Color[] palette)
        Create a plot canvas with the scatter plot of given data with specific legend and color.
        Parameters:
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        y - the class labels of data.
        palette - the colors for each class.
        legend - the legend used to draw points.
        • . : dot
        • + : +
        • - : -
        • | : |
        • * : star
        • x : x
        • o : circle
        • O : large circle
        • @ : solid circle
        • # : large solid circle
        • s : square
        • S : large square
        • q : solid square
        • Q : large solid square
        • others : dot
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[][] data,
                                      int[] y,
                                      char[] legend,
                                      java.awt.Color[] palette)
        Create a plot canvas with the scatter plot of given data with specific legend and color.
        Parameters:
        id - the id of the plot.
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        y - the class labels of data.
        palette - the colors for each class.
        legend - the legend used to draw points.
        • . : dot
        • + : +
        • - : -
        • | : |
        • * : star
        • x : x
        • o : circle
        • O : large circle
        • @ : solid circle
        • # : large solid circle
        • s : square
        • S : large square
        • q : solid square
        • Q : large solid square
        • others : dot

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.