powered by
Turn histograms into frequency polygons
freqpoly(x, plot = TRUE, ...)hist2freqpolygon(hist)# S3 method for freqpolygon plot( x, freq = equidist, col = graphics::par("fg"), lty = NULL, lwd = 1, main = paste("Frequency polygon of", paste(x$xname, collapse = "\n")), sub = NULL, xlab = x$xname, ylab, xlim = range(x$x), ylim = NULL, axes = TRUE, labels = FALSE, add = FALSE, ann = TRUE, ... )
hist2freqpolygon(hist)
# S3 method for freqpolygon plot( x, freq = equidist, col = graphics::par("fg"), lty = NULL, lwd = 1, main = paste("Frequency polygon of", paste(x$xname, collapse = "\n")), sub = NULL, xlab = x$xname, ylab, xlim = range(x$x), ylim = NULL, axes = TRUE, labels = FALSE, add = FALSE, ann = TRUE, ... )
An object of class "freqpoly" (invisibly). Additionally, if plot is TRUE, a plot is generated.
"freqpoly"
plot
TRUE
a vector of values for which a frequency polygon is desired.
a logical indicating if a plot should be generated.
additional arguments passed on to hist().
hist()
a histogram object produced by link{hist}().
link{hist}()
A logical indicating whether the vertical scale should be frequency (count).
A color for the frequency polygon.
An integer indicating the line type.
An integer indicating the line width.
A title for the plot.
A sub-title for the plot.
Label for the horizontal axis.
Label for the vertical axis.
A numeric vector of length 2.
A logical indicating whether axes should be drawn.
A logical indicating whether labels should be printed or a character vector of labels to add.
A logical indicating whether the plot should be added to the current plot
A logical indicating whether annotations (titles and axis titles) should be plotted.
freqpoly(faithful$eruptions) bks <- c(0, 1, 1.5, 2, 3, 3.5, 4, 4.5, 5, 7) hist(faithful$eruptions, breaks = bks) freqpoly(faithful$eruptions, col = rgb(0,0,1,.5), lwd = 5, breaks = bks, add = TRUE)
Run the code above in your browser using DataLab