From 6cd0c77771cea384e983b7a34ccf556080697f98 Mon Sep 17 00:00:00 2001 From: nperez Date: Mon, 2 Mar 2020 12:05:06 +0100 Subject: [PATCH 1/3] shape file drawn in PlotEquiMap --- inst/doc/FAQ.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/inst/doc/FAQ.md b/inst/doc/FAQ.md index e6a58be..06c4812 100644 --- a/inst/doc/FAQ.md +++ b/inst/doc/FAQ.md @@ -5,6 +5,7 @@ This document intends to be the first reference for any doubts that you may have ## Index 1. **How to** 1. [Global Map with non-standard longitudinal boundaries](#1-global-map-with-non-standard-longitudinal-boundaries) + 2. [Plot a region boundary from shape file in PlotEquiMap]((#2-plot-a-region-boundary-from-shape-file-in-PlotEquiMap) ## 1. How to @@ -40,3 +41,23 @@ Note: You can adjust many parameters to visualize the plot, here we are just sho If you want to add other information to the plot (e.g.: hatching, points, countours, ...), you can add it just before ColorBar() function. +### 2. Plot a region boundary from shape file in PlotEquiMap + +For adding the boundaries of a region from a shape file to a PlotEquiMap, the following lines could be used. In this example Douro region is plotted over a synthetic 'dat' object: + +``` +library(rgdal) +library(sp) +library(maps) + +# Read the Douro shapefile and transform: +shp1 <- readOGR(dsn = '/esarchive/scratch/cchou/MEDGOLD/others/Shapefiles/', layer = 'RDD_ETRS89') +s1 <- spTransform(shp1, CRS("+proj=longlat")) +douro <- SpatialPolygons2map(s1) + +dat <- 1 : (21 * 10) +dim(dat) <- c(lon = 21, lat = 10) +PlotEquiMap(dat, lon = c(1:10, 350:360), lat = 36 : 45, drawleg = FALSE, filled.continents = FALSE) +map(douro, interior = FALSE, add = TRUE, lwd = 2, col = "black") + + -- GitLab From 7acdf4d452fad2e8f5a93d2d57d9c80d34bc9fa8 Mon Sep 17 00:00:00 2001 From: aho Date: Fri, 22 Oct 2021 11:51:20 +0200 Subject: [PATCH 2/3] Typo and syntax correction --- inst/doc/FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/doc/FAQ.md b/inst/doc/FAQ.md index 14ef6e3..0fdfc5a 100644 --- a/inst/doc/FAQ.md +++ b/inst/doc/FAQ.md @@ -5,7 +5,7 @@ This document intends to be the first reference for any doubts that you may have ## Index 1. **How to** 1. [Global Map with non-standard longitudinal boundaries](#1-global-map-with-non-standard-longitudinal-boundaries) - 2. [Plot a region boundary from shape file in PlotEquiMap]((#2-plot-a-region-boundary-from-shape-file-in-PlotEquiMap) + 2. [Plot a region boundary from shape file in PlotEquiMap](#2-plot-a-region-boundary-from-shape-file-with-PlotEquiMap) 2. **Something goes wrong...** 1. [CDORemap() returns errors or warnings with specific module versions](#1-cdoremap-returns-errors-or-warnings-with-specific-module-versions) -- GitLab From 472182cfa51c0d7858293f5d351b252254ba7221 Mon Sep 17 00:00:00 2001 From: aho Date: Fri, 22 Oct 2021 11:53:36 +0200 Subject: [PATCH 3/3] Title and link correction --- inst/doc/FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/doc/FAQ.md b/inst/doc/FAQ.md index 0fdfc5a..885e49c 100644 --- a/inst/doc/FAQ.md +++ b/inst/doc/FAQ.md @@ -5,7 +5,7 @@ This document intends to be the first reference for any doubts that you may have ## Index 1. **How to** 1. [Global Map with non-standard longitudinal boundaries](#1-global-map-with-non-standard-longitudinal-boundaries) - 2. [Plot a region boundary from shape file in PlotEquiMap](#2-plot-a-region-boundary-from-shape-file-with-PlotEquiMap) + 2. [Plot a region boundary from shape file with PlotEquiMap](#2-plot-a-region-boundary-from-shape-file-with-plotequimap) 2. **Something goes wrong...** 1. [CDORemap() returns errors or warnings with specific module versions](#1-cdoremap-returns-errors-or-warnings-with-specific-module-versions) -- GitLab