HPlotJa
jhplot

Class HPlotJa

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable
    Direct Known Subclasses:
    SHPlotJa


    public class HPlotJaextends JComponent
    A canvas to display all graphical SCaVis objects. Can be used for drawing Feynman diagrams and plot H1D, P1D, F1D and H2D objects. It is analogies to HPlot canvas but all plotted objects are much more interactive. It also include interactive editor to edit plots or show some graphics.
    See Also:
    HPlot, Serialized Form
    • Field Detail

      • VERSION_NUMBER

        public static final String VERSION_NUMBER
        The version number of this release of japlot.jaxodraw.
        See Also:
        Constant Field Values
      • USER_NAME

        public static final String USER_NAME
        The current user.
      • USER_HOME

        public static final String USER_HOME
        The current user's home directory.
      • OS_NAME

        public static final String OS_NAME
        The name of the current operating system.
      • OS_ARCH

        public static final String OS_ARCH
        The architecture of the current operating system.
      • OS_VERSION

        public static final String OS_VERSION
        The version of the current operating system.
      • JAVA_VERSION

        public static final String JAVA_VERSION
        The current Java version.
      • JAVA_RUNTIME_VERSION

        public static final String JAVA_RUNTIME_VERSION
        The current Java runtime version.
      • JAVA_HOME

        public static final String JAVA_HOME
        The directory where Java is installed on the current machine.
      • JAVA_CLASSPATH

        public static final String JAVA_CLASSPATH
        The current Java class path.
      • PREFS_FILENAME

        public static String PREFS_FILENAME
        The file where user-selected preferences will be stored.
    • Constructor Detail

      • HPlotJa

        public HPlotJa(String title,       int xsize,       int ysize,       int n1,       int n2,       boolean setgraph)
        Create HPlotJa canvas with several pads.
        Parameters:
        title - Title
        xsize - size in x direction
        ysize - size in y direction
        n1 - number of plots/graphs in x
        n2 - number of plots/graphs in y
        setgraph - true if initials graph with axes should be set Set to false if you want just empty canvas.
      • HPlotJa

        public HPlotJa(String title,       int xsize,       int ysize,       int n1,       int n2)
        Create HPlotJa canvas with several pads and axes.
        Parameters:
        title - Title
        xsize - size in x direction
        ysize - size in y direction
        n1 - number of plots/graphs in x
        n2 - number of plots/graphs in y
      • HPlotJa

        public HPlotJa(String title,       int xs,       int ys)
        Construct a canvas with a single plot region.
        Parameters:
        title - Title for the canvas
        xs - size of canvas in x
        ys - size of canvas in y
      • HPlotJa

        public HPlotJa()
        Construct a japlot.jaxodraw canvas with a plot with the default parameters 600 by 400, and 10% space for the global title
      • HPlotJa

        public HPlotJa(String title)
        Construct a japlot.jaxodraw canvas with a plot with the default parameters 600 by 400, and 10% space for the global title
        Parameters:
        title - Title
    • Method Detail

      • setAxesFrame

        public void setAxesFrame(int n1,                int n2)
        Set axes frames or pads. Before creating pad, clear the canvas, i.e. call clearAll(0 and clearData(). One should also call update() to show the pads.
        Parameters:
        n1 - number of pads in X
        n2 - number of pads in Y
      • buildPads

        public void buildPads(int n1,             int n2)
        Build axes frames and show them. In fact, it calls the methods: clearAllData(); clearAll(); setAxesFrame(n1,n2); update();.
        Parameters:
        n1 - number of pads in X
        n2 - number of pads in Y
      • cd

        public void cd(int cols,      int rows)
        Navigate to a selected plot. This is necessary if there are a several plots on the same canvas.
        Parameters:
        cols - Set the location of the current plot in x
        rows - Set the location of the current plot in y
      • getCdX

        public int getCdX()
        Get location of the graph in the main canvas in X
        Returns:
        location of the graph in X
      • getNtotX

        public int getNtotX()
        Get the total number of graphs in X
        Returns:
        Total number of graphs in X
      • getNtotY

        public int getNtotY()
        Get the total number of the graphs in Y
        Returns:
        Total number of graphs in Y
      • getCdY

        public int getCdY()
        Get location of the graph on the main canvas in Y
        Returns:
        location in Y
      • getJaAxes

        public JaAxes getJaAxes()
        Get the current JaAxes frame
        Returns:
        frame
      • setContour

        public void setContour(boolean contour)
        Set to a contour style
        Parameters:
        contour - set to true for contour style
      • setContourBar

        public void setContourBar(boolean bar)
        Show a bar indicating levels on contour plot
        Parameters:
        bar - true if the bar is shown
      • setContourLevels

        public void setContourLevels(int levels)
        Number of contour levels
        Parameters:
        levels - number of contour levels
      • getContourLevels

        public int getContourLevels()
        Number of contour levels
        Parameters:
        levels - number of contour levels
      • isContourBar

        public boolean isContourBar()
        Show a bar indicating levels on contour plot
        Parameters:
        bar - true if the bar is shown
      • setContourBins

        public void setContourBins(int nX,                  int nY)
        Set number of contour bins in X and Y
        Parameters:
        number - of bins in X
        number - of bins in Y
      • isContour

        public boolean isContour()
        is contour plot?
        Returns:
      • getContourBinsX

        public int getContourBinsX()
        Number of contour bins in X
        Returns:
      • getContourBinsY

        public int getContourBinsY()
        Number of contour bins in Y
        Returns:
      • add

        public void add(JaObject ob)
        Add an object to the frame. Typically, you will need to call "update" to trigger redraw.
        Parameters:
        ob - input object
      • addToBack

        public void addToBack(JaObject ob)
        Add an object to background. Typically, you will need to call "update" to trigger redraw.
        Parameters:
        ob - input object
      • addToFront

        public void addToFront(JaObject ob)
        Add an object to foreground.
        Parameters:
        ob - input object
      • clearAll

        public void clearAll()
        Clear the canvas from all objects
      • clearAllData

        public void clearAllData()
        Clear all data from all graphs.
      • clearData

        public void clearData(int padx,             int pady)
        Clear the axis frame from the data
        Parameters:
        padx - No of pads in X
        pady - No of pads in Y
      • setPad

        public void setPad(double xpos,          double ypos,          double width,          double height)
        Set the location and the size of the current pad in NDC coordinate. First, navigate to this pad using the cd(i,j) method.
        Parameters:
        padx - pad ID in X
        pady - pad ID in Y
        xpos - pad location in X
        ypos - pad location in Y
        width - pad width in X
        hight - pad height in Y
      • getPadPositionX

        public double getPadPositionX()
        Get the position of the current pad in X (NDC coordinate)
        Returns:
        pad position in X
      • getPadPositionY

        public double getPadPositionY()
        Get the position of the current pad in Y (in NDC coordinate)
        Returns:
        position in Y
      • getPadWidth

        public double getPadWidth()
        Get the width of the current pad in NDC system.
        Returns:
        width
      • getPadHeight

        public double getPadHeight()
        Get the height of the current pad in NDC system.
        Returns:
        height
      • setPad

        public void setPad(int padx,          int pady,          double xpos,          double ypos,          double width,          double height)
        Set the location and the size of the pad in NDC coordinate. First, navigate to this pad using the cd(i,j) method.
        Parameters:
        padx - pad ID in X
        pady - pad ID in Y
        xpos - pad location in X
        ypos - pad location in Y
        width - pad width in X
        hight - pad height in Y
      • setPad

        public void setPad(int padx,          int pady,          double xpos,          double ypos)
        Set the location and the size of the pad in NDC coordinate. First, navigate to this pad using the cd(i,j) method.
        Parameters:
        padx - pad ID in X
        pady - pad ID in Y
        xpos - pad location in X
        ypos - pad location in Y
      • removeObject

        public void removeObject(int type,                int padx,                int pady)
        Remove a particular object
        Parameters:
        type - type of this object
        padx - pad
        pady - pad
      • getArrayList

        public ArrayList getArrayList()
        Get list of all objects on the frame.
      • clearData

        public void clearData()
        Clear the axis frame from the data for the current pad.
      • update

        public void update()
        Update the canvas by repainting all objects
      • close

        public void close()
        Close the canvas (and dispose all components).
      • setLocationAtCenter

        public void setLocationAtCenter(JaText text)
        Sets the location of a text object at the center of the canvas
        Parameters:
        text - input text object
      • setAxisAll

        public void setAxisAll(boolean show)
        Sets whether all axis lines will be drawn or not.
        Parameters:
        show - toggle, true if the axis should be drawn.
      • removeAxes

        public void removeAxes()
        remove X and Y axes, tics, axis labels on the current plot.
      • setTicksLabels

        public void setTicksLabels(int axis,                  boolean set)
        Set tick labels for the current pad
        Parameters:
        axis - axis id (0- X, 1- Y)
        set - set to true, if you want to show it
      • setShowMirror

        public void setShowMirror(int axis,                 boolean set)
        Set or no a mirror axis
        Parameters:
        axis - axis id (0- X, 1- Y)
        set - set to true, if you want to show it
      • showAxis

        public void showAxis(int axis)
        Show a particular axis (no mirror)
        Parameters:
        axis - 0 for X, 1 for Y
      • setGridAll

        public void setGridAll(int axis,              boolean b)
        Sets or not the grid lines for all plots on the same canvas
        Parameters:
        axis - Axis (0 means X, 1 means Y)
        b - true is grid is shown
      • setLabelX

        public void setLabelX(String label,             int n1,             int n2)
        Sets a label for X at the default location
        Parameters:
        label - current label
        n1 - pad position in X (-1)
        n2 - pad position in Y (-1)
      • setLabel

        public void setLabel(int axis,            double x,            double y,            String text,            Font f,            Color c,            String howToSet)
        Set label (or update it) for the current pad selected with the cd(i1,i2) method. After setting a new label, use "update()" method to apply changes
        Parameters:
        axis - axis. 0 means X, 1 means Y
        x - X-position in the NDC
        y - Y-position in NDC
        text - text
        f - font of this label
        c - Color of this label
        howToSet - How to set. Use "NDC" (coordinate independent, between 0 and 1) or USER (depends on the plotted coordinates)
      • setLabel

        public void setLabel(int axis,            double x,            double y,            String text,            Font f,            Color c)
        Set label (or update it) for the current pad selected with the cd(i1,i2) method. This method uses NDC as the default frame for label position. After setting a new label, use "update()" method to apply changes
        Parameters:
        axis - axis. 0 means X, 1 means Y
        x - X-position in the NDC
        y - Y-position in NDC
        text - text
        f - font of this label
        c - Color of this label
      • setLabel

        public void setLabel(int axis,            double x,            double y,            String text,            Font f)
        Set label (or update it) for the current pad selected with the cd(i1,i2) method. This method uses NDC as the default frame for label position. After setting a new label, use "update()" method to apply changes
        Parameters:
        axis - axis. 0 means X, 1 means Y
        x - X-position in the NDC
        y - Y-position in NDC
        text - text
        f - font of this label
      • setLabel

        public void setLabel(int axis,            double x,            double y,            String text)
        Set label (or update it) for the current pad selected with the cd(i1,i2) method. This method uses NDC as the default frame for label position. After setting a new label, use "update()" method to apply changes
        Parameters:
        axis - axis. 0 means X, 1 means Y
        x - X-position in the NDC
        y - Y-position in NDC
        text - text
      • getLabel

        public JaText getLabel(int axis)
        Return the current lable
        Parameters:
        axis - if 0 then for X-axis, if 1 then Y-axis
        Returns:
        object representing this label
      • setLabelShift

        public void setLabelShift(int axis,                 double shiftX,                 double shiftY)
        Shift position of a label with respect to the axis by about defined in NDC (0-1). Applied for the current pad. To trigger redraw, call update() method.
        Parameters:
        axis - axis. 0 means Y, 1 means Y
        shiftX - value for the shift in X direction
        shiftY - value for the shift in Y direction
      • setStatBox

        public void setStatBox(String[] label,              int n1,              int n2)
        Set statistical box.
        Parameters:
        label - text
        n1 - pad ID in X (-1)
        n2 - pad ID in Y (-1)
      • setLabelY

        public void setLabelY(String label,             int n1,             int n2)
        Set label at the default position
        Parameters:
        label - text of the Y label
        n1 - pad ID in X (-1)
        n2 - pad ID in Y (-1)
      • getPreferences

        public static void getPreferences()
        Checks whether preferences have been saved from an earlier session and if yes, imports them.
      • getSizeX

        public int getSizeX()
        get X size
      • getSizeY

        public int getSizeY()
        get Y size
      • getCurDir

        public static String getCurDir()
        Returns the current working directory.
        Returns:
        The current working directory.
      • setCurDir

        public static void setCurDir(String newDir)
        Sets the current working directory.
        Parameters:
        newDir - The new working directory.
      • setRangeX

        public void setRangeX(double min,             double max)
        Set range on X. Call update method to redraw.
        Parameters:
        min - min value on X
        max - max value ob X
      • setRangeY

        public void setRangeY(double min,             double max)
        Set range on Y on the current pad. Call update method to redraw.
        Parameters:
        min - min value on Y
        max - max value on Y
      • setRange

        public void setRange(double minX,            double maxX,            double minY,            double maxY)
        Set ranges on X and Y on the current pad. Call update method to redraw.
        Parameters:
        minX - min value on X
        maxX - max value on X
        minY - min value on Y
        maxY - max value on Y
      • setRangeX

        public void setRangeX(double min,             double max,             int padx,             int pady)
        Set X range on pad defined by x and y on the canvas.
        Parameters:
        min - Min value on X
        max - Max vallue on X
        padx - pad in X
        pady - pad in Y
      • setRangeY

        public void setRangeY(double min,             double max,             int padx,             int pady)
        Set Y range on pad defined by x and y on the canvas.
        Parameters:
        min - Min value on Y
        max - Max vallue on Y
        padx - pad in X
        pady - pad in Y
      • setLogScale

        public void setLogScale(int axis,               boolean b)
        Sets true or false to plot on a log scale.
        Parameters:
        axis - defines to which axis this function applies (0 if X, 1 if Y).
        b - toggle, true if the scaling is logarithmic
      • setTicFont

        public void setTicFont(Font font)
        Sets the font used by the labels drawn at each tick.
        Parameters:
        font - the new font
      • showEditor

        public void showEditor()
        Show object editor on the left of the canvas.
      • showEditor

        public void showEditor(boolean show)
        Show object editor (or not)
        Parameters:
        show - true then show it
      • export

        public void export(String file)
        Fast export of the canvas to an image file (depends on the extension, i.e. PNG, JPG, EPS, PS, SVG). No questions will be asked, an existing file will be rewritten
        Parameters:
        file - Output file with the proper extension. If no extension, PNG file is assumed.
      • convertSVG

        public void convertSVG(String source,              String target)
        Export SVG to various image formats. Supported output: JPEG
        PNG
        PS
        EPS
        PDF
        SVGZ
        Parameters:
        source - Input file in SVG format
        target - Output file in designed format.
      • convertSVG

        public void convertSVG(String source,              String target,              boolean isRemove)
        Export SVG to various image formats. Supported output: JPEG
        PNG
        PS
        EPS
        PDF
        SVGZ
        Parameters:
        source - Input file in SVG format
        target - Output file in designed format.
        isRemove - true if the source should be removed.
      • getPad

        public JaAxes getPad()
        Get current pad object
        Returns:
        pad
      • getKeyTextSpace

        public double getKeyTextSpace()
        Get current space between the key symbol and the text for legends
        Returns:
        space defined in NDC
      • setKeyTextSpace

        public void setKeyTextSpace(double space)
        Set space between the key symbol and the text in a legend.
        Parameters:
        space - space to be set in NDC
      • getPad

        public JaAxes getPad(int n1,            int n2)
        Get pad characterised by n1 and n2
        Parameters:
        n1 - location of pad in X
        n2 - location of pad in Y
        Returns:
        pad
      • setMarginBottom

        public void setMarginBottom(double marginBottom)
        Margin from bottom.
        Parameters:
        marginBottom -
      • getMarginBottom

        public double getMarginBottom()
        Get size of bottom margin
        Returns:
        size
      • setMarginLeft

        public void setMarginLeft(double marginLeft)
        Margin from left
        Parameters:
        marginLeft -
      • getMarginLeft

        public double getMarginLeft()
        Get margin from left side
        Returns:
        marginLeft
      • setMarginRight

        public void setMarginRight(double marginRight)
        Set margin from right
        Parameters:
        marginRight -
      • getMarginRight

        public double getMarginRight()
        Get margin from right
        Returns:
        marginRight
      • setAntiAlias

        public void setAntiAlias(boolean setit)
        Set antialiasing for the graphics of the current plot
        Parameters:
        setit - true if antialiasing is set
      • setLegendFont

        public void setLegendFont(Font font)
        Sets the actual font of the legend.
        Parameters:
        font - new font to draw the legend.
      • getLegends

        public ArrayList<JaKey> getLegends()
        Return all the keys used for data annotation
        Returns:
        array with legends
      • setLegends

        public void setLegends(ArrayList<JaKey> legends)
        Set new list of legends (old legends are removed).
        Parameters:
        new - legends
      • setLegendAll

        public void setLegendAll(boolean isSet)
        Do we need to show legends?
        Parameters:
        isSet - false, then legends are removed.
      • setLegendFont

        public void setLegendFont(String name)
        Set the label font, which is used for axis labels and legend labels. The font names understood are those understood by java.awt.Font.decode().
        Parameters:
        name - A font name.
      • setPadLocation

        public void setPadLocation(double x,                  double y)
        Set location of the current pad in NDC You may need to call update.
        Parameters:
        x - position
        y - position
      • setPadSize

        public void setPadSize(double width,              double height)
        Set width and height of the pad in NDC
        Parameters:
        width - width
        width - height
      • setMarginTop

        public void setMarginTop(double marginTop)
        Set margin from top in NDC system.
        Parameters:
        marginTop -
      • getMarginTop

        public double getMarginTop()
        Get the size of the top margin
        Returns:
        top margin
      • setMarginX

        public void setMarginX(double marginX)
        Margin in X between pads
        Parameters:
        marginX -
      • getMarginX

        public double getMarginX()
        Get margin in X between pads
        Returns:
        margin in X
      • setMarginY

        public void setMarginY(double marginY)
        Margin in Y between pads
        Parameters:
        marginY - space in Y between pads
      • getMarginY

        public double getMarginY()
        Get space between any 2 plots in Y
        Returns:
        space between plots in Y
      • getLabelsAll

        public JaText[][] getLabelsAll(int axis)
        Get labels from all pads.
        Parameters:
        axis - 0 for X, 1 for Y
        Returns:
        labels
      • draw

        public void draw(H1D h1,        int padx,        int pady)
        Draw H1D histogram on pad X and pad Y
        Parameters:
        h1 - input histogram
        padx - No of pads in X
        pady - No of pads in Y
      • showKey

        public void showKey(boolean show)
        Show or not keys for the current plot
        Parameters:
        show - true if shown
      • addKey

        public void addKey(jplot.DataArray data,          int padx,          int pady)
      • setShowStatBox

        public void setShowStatBox(boolean showStatBox)
        Show a box with statistics (only for last plotted object) on the current pad
        Parameters:
        showStatBox -
      • isShowStatBox

        public boolean isShowStatBox()
        Is stat box is shown on the current pad?
        Returns:
        true if shown
      • addStatBox

        public void addStatBox(int padx,              int pady)
      • getSymbol

        public static int getSymbol(jplot.DataArray d)
      • draw

        public void draw(H2D h2,        int padx,        int pady)
        Draw 2D histogram on pads given by X and Y. The contour style is used.
        Parameters:
        h2 - input histogram
        padx - index of pad in X
        pady - index of pad in Y
      • setGTitle

        public void setGTitle(JaText gTitle)
        Set the global title
        Parameters:
        gTitle - object representing global title
      • setGTitle

        public void setGTitle(String sname,             Font f,             Color c)
        Sets the global title
        Parameters:
        sname - Title
        f - Font
        c - Color
      • setGTitle

        public void setGTitle(String sname,             Font f)
        Sets the global title using black color.
        Parameters:
        sname - Title name
        f - Font
      • setGTitle

        public void setGTitle(String sname)
        Set the global title with default attributes. The default color is black. The default font is ("Arial", Font.BOLD, 20)
        Parameters:
        sname - Title
      • setGTitle

        public void setGTitle(String sname,             Color color)
        Set the global title with default attributes. The default color is black. The default font is ("Arial", Font.BOLD, 20)
        Parameters:
        sname - Title
        color - Color of the title
      • getGTitle

        public JaText getGTitle()
        Get global title
        Returns:
      • setNameX

        public void setNameX(String s,            Font f,            Color c)
        Set the label for the axis in X
        Parameters:
        s - label title
        f - Font
        c - Color
      • setNameX

        public void setNameX(String s)
        Sets the name for X axis. The color is black, the font is ("Arial", Font.BOLD, 14)
        Parameters:
        s - Title for X axis.
      • setNameX

        public void setNameX(String s,            Font f)
        Sets the name for X axis. The color is black, the font is ("Arial", Font.BOLD, 14)
        Parameters:
        s - Title for X axis.
        f - Font
      • setNameY

        public void setNameY(String s,            Font f,            Color c)
        Set the label for the axis in Y
        Parameters:
        s - label title
        f - Font
        c - Color
      • setNameY

        public void setNameY(String s)
        Sets the name for Y axis. The color is black, the font is ("Arial", Font.BOLD, 14)
        Parameters:
        s - Title for Y axis.
      • setBoxFillColor

        public void setBoxFillColor(Color c)
        Sets the fill color of the bounding box drawn around a graph.
        Parameters:
        c - Color for the fill
      • getBoxFillColor

        public Color getBoxFillColor()
        Returns the fill-color of the eventual bounding box arround the graph
        Returns:
        the fill color of the bounding box.
      • getBoxColor

        public Color getBoxColor()
        Returns the color used to draw the bounding box.
        Returns:
        the color of the bounding box.
      • setBoxColor

        public void setBoxColor(Color c)
        Sets the color of the bounding box drawn around a graph.
        Parameters:
        c - drawing color.
      • setNameY

        public void setNameY(String s,            Font f)
        Sets the name for Y axis. The color is black, the font is ("Arial", Font.BOLD, 14)
        Parameters:
        s - Title for Y axis.
        f - Font
      • draw

        public void draw(JaObject jo)
        Draw JaObject. Use update() method to actually show it. This method is the same ad add method.
        Parameters:
        jo - input JaObject
      • draw

        public void draw(P1D p1d)
        Draw H2D histogram on the current pad. Use update() method to actually show it.
        Parameters:
        h2d - input histogram
      • draw

        public void draw(H2D h2d)
        Draw H2D histogram on the current pad.
        Parameters:
        h2d - input histogram
      • getStatistics

        public String[] getStatistics(H1D h1)
        Get statistics in form of strings
        Parameters:
        h1 - input H1D
        Returns:
        lines with statistics
      • getStatistics

        public String[] getStatistics(P1D h1)
        Get strings representing the statistics for the given object
        Parameters:
        h1 - input P1D
        Returns:
        lines with statistics
      • draw

        public void draw(H1D h1)
        Draw H1D histogram on the current pad. Use update() method to actually show it.
        Parameters:
        h1 - input histogram
      • draw

        public void draw(F1D[] f)
        Draw array of F1D holders
        Parameters:
        f - array of F1D functions
      • draw

        public void draw(Cloud1D c1d)
        Plot cloud in 1D. Assume 100 bins.
        Parameters:
        c1d - Input Cloud1D
      • draw

        public void draw(Cloud2D c2d)
        Plot cloud 2D
        Parameters:
        c2D - Input 2D cloud
      • draw

        public void draw(Histogram1D h1d)
        Draw 1D histogram
        Parameters:
        h1d - input istogram1D
      • fit

        public int fit(H1D h1,      String predefFunc,      String method)
        Fit 1D histogram with the function F1D
        Parameters:
        h1 - H1D histogram
        predefFunc - String predefined function
        method - String - method for the fit
        Returns:
        int Fit results
      • factories

        public void factories()
        Create various JAIDA factories: IAnalysisFactory, ITree, IFitFactory, IFunctionFactory
      • analF

        public IAnalysisFactory analF()
        Return IAnalysisFactory associated with the plot
        Returns:
        IAnalysisFactory
      • treeF

        public ITree treeF()
        Return TreeFactory associated with the plot
        Returns:
        ITree
      • fitF

        public IFitFactory fitF()
        Return FitFactory associated with the plot
        Returns:
        IFitFactory
      • funcF

        public IFunctionFactory funcF()
        Return FunctionFactory associated with the plot
        Returns:
        IFunctionFactory
      • histF

        public IHistogramFactory histF()
        Return IHistogramFactory associated with the plot
        Returns:
        IHistogramFactory
      • draw

        public void draw(jplot.DataArray inputDA,        String title)
        Draw data represented by DataArray on the current pad.
        Parameters:
        inputDA - input data container
      • draw

        public void draw(F1D f1,        int padx,        int pady)
        Draw an one-dimensional function on the current pad.
        Parameters:
        f1 - input function
        padx - pad in X
        pady - pad in Y
      • draw

        public void draw(FND f1,        int padx,        int pady)
        Draw an one-dimensional function on the current pad.
        Parameters:
        f1 - input function
        padx - pad in X
        pady - pad in Y
      • draw

        public void draw(F1D f1)
        Draw an one-dimensional function on the current pad.
        Parameters:
        f1 - input function
      • draw

        public void draw(FND f1)
        Draw an one-dimensional function on the current pad.
        Parameters:
        f1 - input function
      • draw

        public void draw(P1D p1d,        int padx,        int pady)
        Draw P1D object on the pad
        Parameters:
        p1d - input
        padx - pad in X
        pady - pad in Y
      • draw

        public void draw(P1D[] d)
        Draw array of P1D holders
        Parameters:
        d - array of P1D data holders
      • getData

        public Vector<jplot.DataArray> getData()
        Get the vector which keeps all the data
        Returns:
        Vector with the data
      • setAutoRange

        public void setAutoRange(int axis,                boolean b)
        Sets true or false to use automatic scaling for the current plot.
        Parameters:
        axis - defines to which axis this function applies, generally something like X_AXIS or Y_AXIS.
        b - toggle, true if the the automatic scaling feature is enabled.
      • setAutoRangeAll

        public void setAutoRangeAll(int axis,                   boolean b)
        Sets true or false to use automatic scaling for all plots.
        Parameters:
        axis - defines to which axis this function applies, generally something like X_AXIS or Y_AXIS.
        b - toggle, true if the the automatic scaling feature is enabled.
      • setAutoRange

        public void setAutoRange(boolean b)
        Set autorange in X and Y at the same time
        Parameters:
        b - if true, sets autorange
      • setAutoRangeAll

        public void setAutoRangeAll(boolean b)
        Set auto-range in X and Y at the same time for all plots
        Parameters:
        b - if true, sets auto-range
      • setAutoRange

        public void setAutoRange()
        Set autorange in X and Y at the same time for the current plot
      • setAutoRangeAll

        public void setAutoRangeAll()
        Set autorange in X and Y at the same time for all plots
      • visible

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

        public void visible()
        Set the canvas frame visible
      • visible

        public void visible(int posX,           int posY)
        Set the canvas frame visible. Also set its location.
        Parameters:
        posX - - the x-coordinate of the new location's top-left corner in the parent's coordinate space;
        posY - - he y-coordinate of the new location's top-left corner in the parent's coordinate space
      • main

        public static void main(String[] args)
        The main method of japlot.jaxodraw: determines system properties, preferences and command line arguments, before bringing up the graphical user interface.
        Parameters:
        args - The array of command line arguments.
      • doc

        public void doc()
        Show online documentation.

SCaVis 2.2 © jWork.ORG