這個問題在這里已經有了答案:
uj5u.com熱心網友回復:
不確定這是否是您要查找的內容。如果您希望 x 軸以 50 的間隔從 0 到 550,則無需設定dist_km為因數。然后scale_x_continuous用于設定breaks。
library(tidyverse)
ggplot(elevation, aes(x=dist_km, y=cota))
geom_point(size=0.1, color="red")
ggtitle("Profile Elevation river")
xlab("Dist(km)")
ylab("Elevation(m)")
theme_light()
theme(plot.title = element_text(size=13))
theme(axis.text.x=element_text(angle=90))
scale_x_continuous(breaks=seq(0,555, by=50))
![如何在R中的ggplot 2中分割x軸?[復制]](https://img.uj5u.com/2022/02/19/a93366d044524f4e8633a07e75bb8091.png)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/427624.html
