Documentation of 'jhplot.HVisAd' Java class.
HVisAd
jhplot

Class HVisAd

    • Constructor Detail

      • HVisAd

        public HVisAd(String title,              int xsize,              int ysize,              boolean is3D)
        Create 2D/3D canvas based on VisAd classes.
        Parameters:
        xsize - size in x direction
        ysize - size in y direction
        title - name of this canvas.
        is3D - set to true for 3D canvas. If false, assume 2D.
      • HVisAd

        public HVisAd(String title,              int xsize,              int ysize)
        Create 3D canvas based on VisAd classes.
        Parameters:
        xsize - size in x direction
        ysize - size in y direction
        title - name of this canvas.
      • HVisAd

        public HVisAd(String title,              boolean is3D)
        Create 2D/3D canvas based on VisAd classes.
        Parameters:
        title - name of this canvas.
        is3D - set to true for 3D canvas. If false, assume 2D.
      • HVisAd

        public HVisAd()
        Construct a 3D canvas with a plot with the default parameters. It assumes 600x600 size and 3D display.
      • HVisAd

        public HVisAd(String title)
        Construct a 3D canvas with a plot with the default parameters. It assumes 600x400 size and 3D display.
        Parameters:
        title - name of this canvas.
    • Method Detail

      • getDisplay

        public DisplayImpl getDisplay()
        Get current display.
        Returns:
        current display
      • setScaling

        public void setScaling(double scale)
        Set the scaling of the box.
        Parameters:
        scale - factor
      • getScaling

        public double getScaling()
        Get the scaling.
        Returns:
        scaling factor.
      • setRotation

        public void setRotation(double rotX,                        double rotY,                        double rotZ)
        Set the rotation angles in degrees.
        Parameters:
        rotX - rotation in X
        rotY - rotation in Y
        rotZ - rotation in Z
      • setTranslation

        public void setTranslation(double X,                           double Y,                           double Z)
        Set the translation (0-1 values)
        Parameters:
        X - translate in X
        Y - translate in Y
        Z - translate in Z
      • getRotation

        public double[] getRotation()
        Get the rotation angles in degrees.
        Returns:
        rotation in X, Y,Z
      • getTranslation

        public double[] getTranslation()
        Get the translation.
        Returns:
        translation in X, Y,Z
      • getProjection

        public ProjectionControl getProjection()
        Get current projection.
        Returns:
        current projection.
      • getMouse

        public MouseBehavior getMouse()
        Get mouse behaviour.
        Returns:
        current behaviour of mouse.
      • getRender

        public DisplayRenderer getRender()
        Get render of this display.
        Returns:
        render class.
      • clear

        public void clear()
        Clear the current graph including graph settings. Note: the current graph is set by the cd() method
      • close

        public void close()
        Close the canvas (and dispose all components) Note: a memory leak is found - no time to study it. set to null all the stuff
      • draw

        public void draw(P2D p)
        Draw 3D data points.
        Parameters:
        p - input array
      • draw

        public void draw(float[][] ntuple)
        Draw 3D data points.
        Parameters:
        p3d - input array
      • draw

        public void draw(float[][] ntuple,                 String title)
        Draw 3D data points.
        Parameters:
        p3d - input array
        title - title
      • setAxes

        public ArrayList<AxisScale> setAxes(String nameX,                                    double minX,                                    double maxX,                                    String nameY,                                    double minY,                                    double maxY,                                    String nameZ,                                    double minZ,                                    double maxZ)
        Attach axes to the canvas, and snap them o the box. You can also set min and max values for the axis.
        Parameters:
        nameX - Label for X axis
        minX - min value of X
        maxX - max value of X
        nameY - Label for Y axis
        minY - min value of Y
        maxY - max value of Y
        nameZ - Label of Z axis
        minZ - min value on Z
        maxZ - max value on Z
        Returns:
        array with 3 objects, which represent AxisScale to redefine axes.
      • visible

        public void visible(boolean vs)
        Set the canvas frame visible or not
        Parameters:
        vs - (boolean) true: visible, false: not visible
      • update

        public void update()
        Update the canvas
      • visible

        public void visible()
        Show the canvas
      • doc

        public void doc()
        Show online documentation.
      • export

        public void export(String filename)
        Export graph into an image file. The the image format is given by extension. "png", "jpg", "eps", "pdf", "svg". In case of "eps", "pdf" and "svg", vector graphics is used.
        Parameters:
        file - name of the image
      • export

        public void export(String filename,                   int width,                   int height)
        Export graph into an image file. The the image format is given by extension. "png", "jpg", "eps", "pdf", "svg". In case of "eps", "pdf" and "svg", vector graphics is used.
        Parameters:
        filename - file name
        width - width
        height - hight
      • help

        public void help()

DMelt 2.7 © DataMelt by jWork.ORG