View source: R/brokenBarplot.R
brokenBarplot | R Documentation |
Make a barplot with a broken Y axis
brokenBarplot(
height,
ylim1,
yAxis1 = list(),
ylim2,
yAxis2 = list(),
names.arg = NULL,
...
)
height |
Typical |
ylim1 |
Limits Y axis of the top plot. |
yAxis1 |
Arguments passed to axis (Y axis) for the top plot. |
ylim2 |
Limits Y axis of the bottom plot. |
yAxis2 |
Arguments passed to axis (Y axis) for the bottom plot. |
names.arg |
Typical |
... |
Extra arguments passed to barplot. |
n <- 10
myData <- data.frame(x = letters[1:n], y = runif(n = n, min = 0, max = 50))
index <- c(3, 4, 8)
myData$y[index] <- runif(n = 3, min = 500, max = 1000)
brokenBarplot(height = myData$y, names.arg = myData$x,
ylim1 = c(0, 50),
yAxis1 = list(at = seq(0, 50, 10), las = 2),
ylim2 = c(500, 1000),
yAxis2 = list(at = seq(500, 1000, 100), las = 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.