histcoord: Generate histogram coordinates from mid points

Description Usage Arguments Value Author(s) Examples

View source: R/histcoord.R

Description

Converts the mid-point x-values and mean densities of binned data into (x,y)-coordinates of a histogram.

Usage

1
histcoord(x, y, yleft = 0, yright = 0)

Arguments

x

n-vector giving the bin mid-points

y

n-vector giving bin values

yleft

optional value specifying the value at the left edge

yright

optional value specifying the value at the right edge

Value

(2n+2)-by-2 matrix of (x,y)-coordinates to draw histogram as a connected line

Author(s)

Danail Obreschkow

Examples

1
2
3
4
x = seq(5)
y = sin(x)
plot(x,y,xlim=c(0,6))
lines(histcoord(x,y))

physx documentation built on Feb. 3, 2022, 5:08 p.m.

Related to histcoord in physx...