root.hist1D {xps} | R Documentation

## ROOT 1D-Histogram

### Description

Creates a ROOT 1D-histogram for a ROOT tree.

### Usage

    root.hist1D(x, treename = character(0), logbase = "log2", type = "hist", option = "HIST", canvasname = "Histogram1D", w = 540, h = 540)

### Arguments

`x` | object of class `DataTreeSet` or `ExprTreeSet`.
`treename` | name of tree, must be present in `rootfile` of object `x`.
`logbase` | usually “log2”, or “0”, determines if leaf data should be converted to log.
`type` | ROOT 1D-hist or density, i.e. “hist” or “density”.
`option` | ROOT 1D-hist option only, usually one of “HIST”, “B”, “C”, “E”.
`canvasname` | name of ROOT canvas
`w` | the width of the canvas in pixels.
`h` | the height of the canvas in pixels.

### Details

Creates a ROOT 1D-histogram for tree `treename` present in `rootfile`.

By selecting menu “File->Save->canvasname.xxx” you can save the figure as e.g. *gif, *.jpg, *.pdf, *.ps or even as C++ macro.

### Note

Always select menu item “Quit ROOT” from menu “File” to close the ROOT browser, otherwise you are in the CINT C/C++ interpreter from `ROOT`. To exit CINT, you need to type “.q”.

### Author(s)

Christian Stratowa

### See Also

`root.hist2D`, `root.hist3D`

### Examples

    ## Not run:
    ## first, load ROOT scheme file and ROOT data file
    scheme.test3 <- root.scheme(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
    data.test3 <- root.data(scheme.test3, paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

    root.hist1D(data.test3, "TestA1.cel")
    root.hist1D(data.test3, "TestA1.cel", type="density")
    ## End(Not run)

[Package xps version 1.0.2 Index]