我有以下数据集:
dput(head(active_clients))
structure(list(Date = structure(c(1422662400, 1425081600, 1427760000,
1430352000, 1433030400, 1435622400), class = c("POSIXct", "POSIXt"
), tzone = "UTC"), value = c(65139, 66615, 66669, 67081, 67277,
67366), month = 1:6, year = c(2015L, 2015L, 2015L, 2015L, 2015L,
2015L), year_month = c("1/15", "2/15", "3/15", "4/15", "5/15",
"6/15"), year2 = c("15", "15", "15", "15", "15", "15")), .Names = c("Date",
"value", "month", "year", "year_month", "year2"), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
我正在用 ggplot2 绘制以下线/点图。
t <- ggplot(active_clients) +
geom_point(aes(as.factor(year_month),
value),
size = 2,
color="deepskyblue4") +
geom_line(aes(as.factor(year_month),
value,
group = 1, alpha = 0.5),
color = "deepskyblue4") +
xlab("") +
ylab("") +
theme(legend.title = element_blank()) +
theme_minimal()
ggplotly(t)
但我无法从 x 轴上删除标签。
我也尝试添加:
theme(legend.title = element_blank(), axis.text = element_blank())
不知道我做错了什么。
有什么提示吗?
更新
这是我得到的情节: