histcoord | R Documentation |
Converts the mid-point x-values and mean densities of binned data into (x,y)-coordinates of a histogram.
histcoord(x, y, yleft = 0, yright = 0)
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 |
(2n+2)-by-2 matrix of (x,y)-coordinates to draw histogram as a connected line
Danail Obreschkow
x = seq(5)
y = sin(x)
plot(x,y,xlim=c(0,6))
lines(histcoord(x,y))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.