私はthis question on Twitterと質問していました。より長いプロットラベルは、plot_gridでプロットをアレンジしたときに右に移動します
plot_grid()
とラベルされた、サイド・バイ・サイドプロットを作成する場合、単一の文字のラベルの予想通り、物事が仕事:
library(cowplot)
p1 <- ggplot(iris, aes(x = Sepal.Length, fill = Species)) +
geom_density(alpha = 0.7) +
ggtitle("") + theme_minimal()
p2 <- ggplot(iris, aes(x = Sepal.Length, fill = Species)) +
geom_density(alpha = 0.7) +
ggtitle("") +
scale_fill_grey() + theme_minimal()
plot_grid(p1, p2, labels = c("A", "B"))
しかし、我々はラベルとして長い文字列を使用している場合、ラベルが右に移動し、彼らは長い文字列であるより多くを移動:
plot_grid(p1, p2, labels = c("Density plot in color", "In gray"))
どのようにこれを修正できますか?
免責事項:私はパッケージの作成者です。希望でこれをここに返信すると便利です。