Documentation of 'visad.util.BarGraph' Java class
BarGraph
visad.util

Class BarGraph



  • public class BarGraph
    extends java.lang.Object
    BarGraph provides methods for plotting colored bar graphs in 2D or 3D.
    • Constructor Summary

      Constructors 
      Constructor and Description
      BarGraph() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static float[][] extractColors(java.awt.Color[] c)
      Converts java.awt.Color objects to floating point RGB values.
      static void main(java.lang.String[] argv)
      Run 'java visad.util.BarGraph' to test bar graphing.
      static FlatField makeBarGraph2D(float[] heights, float spacing, java.awt.Color[] colors)
      Constructs a 2D bar graph.
      static FlatField makeBarGraph2D(FunctionType type, float[] heights, float spacing, java.awt.Color[] colors)
      Constructs a 2D bar graph.
      static FlatField makeBarGraph3D(float[][] heights, float spacing, java.awt.Color[][] colors)
      Constructs a 3D bar graph.
      static FlatField makeBarGraph3D(FunctionType type, float[][] heights, float spacing, java.awt.Color[][] colors)
      Constructs a 3D bar graph.
      static FlatField makeBoxes2D(float[] x1, float[] y1, float[] x2, float[] y2, java.awt.Color[] c) 
      static FlatField makeBoxes2D(float[] x1, float[] y1, float[] x2, float[] y2, float[] r, float[] g, float[] b) 
      static FlatField makeBoxes2D(FunctionType type, float[] x1, float[] y1, float[] x2, float[] y2, java.awt.Color[] c) 
      static FlatField makeBoxes2D(FunctionType type, float[] x1, float[] y1, float[] x2, float[] y2, float[] r, float[] g, float[] b) 
      static FlatField makeBoxes3D(float[] x1, float[] y1, float[] z1, float[] x2, float[] y2, float[] z2, java.awt.Color[] c) 
      static FlatField makeBoxes3D(float[] x1, float[] y1, float[] z1, float[] x2, float[] y2, float[] z2, float[] r, float[] g, float[] b) 
      static FlatField makeBoxes3D(FunctionType type, float[] x1, float[] y1, float[] z1, float[] x2, float[] y2, float[] z2, java.awt.Color[] c) 
      static FlatField makeBoxes3D(FunctionType type, float[] x1, float[] y1, float[] z1, float[] x2, float[] y2, float[] z2, float[] r, float[] g, float[] b) 
      • Methods inherited from class java.lang.Object

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

      • BarGraph

        public BarGraph()
    • Method Detail

      • makeBarGraph2D

        public static FlatField makeBarGraph2D(float[] heights,
                                               float spacing,
                                               java.awt.Color[] colors)
                                        throws VisADException,
                                               java.rmi.RemoteException
        Constructs a 2D bar graph.
        Parameters:
        heights - Height of each bar
        spacing - Spacing between bars (at least 0, and less than 1)
        colors - Color of each bar
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBarGraph2D

        public static FlatField makeBarGraph2D(FunctionType type,
                                               float[] heights,
                                               float spacing,
                                               java.awt.Color[] colors)
                                        throws VisADException,
                                               java.rmi.RemoteException
        Constructs a 2D bar graph.
        Parameters:
        type - MathType to use, of the form ((X, Y) -> (R, G, B))
        heights - Height of each bar
        spacing - Spacing between bars (at least 0, and less than 1)
        colors - Color of each bar
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBoxes2D

        public static FlatField makeBoxes2D(float[] x1,
                                            float[] y1,
                                            float[] x2,
                                            float[] y2,
                                            java.awt.Color[] c)
                                     throws VisADException,
                                            java.rmi.RemoteException
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBoxes2D

        public static FlatField makeBoxes2D(float[] x1,
                                            float[] y1,
                                            float[] x2,
                                            float[] y2,
                                            float[] r,
                                            float[] g,
                                            float[] b)
                                     throws VisADException,
                                            java.rmi.RemoteException
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBoxes2D

        public static FlatField makeBoxes2D(FunctionType type,
                                            float[] x1,
                                            float[] y1,
                                            float[] x2,
                                            float[] y2,
                                            float[] r,
                                            float[] g,
                                            float[] b)
                                     throws VisADException,
                                            java.rmi.RemoteException
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBarGraph3D

        public static FlatField makeBarGraph3D(float[][] heights,
                                               float spacing,
                                               java.awt.Color[][] colors)
                                        throws VisADException,
                                               java.rmi.RemoteException
        Constructs a 3D bar graph.
        Parameters:
        heights - Height of each bar (dimensioned cols X rows)
        spacing - Spacing between bars (at least 0, and less than 1)
        colors - Color of each bar (dimensioned cols X rows)
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBarGraph3D

        public static FlatField makeBarGraph3D(FunctionType type,
                                               float[][] heights,
                                               float spacing,
                                               java.awt.Color[][] colors)
                                        throws VisADException,
                                               java.rmi.RemoteException
        Constructs a 3D bar graph.
        Parameters:
        type - MathType to use, of the form ((X, Y, Z) -> (R, G, B))
        heights - Height of each bar (dimensioned cols X rows)
        spacing - Spacing between bars (at least 0, and less than 1)
        colors - Color of each bar (dimensioned cols X rows)
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBoxes3D

        public static FlatField makeBoxes3D(float[] x1,
                                            float[] y1,
                                            float[] z1,
                                            float[] x2,
                                            float[] y2,
                                            float[] z2,
                                            java.awt.Color[] c)
                                     throws VisADException,
                                            java.rmi.RemoteException
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBoxes3D

        public static FlatField makeBoxes3D(float[] x1,
                                            float[] y1,
                                            float[] z1,
                                            float[] x2,
                                            float[] y2,
                                            float[] z2,
                                            float[] r,
                                            float[] g,
                                            float[] b)
                                     throws VisADException,
                                            java.rmi.RemoteException
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBoxes3D

        public static FlatField makeBoxes3D(FunctionType type,
                                            float[] x1,
                                            float[] y1,
                                            float[] z1,
                                            float[] x2,
                                            float[] y2,
                                            float[] z2,
                                            java.awt.Color[] c)
                                     throws VisADException,
                                            java.rmi.RemoteException
        Throws:
        VisADException
        java.rmi.RemoteException
      • makeBoxes3D

        public static FlatField makeBoxes3D(FunctionType type,
                                            float[] x1,
                                            float[] y1,
                                            float[] z1,
                                            float[] x2,
                                            float[] y2,
                                            float[] z2,
                                            float[] r,
                                            float[] g,
                                            float[] b)
                                     throws VisADException,
                                            java.rmi.RemoteException
        Throws:
        VisADException
        java.rmi.RemoteException
      • extractColors

        public static float[][] extractColors(java.awt.Color[] c)
        Converts java.awt.Color objects to floating point RGB values.
      • main

        public static void main(java.lang.String[] argv)
                         throws VisADException,
                                java.rmi.RemoteException
        Run 'java visad.util.BarGraph' to test bar graphing.
        Throws:
        VisADException
        java.rmi.RemoteException

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.