# R 基础作图法绘制喷泉间隔时间直方图
data(geyser, package = "MASS")
par(mfrow = c(2, 2), mar = c(2, 3, 2, .5), mgp = c(2, .5, 0))
hist(geyser$waiting, main = "(1) freq = TRUE", xlab = "waiting")
hist(geyser$waiting, freq = FALSE, xlab = "waiting",
main = "(2) freq = FALSE")
hist(geyser$waiting, breaks = 5, density = 10, xlab = "waiting",
main = "(3) breaks = 5")
hist(geyser$waiting, breaks = 40, col = "red", xlab = "waiting",
main = "(4) breaks = 40")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.