无法使用 ggOceanMaps 放大?
Unable to zoom in using ggOceanMaps?
我正在尝试使用以下内容创建区域地图:ggOceanMaps 中的纬度 (35,32) 经度 (-119,-116)。我无法让我的地图聚焦于指定区域。这会导致平面图难以辨认。我使用以下网站作为参考。也许有类似的包使用这些规则运行?纬度和经度需要四个值。
https://mikkovihtakari.github.io/ggOceanMaps/
# Code given: dt <- data.frame(lon = c(-30, -30, 30, 30), lat = c(50, 80, 80, 50))
basemap(data = dt)
# Modified:
dt <- data.frame(lon,lat)
# where
lon = (-119,-116)
lat = (35,32)
尝试:
library(ggOceanMaps)
#> Loading required package: ggplot2
#> Loading required package: ggspatial
#> Setting data download folder to a temporary folder
#> /var/folders/fm/xtn13rlj7d3gp8twy7hh9prxtlq_m4/T//RtmptFmQ0Z. This
#> means that any downloaded map data need to be downloaded again when you
#> restart R. To avoid this problem, change the default path to a
#> permanent folder on your computer. Add following lines to your
#> .Rprofile file: {.ggOceanMapsenv <- new.env(); .ggOceanMapsenv$datapath
#> <- 'YourCustomPath'}. You can use usethis::edit_r_profile() to edit the
#> file.'~/Documents/ggOceanMapsLargeData'would make it in a writable
#> folder on most operating systems.
packageVersion("ggOceanMaps")
#> [1] '1.1.10'
basemap(limits =c(-119, -116, 32, 35))
#> Using lon and lat as longitude and latitude columns, respectively.
#> projection transformed from EPSG:4326 to EPSG:4326
由 reprex package (v2.0.0)
于 2021-06-24 创建
我正在尝试使用以下内容创建区域地图:ggOceanMaps 中的纬度 (35,32) 经度 (-119,-116)。我无法让我的地图聚焦于指定区域。这会导致平面图难以辨认。我使用以下网站作为参考。也许有类似的包使用这些规则运行?纬度和经度需要四个值。 https://mikkovihtakari.github.io/ggOceanMaps/
# Code given: dt <- data.frame(lon = c(-30, -30, 30, 30), lat = c(50, 80, 80, 50))
basemap(data = dt)
# Modified:
dt <- data.frame(lon,lat)
# where
lon = (-119,-116)
lat = (35,32)
尝试:
library(ggOceanMaps)
#> Loading required package: ggplot2
#> Loading required package: ggspatial
#> Setting data download folder to a temporary folder
#> /var/folders/fm/xtn13rlj7d3gp8twy7hh9prxtlq_m4/T//RtmptFmQ0Z. This
#> means that any downloaded map data need to be downloaded again when you
#> restart R. To avoid this problem, change the default path to a
#> permanent folder on your computer. Add following lines to your
#> .Rprofile file: {.ggOceanMapsenv <- new.env(); .ggOceanMapsenv$datapath
#> <- 'YourCustomPath'}. You can use usethis::edit_r_profile() to edit the
#> file.'~/Documents/ggOceanMapsLargeData'would make it in a writable
#> folder on most operating systems.
packageVersion("ggOceanMaps")
#> [1] '1.1.10'
basemap(limits =c(-119, -116, 32, 35))
#> Using lon and lat as longitude and latitude columns, respectively.
#> projection transformed from EPSG:4326 to EPSG:4326
由 reprex package (v2.0.0)
于 2021-06-24 创建