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

Class Contour



  • public class Contour
    extends Plot
    A contour plot is a graphical technique for representing a 3-dimensional surface by plotting constant z slices, called contours, on a 2-dimensional format. That is, given a value for z, lines are drawn for connecting the (x, y) coordinates where that z value occurs. The contour plot is an alternative to a 3-D surface plot.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Contour(double[][] z)
      Constructor.
      Contour(double[][] z, double[] levels)
      Constructor.
      Contour(double[][] z, double[] levels, java.awt.Color[] colors)
      Constructor.
      Contour(double[][] z, int numLevels)
      Constructor.
      Contour(double[][] z, int numLevels, boolean logScale)
      Constructor.
      Contour(double[] x, double[] y, double[][] z)
      Constructor.
      Contour(double[] x, double[] y, double[][] z, double[] levels)
      Constructor.
      Contour(double[] x, double[] y, double[][] z, double[] levels, java.awt.Color[] colors)
      Constructor.
      Contour(double[] x, double[] y, double[][] z, int numLevels)
      Constructor.
      Contour(double[] x, double[] y, double[][] z, int numLevels, boolean logScale)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void paint(Graphics g)
      Draw the component with given graphics object.
      static PlotCanvas plot(double[][] z)
      Create a plot canvas with the contour plot of given data.
      static PlotCanvas plot(double[][] z, double[] levels, java.awt.Color[] palette)
      Create a plot canvas with the contour plot of given data.
      static PlotCanvas plot(double[] x, double[] y, double[][] z)
      Create a plot canvas with the contour plot of given data.
      static PlotCanvas plot(double[] x, double[] y, double[][] z, double[] levels, java.awt.Color[] palette)
      Create a plot canvas with the contour plot of given data.
      void showLevelValue(boolean b)
      Set if show the level value with each contour line.
      • Methods inherited from class java.lang.Object

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

      • Contour

        public Contour(double[][] z)
        Constructor.
        Parameters:
        z - the data matrix to create contour plot.
      • Contour

        public Contour(double[][] z,
                       int numLevels)
        Constructor.
        Parameters:
        z - the data matrix to create contour plot.
        numLevels - the number of contour levels.
      • Contour

        public Contour(double[][] z,
                       int numLevels,
                       boolean logScale)
        Constructor.
        Parameters:
        z - the data matrix to create contour plot.
        numLevels - the number of contour levels.
        logScale - true to interpolate contour levels in logarithmic scale.
      • Contour

        public Contour(double[][] z,
                       double[] levels)
        Constructor.
        Parameters:
        z - the data matrix to create contour plot.
        levels - the level values of contours.
      • Contour

        public Contour(double[][] z,
                       double[] levels,
                       java.awt.Color[] colors)
        Constructor.
        Parameters:
        z - the data matrix to create contour plot.
        levels - the level values of contours.
        colors - the color for each contour level.
      • Contour

        public Contour(double[] x,
                       double[] y,
                       double[][] z)
        Constructor.
        Parameters:
        x - the x coordinates of the data grid of z. Must be in ascending order.
        y - the y coordinates of the data grid of z. Must be in ascending order.
        z - the data matrix to create contour plot.
      • Contour

        public Contour(double[] x,
                       double[] y,
                       double[][] z,
                       int numLevels)
        Constructor.
        Parameters:
        x - the x coordinates of the data grid of z. Must be in ascending order.
        y - the y coordinates of the data grid of z. Must be in ascending order.
        z - the data matrix to create contour plot.
        numLevels - the number of contour levels.
      • Contour

        public Contour(double[] x,
                       double[] y,
                       double[][] z,
                       int numLevels,
                       boolean logScale)
        Constructor.
        Parameters:
        x - the x coordinates of the data grid of z. Must be in ascending order.
        y - the y coordinates of the data grid of z. Must be in ascending order.
        z - the data matrix to create contour plot.
        numLevels - the number of contour levels.
        logScale - true to interpolate contour levels in logarithmical scale.
      • Contour

        public Contour(double[] x,
                       double[] y,
                       double[][] z,
                       double[] levels)
        Constructor.
        Parameters:
        x - the x coordinates of the data grid of z. Must be in ascending order.
        y - the y coordinates of the data grid of z. Must be in ascending order.
        z - the data matrix to create contour plot.
        levels - the level values of contours. Must be strictly increasing and finite.
      • Contour

        public Contour(double[] x,
                       double[] y,
                       double[][] z,
                       double[] levels,
                       java.awt.Color[] colors)
        Constructor.
        Parameters:
        x - the x coordinates of the data grid of z. Must be in ascending order.
        y - the y coordinates of the data grid of z. Must be in ascending order.
        z - the data matrix to create contour plot.
        levels - the level values of contours. Must be strictly increasing and finite.
        colors - the color for each contour level.
    • Method Detail

      • showLevelValue

        public void showLevelValue(boolean b)
        Set if show the level value with each contour line.
      • paint

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

        public static PlotCanvas plot(double[][] z)
        Create a plot canvas with the contour plot of given data.
        Parameters:
        z - a matrix.
      • plot

        public static PlotCanvas plot(double[][] z,
                                      double[] levels,
                                      java.awt.Color[] palette)
        Create a plot canvas with the contour plot of given data.
        Parameters:
        z - a matrix.
      • plot

        public static PlotCanvas plot(double[] x,
                                      double[] y,
                                      double[][] z)
        Create a plot canvas with the contour plot of given data.
        Parameters:
        z - a matrix.
      • plot

        public static PlotCanvas plot(double[] x,
                                      double[] y,
                                      double[][] z,
                                      double[] levels,
                                      java.awt.Color[] palette)
        Create a plot canvas with the contour plot of given data.
        Parameters:
        z - a matrix.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.