小编Mic*_*nti的帖子

为什么这些实线出现在我的 ggplot 绘图下方?

在此输入图像描述

这是我的代码:

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)

对于这个家庭作业,我们正在使用分面,一切看起来都应该是这样的,但是在图的底部有两条粗线。如果有人知道为什么会发生那就太棒了!

r ggplot2 facet-wrap dplyr

2
推荐指数
1
解决办法
234
查看次数

标签 统计

dplyr ×1

facet-wrap ×1

ggplot2 ×1

r ×1