Variation
'plot.quantiles' <-
function(
quantile.data = quantiles.to.plot.in.panel,
quantile.type = 7
){
cat("\nPlotting Quantiles\n")
quan.x <- quantile.data$x
quan.y <- quantile.data$y
quan.alpha <- quantile.data$alpha
fifty.percent.line <- tapply(quan.y, quan.x, quantile, probs = 0.5, type = quantile.type)
nintyfive.percent.line <- tapply(quan.y, quan.x, quantile, probs = (1-quan.alpha), type = quantile.type)
five.percent.line <- tapply(quan.y, quan.x, quantile, probs = (quan.alpha), type = quantile.type)
quantile.colors <- c("grey35","grey35")
quantile.lty <- c("dashed","longdash")
panel.lines(names(five.percent.line),(five.percent.line), col=quantile.colors[1],lty=quantile.lty[1],lwd=2)
panel.lines(names(fifty.percent.line),(fifty.percent.line), col=quantile.colors[2],lty=quantile.lty[2],lwd=2)
panel.lines(names(nintyfive.percent.line),(nintyfive.percent.line), col=quantile.colors[1],lty=quantile.lty[1],lwd=2)
}
key = list(
title = "Legend",
text = list(
c("Quantiles"),
col="black"
),
points = list(
col = c("grey35"),
pch = c(NA),
cex = c(1)*0.75
),
lines = list(
col = c("grey35"),
lwd = c(2)*0.75,
lty = c("dashed")
),
type = "l",
space = "right",
cex.title = 1,
cex = 0.75
)