[英]R: {ggplot2}: How / Can I independently adjust the x-axis limits on a facet_grid plot?
[英]How do I position facet-grid in ggplot2 along the x axis
我正在使用代碼繪制facet_grid
mg <- ggplot(mtcars, aes(x = mpg, y = wt)) + geom_point()
mg + facet_grid(vs + am ~ gear)
這給出了以下內容
我想在圖像中標記箭頭的地方添加一些空間,請有人幫忙。
我會嘗試這個
mg <- ggplot(mtcars, aes(x = mpg, y = wt)) + geom_point() + scale_x_continuous(limits = c(7,35), expand = c(0,0), breaks = seq(5,35,5)) + facet_grid(vs + am ~ gear) mg
擴展通常會增加一些空間,您可以使用它,也可以調整限制。 當您執行此操作時,它會拋出數字序列,因此也必須進行設置...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.