我在使用ggplot时遇到问题,我认为很简单,但是以某种方式显示了不存在的数据,我如何摆脱显示x = 2和5的列的空白空间
Data <- structure(list(DQRNiveau = c(0, 1, 3, 4, 6, 7, 8, 0, 1, 3, 4, 6, 7, 8),
Group = c("Alpha", "Alpha", "Alpha", "Alpha", "Alpha", "Alpha", "Alpha", "Beta", "Beta", "Beta", "Beta", "Beta", "Beta", "Beta"),
n_Count = c(2L, 4L, 11L, 77L, 45L, 102L, 13L, 2L, 4L, 16L, 103L, 58L, 109L, 13L)),
.Names = c("DQRNiveau", "Group", "n_Count"), row.names = c(NA, -14L),
class = c("tbl_df", "tbl", "data.frame"))
ggplot(data = Data, aes(DQRNiveau, y = n_Count, fill = Group)) +
geom_bar(stat = "identity", position = position_dodge(1)) +
scale_x_continuous(breaks = c(Data$DQRNiveau))