Last active
October 5, 2015 20:11
-
-
Save jalapic/7b698bc42ed968692e36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Geom Tiling | |
df <- data.frame(Var1=rep(LETTERS[1:20],20), | |
Var2=rep(LETTERS[1:20],each=20), | |
Value=sample(1:100, replace=T, 400) | |
) | |
ggplot(df, aes(Var1, Var2, fill = Value)) + | |
geom_tile(colour="white", size=1.75, stat="identity") + | |
scale_fill_continuous(low="white", high="dodgerblue") + | |
scale_x_discrete(expand = c(0, 0)) + | |
scale_y_discrete(expand = c(0, 0)) + | |
xlab("") + | |
ylab("") + | |
ggtitle("Geom tiling") + | |
theme( | |
plot.title = element_text(color="black",hjust=0,vjust=1, size=rel(2.3)), | |
plot.background = element_rect(fill="white"), | |
panel.background = element_rect(fill="white"), | |
panel.border = element_rect(fill=NA, color="white", size=0.15, linetype="solid"), | |
panel.grid.major = element_blank(), | |
panel.grid.minor = element_blank(), | |
axis.line = element_blank(), | |
axis.ticks = element_blank(), | |
axis.text = element_text(color="black", size=rel(1.3)), | |
axis.text.y = element_text(hjust=1), | |
legend.text = element_text(color="black", size=rel(1.3)), | |
legend.background = element_rect(fill="white"), | |
legend.position = "bottom", | |
legend.title=element_blank() | |
) |
Author
jalapic
commented
Oct 5, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment