小编Mak*_*pet的帖子

为什么 coord_proj 和 ggplot2 给我这个错误?

所以我一直在使用一个相当基本的过程来将参与者数量绘制到全球地图上。

map <- map_data("world")
p <-ggplot()
p <- ggplot()+geom_polygon(data=map,aes(x=long, y=lat, group = group),fill="#4a4a49")
opt <- theme(legend.position="none",
axis.ticks=element_blank(),
axis.title=element_blank(),
axis.text =element_blank())
p <- p+
     geom_point(aes(x=lon, y=lat, size=log10), data=hs_mapping_latlon, col="#ffcd00", alpha=0.7)
p <- p+ 
     theme_map()+opt
Run Code Online (Sandbox Code Playgroud)

直到最近,这一切都运行良好。特别是,如果我想使用以下代码使用 Winkel 三重投影:

q <- p+ 
     coord_proj("+proj=wintri")
Run Code Online (Sandbox Code Playgroud)

我收到以下错误。

Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Error: Not implemented
Run `rlang::last_error()` to see where the error occurred.

<error/rlang_error>
Not implemented
Backtrace:
     x
  1. +-(function (x, ...) ...
  2. \-ggplot2:::print.ggplot(x)
  3.   +-ggplot2::ggplot_gtable(data) …
Run Code Online (Sandbox Code Playgroud)

r ggplot2

5
推荐指数
1
解决办法
324
查看次数

标签 统计

ggplot2 ×1

r ×1