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

Class LinePlot



  • public class LinePlot
    extends ScatterPlot
    Line plot is a special scatter plot which connects points by straight lines.
    • Constructor Detail

      • LinePlot

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

        public LinePlot(double[][] data,
                        Line.Style style)
        Constructor.
    • Method Detail

      • setColor

        public LinePlot setColor(java.awt.Color color)
        Description copied from class: Shape
        Set the color of component.
        Overrides:
        setColor in class Shape
      • getColor

        public java.awt.Color getColor()
        Description copied from class: Shape
        Returns the color of component.
        Overrides:
        getColor in class Shape
      • getStroke

        public java.awt.Stroke getStroke()
        Returns the line stroke style.
      • setStroke

        public LinePlot setStroke(java.awt.Stroke stroke)
        Set the line stroke style.
      • paint

        public void paint(Graphics g)
        Description copied from class: Shape
        Draw the component with given graphics object.
        Overrides:
        paint in class ScatterPlot
      • plot

        public static PlotCanvas plot(double[] y)
        Create a plot canvas with the poly line plot of given data.
        Parameters:
        y - a data vector that describes y coordinates of points. The x coordinates will be [0, n), where n is the length of y.
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[] y)
        Create a plot canvas with the poly line plot of given data.
        Parameters:
        id - the id of the plot.
        y - a data vector that describes y coordinates of points. The x coordinates will be [0, n), where n is the length of y.
      • plot

        public static PlotCanvas plot(double[] y,
                                      Line.Style style)
        Create a plot canvas with the poly line plot of given data.
        Parameters:
        y - a data vector that describes y coordinates of points. The x coordinates will be [0, n), where n is the length of y.
        style - the stroke style of line.
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[] y,
                                      Line.Style style)
        Create a plot canvas with the poly line plot of given data.
        Parameters:
        id - the id of the plot.
        y - a data vector that describes y coordinates of points. The x coordinates will be [0, n), where n is the length of y.
        style - the stroke style of line.
      • plot

        public static PlotCanvas plot(double[] y,
                                      Line.Style style,
                                      java.awt.Color color)
        Create a plot canvas with the poly line plot of given data.
        Parameters:
        y - a data vector that describes y coordinates of points. The x coordinates will be [0, n), where n is the length of y.
        style - the stroke style of line.
        color - the color of line.
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[] y,
                                      Line.Style style,
                                      java.awt.Color color)
        Create a plot canvas with the poly line plot of given data.
        Parameters:
        id - the id of the plot.
        y - a data vector that describes y coordinates of points. The x coordinates will be [0, n), where n is the length of y.
        style - the stroke style of line.
        color - the color of line.
      • plot

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

        public static PlotCanvas plot(java.lang.String id,
                                      double[][] data,
                                      Line.Style style)
        Create a plot canvas with the poly line 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 points.
        style - the stroke style of line.
      • plot

        public static PlotCanvas plot(double[][] data,
                                      Line.Style style,
                                      java.awt.Color color)
        Create a plot canvas with the poly line plot of given data.
        Parameters:
        data - a n-by-2 or n-by-3 matrix that describes coordinates of points.
        style - the stroke style of line.
        color - the color of line.
      • plot

        public static PlotCanvas plot(java.lang.String id,
                                      double[][] data,
                                      Line.Style style,
                                      java.awt.Color color)
        Create a plot canvas with the poly line 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 points.
        style - the stroke style of line.
        color - the color of line.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.