Last data update: 2014.03.03

R: Panel plot of histogram and density curve
panel.histR Documentation

Panel plot of histogram and density curve

Description

Prints the histogram and corresponding density curve

Usage

panel.hist(x, col.bar = "gray", ...)

Arguments

x

a numeric vector of x values

col.bar

the color of the bars

...

options passed to hist

Details

This function prints a combined histogram and density curve for use with the pairs function

Author(s)

Claus Ekstrom claus@rprimer.dk

References

Ekstrom, CT (2011) The R Primer.

Examples


pairs(~ Ozone + Temp + Wind + Solar.R, data=airquality,
      lower.panel=panel.smooth, diag.panel=panel.hist,
      upper.panel=panel.r2)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MESS)
Loading required package: geepack

Attaching package: 'MESS'

The following object is masked from 'package:stats':

    power.t.test

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MESS/panel.hist.Rd_%03d_medium.png", width=480, height=480)
> ### Name: panel.hist
> ### Title: Panel plot of histogram and density curve
> ### Aliases: panel.hist
> ### Keywords: iplot
> 
> ### ** Examples
> 
> 
> pairs(~ Ozone + Temp + Wind + Solar.R, data=airquality,
+       lower.panel=panel.smooth, diag.panel=panel.hist,
+       upper.panel=panel.r2)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>