ggplot2
凡例をプロットの一番下に移動して水平に回すにはどうすればよいですか?
サンプルコード:
library(reshape2) # for melt
df <- melt(outer(1:4, 1:4), varnames = c("X1", "X2"))
p1 <- ggplot(df, aes(X1, X2)) + geom_tile(aes(fill = value))
p1 + scale_fill_continuous(guide = guide_legend())
望ましい(おおよその)結果: