ggplot有一个错误:grid.Call(C_textBounds,as.graphicsAnnot(x $ label),x $ x,x $ y,错误:找不到多边形边缘

时间:2019-02-26 08:37:40

标签: r ggplot2

我正在从GitHub运行某人的代码,并且产生了错误:

  

grid.Call(C_textBounds,as.graphicsAnnot(x $ label),x $ x,x $ y,   :找不到多边形边缘

有人可以帮助我了解问题出在哪里吗?

代码是这样的:

ggplot() +

  # municipality polygons
  geom_polygon(data = map_data, 
               aes(fill = avg_age_15, x = long, y = lat, group = group)) +

  # municipality outline
  geom_path(data = map_data, 
            aes(x = long, y = lat, group = group), 
            color = "white", size = 0.1) +

  coord_equal() +

  # add the previously defined basic theme
  theme_map() +
  labs(x = NULL, y = NULL, 
       title = "Switzerland's regional demographics", 
       subtitle = "Average age in Swiss municipalities, 2015", 
       caption = "Geometries: ThemaKart, BFS; Data: BFS, 2016")

0 个答案:

没有答案