1
x<- structure(list(count = c(4259120, 4317840, 4444000, 4254240,
4656800), the_date = structure(c(1389589200, 1389675600, 1389762000,
1389848400, 1389934800), class = c("POSIXct", "POSIXt"), tzone = "")), .Names = c("count",
"the_date"), row.names = c(51L, 406L, 664L, 197L, 196L), class = "data.frame")
par(mar = c(8, 4, 4, 2) + 0.1)
plot(x$the_date, x$count, type="l", xaxt = "n", xlab = "")
axis(1, labels = FALSE)
labels<-x$the_date
labels<-format(labels, format="%b-%d-%Y")
text(x$the_date, par("usr")[3] - 0.75, srt = 55, adj = 1, labels = labels, xpd = TRUE)
我試過調整par("usr")[3] - 0.75
偏移量,如指定的here,但標籤根本沒有移動。從x軸向下移動x軸標籤
任何方式讓他們在一定程度上,而不是僅僅旋轉90度? – tcash21
@ tcash21可以更好地移動到更高點的圖庫上。比如'ggplot2'或'lattice'。 – agstudy
是的,我想通了。我會回到'ggplot2'。謝謝! – tcash21