HPlotJas
jhplot

Class HPlotJas



  • public class HPlotJasextends Object
    Create a canvas using the JAS plotter API. It has different look & feel than HPlot. Can also be used to show data, histograms, functions, 2D density plots. Several plot regions can be used.

    This API allows to perform an interactive fit after loading the data and rebin one-dimenstional arrays.

    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      voidadd(ArrayList data)
      Add all data as a list.
      voidclose()
      Close the canvas (and dispose all components).
      voiddoc()
      Show online documentation.
      voiddraw(H1D h1)
      Plot 1D histogram.
      voidexport(String file)
      Fast export of the canvas to an image file (depends on the extension, i.e.
      voidexportDialog(String file)
      Export a GHFrame image to an external file: The file extension is very important: *.png - make PNG figure *.eps - make EPS figure *.ps - make PS figure *.jpg - make JPG figure *.pdf - make PDF figure *.SVG - make SVG figure *.EMF - make EMF figure, It will open some dialog in case if the file exists
      StringgetTitle()
      Return title of this plotter.
      static voidmain(String[] args) 
      voidupdate()
      Update the current canvas.
      voidvisible()
      Set the canvas frame visible
      voidvisible(boolean vs)
      Set the canvas frame visible or not
    • Constructor Detail

      • HPlotJas

        public HPlotJas(String title,        int xsize,        int ysize,        ArrayList<Object> olist)
        Create HPlot canvas with several plots.
        Parameters:
        title - Title
        xsize - size in x direction
        ysize - size in y direction
        olist - List of objects for drawing, such as P0D, P1D, P0I, H1D, H2P.
      • HPlotJas

        public HPlotJas(String title,        ArrayList<Object> olist)
        Construct a Jas frame and prepare for plotting.
        Parameters:
        title - Title
        list - list of objects to plot (H1D,P0D,P1D, etc)
      • HPlotJas

        public HPlotJas(ArrayList<Object> olist)
        Construct a Jas frame and prepare for plotting.
        Parameters:
        list - list of objects to plot (H1D,P0D,P1D, etc)
      • HPlotJas

        public HPlotJas(String title)
        Construct a Jas canvas with a plot with the size 600x400.
        Parameters:
        title - Title
      • HPlotJas

        public HPlotJas()
        Construct a HPlot canvas with a single plot with the size 600x400.
    • Method Detail

      • add

        public void add(ArrayList data)
        Add all data as a list. Supported types are O0D, P1D, H1D. H2D, P1D, IFunction1D
        Parameters:
        data - list with input objects
      • 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
      • update

        public void update()
        Update the current canvas.
      • export

        public void export(String file)
        Fast export of the canvas to an image file (depends on the extension, i.e. PNG, PDF, EPS, PS). 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.
      • exportDialog

        public void exportDialog(String file)
        Export a GHFrame image to an external file: The file extension is very important: *.png - make PNG figure *.eps - make EPS figure *.ps - make PS figure *.jpg - make JPG figure *.pdf - make PDF figure *.SVG - make SVG figure *.EMF - make EMF figure, It will open some dialog in case if the file exists
        Parameters:
        file - name of the file with the image. Use appropriate extension for the file name for the export.
      • doc

        public void doc()
        Show online documentation.
      • getTitle

        public String getTitle()
        Return title of this plotter.
        Returns:
      • close

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

        public void draw(H1D h1)
        Plot 1D histogram. Use external graphical options from Jaida.
        Parameters:
        h1 - Input H1D histogram
        style - Plotter style.
      • main

        public static void main(String[] args)

SCaVis 2.0 © jWork.ORG