錯誤?可能相關to this..scale_y_discrete忽略中斷/標籤
dat = data.frame(x = 1:4, y = ordered(c(4,'>5',1,1), levels = c(1:5, '>5')), grp = 1)
ggplot(dat, aes(x, y, group=grp)) + geom_step() +
scale_y_discrete(breaks = levels(dat$y), labels = levels(dat$y))
錯誤?可能相關to this..scale_y_discrete忽略中斷/標籤
dat = data.frame(x = 1:4, y = ordered(c(4,'>5',1,1), levels = c(1:5, '>5')), grp = 1)
ggplot(dat, aes(x, y, group=grp)) + geom_step() +
scale_y_discrete(breaks = levels(dat$y), labels = levels(dat$y))
'是否下降= FALSE'在'scale_y_discrete'你想要什麼?如果沒有,你需要澄清你想要輸出的樣子。 – Miff