我想給我的Y軸標簽一個呼吸的空間,把我的面狀標簽向左移一點。我不知道如何才能在ggplot上做到這一點。有誰對如何做到這一點有建議嗎?
uj5u.com熱心網友回復:
你可能正在尋找的主題設定是strip.switch.pad.grid。
library(ggplot2)
p < -ggplot(mpg, aes(hwy。 class)
geom_col()
facet_grid(year ~ . , switch = "y")
主題(strip.place = "exterior")
p

p theme(strip.switch.pad。 grid = unit(1, "cm"))

創建于2021-09-14,由reprex軟體包(v2.0.1)
uj5u.com熱心網友回復:
你可以在你的代碼中添加 theme(strip.place = "outside")。它應該能起作用。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/318914.html
標籤:
