Professional Documents
Culture Documents
breaksNew <- c(breaks[1], breaks[-(length(breaks))] + breaksInterval/2, breaks[length(breaks)]) countsNew <- c(0, counts, 0)
if (new == T) { plot(breaksNew, countsNew, col = col, pch = 19, ...) } else { points(breaksNew, countsNew, col = col, pch = 19, ...) }
invisible(result) }
And Here's some examples freqPolygon(c(2, 3, 4, 2, 5, 2, 3), col = "blue", new = T) freqPolygon(c(1, 2, 1, 1, 2, 3, 2), col = "red", new = F, lty = "dotted")
freqPolygon(c(2, 3, 4, 2, 5, 2, 3), col = "blue", new = T) freqPolygon(c(1, 2, 1, 1, 2, 3, 2), col = "red", new = F, lty = "dotted")
freqPolygon(c(2, 3, 4, 2, 5, 2, 3), col = rgb(0, 0, 1, 0.2), new = T) freqPolygon(c(1, 2, 1, 1, 2, 3, 2), col = rgb(1, 0, 0, 0.2), new = F, lty = "dotted")
freqPolygon(c(1, 2, 1, 1, 2, 3, 2), col = rgb(1, 0, 0, 0.2), new = F, lty = "dotted", xlim = c(0, 6))
freqPolygon(c(2, 3, 4, 2, 5, 2, 3), col = rgb(0, 0, 1, 0.2), new = T, xlim = c(0, 6), ylim = c(0, 6), freq = F)
## Warning: "freq" is not a graphical parameter ## Warning: "freq" is not a graphical parameter ## Warning: "freq" is not a graphical parameter ## Warning: "freq" is not a graphical parameter ## Warning: "freq" is not a graphical parameter ## Warning: "freq" is not a graphical parameter ## Warning: "freq" is not a graphical parameter
freqPolygon(c(1, 2, 1, 1, 2, 3, 2), col = rgb(1, 0, 0, 0.2), new = F, lty = "dotted", xlim = c(0, 6), ylim = c(0, 6), freq = F)
## Warning: arguments 'freq', 'xlim', 'ylim' are not made use of ## Warning: "freq" is not a graphical parameter ## Warning: "freq" is not a graphical parameter
You see some warnings. Just ignore it. Function col2rgb tells you how to figure col2rgb("red") argument to superimpose two frequency polygons.
[,1] 255 0 0
col2rgb("blue")
[,1] 0 0 255