Displaying 1 result from an estimated 1 matches for "mf_label".
Did you mean:
mr_label
2012 Jun 27
0
ggplot2 ordering in a faceted dotplot.
...scale_y_continuous("Annual number of days absent") +
scale_x_discrete("Industry Groups")
p
# faceted dotplot for 2001 & 2011
mdata <- melt(mdata, id=c("group"))
# function to set facet labels.
mf_labeller <- function(var, value){
value <- as.character(value)
if (var=="variable") {
value[value=="absent2001"] <- "2001"
value[value=="absent2011"] <- "2011"
}
return(value)
}
p1 <- ggplot(mdata, aes(...