↧
Answer by Andre Wildberg for How to modify a ggplot after its been created
Another way is to add NAs for undesired values and then use scale_fill_gradientn with na.value = "#FFFFFF00" (00 is the alpha channel, i.e. transparent)dat <- cbind(expand.grid(c("Asleep",...
View ArticleAnswer by Axeman for How to modify a ggplot after its been created
We can use a y-scale with drop = FALSE:p <- ggplot(data_long, aes(Var1, Var2, fill=value)) + geom_tile() + geom_text(aes(label = round(value, 2)), size = 4, color = "black") + scale_y_discrete(drop...
View ArticleHow to modify a ggplot after its been created
I made this ggplot heatmap in R:library(ggplot2)library(reshape2)data_matrix <- matrix(rnorm(121, 0.5, 0.01), nrow=11)rownames(data_matrix) <- c("Asleep", "1", "2", "3", "4", "5", "6", "7", "8",...
View Article