这是我的代码:
pokemon <- read_csv("https://uwmadison.box.com/shared/static/hf5cmx3ew3ch0v6t0c2x56838er1lt2c.csv")
pokemon %>%
select(Name, type_1, Attack, Defense) %>%
mutate(AttDefRatio = Attack/Defense) %>%
ggplot(
aes(Name, AttDefRatio)
) +
geom_point(size = 0.5) +
facet_wrap(type_1 ~ .) +
theme(legend.position = "bottom")
Run Code Online (Sandbox Code Playgroud)
对于这个家庭作业,我们正在使用分面,一切看起来都应该是这样的,但是在图的底部有两条粗线。如果有人知道为什么会发生那就太棒了!