我有這個輸入:
structure(list(Topic = structure(c(1L, 2L, 3L, 1L, 2L, 3L), .Label = c("1",
"2", "3"), class = "factor"), Sex = structure(c(1L, 1L, 1L, 2L,
2L, 2L), .Label = c("Female", "Male"), class = "factor"), Count = c(2L,
15L, 23L, 7L, 20L, 34L)), class = "data.frame", row.names = c(NA,
-6L))
我試試這個代碼:
ggplot(data=dat, aes(x=Topic, y=Sex, fill=Sex)) geom_bar(stat="identity")
但是問題是它對每個主題都顯示了相同的建議
怎么可能做出這樣的
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/435714.html
